Coder Social home page Coder Social logo

make-software / casper-net-sdk-clients Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 2.0 659 KB

This library is an extension of the Casper .NET SDK that provides easy to use client classes for the Casper ERC20 and CEP47 smart contracts.

License: Apache License 2.0

C# 100.00%
blockchain casper-network library sdk

casper-net-sdk-clients's People

Contributors

davidatwhiletrue avatar mssteuer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

casper-net-sdk-clients's Issues

[ENHANCEMENT PROPOSAL] Add a client for CEP78

Summary

Add a client for the new NFT contract CEP78.

Motivation

CEP78 is the new NFT standard promoted by Casper, thus it makes sense to add it also to the SDK Clients library.

Guide-level explanation

--

Reference-level explanation

--

Drawbacks

None.

Rationale and alternatives

--

Unresolved questions

--

Future possibilities

--

[ENHANCEMENT PROPOSAL] Problem with non BigInteger token id in CEP78 & CEP47 (custom contracts)

  1. SDK functions for CEP47 and CEP78 ONLY support tokens whose token id is of type BigInteger. There are custom contracts on testnet and mainnet whose ID is, for example, of the String type. The SDK should support all contract types - NFTs in contracts.
    I understand the reason why only BigInteger is supported (this is how CEP47 and CEP78 are constructed by default), but if the possibility of creating custom solutions is allowed, the SDK must support them.

  2. Additionally, in the SDK we have a function that returns the sum of all minted NFTs in a specific contract, but there is no function that will return a list or array of all IDs of minted tokens in the contract.

[ENHANCEMENT PROPOSAL] Account Info Standard Support

Summary

Add support for the Account Info Standard in the .Net SDK clients library to ease the process of retrieving account information.

Motivation

The lack of built-in support for the Account Info Standard in the .Net SDK makes it cumbersome to retrieve that information. Providing a streamlined method would enhance the SDK's utility.

Guide-level explanation

  • Introduce a new class or method in the client library to handle Account Info Standard operations.
  • Example usage would involve calling this new method to either fetch a URL to the JSON file or a type-safe wrapper around the JSON data.

Reference-level explanation

The new feature could be implemented in the clients library as a contract client. Two modes could be supported:

  1. A simple mode where the client is provided a URL to the JSON file or update it to a new URL.
  2. A more advanced mode offering a type-safe wrapper around the JSON file.

For contract hashes, these could be stored for MainNet and TestNet but configurable for internal test networks. The file name also has to be set to the chain-spec (casper vs casper-test).

Important Note - would be nice if that could be handled automagically:

Payment: The set_url entry point call payment should be 10 CSPR. The deploy may fail with an "Out of gas" error if a smaller amount provided. For the consecutive set_url calls the advised payment amount is 0.5 CSPR

Source

Drawbacks

This feature could add extra maintenance workload and potential complexity to the clients library.

Rationale and alternatives

  • This design addresses the issue by providing both quick and comprehensive solutions.
  • An alternative is to leave it as-is and require manual handling, which is less efficient.
  • The impact of not doing this is continued manual handling of Account Info Standard.

Unresolved questions

  • Should the contract hashes for internal test networks be passed as optional parameters?

Future possibilities

  • Add a Validation-utility using the existing JSON Schema

SetContractPackageHash() works only to call entry points, not to query data from contract

What happened?
A call to SetContractPackageHash() stores the package hash in the client so that an entry point can be called via package hash instead of contract hash. However, it not permits to read data from the contract. For that, SetContractHash() must be used.

What did you expect to happen?
SetContractPackageHash() may fetch the contract hash and use it to query the named keys.

Are you willing to submit a pull request to fix this bug?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.