-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(contract-standards): Adding near-contract-standards library and more tools #275
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ilblackdragon near-lib is even more confusing (we had already had nearlib
which was the JS API client library, and we finally renamed it to near-api-js
to avoid ambiguity).
Some utils can go into sdk crate proper, but it then will end with overloading SDK with tons of utils.
SDK should be a one-stop-shop of all the compatible utils by design:
A software development kit (SDK) is a collection of software development tools in one installable package.
I believe that SDK can have a different release schedule, but given the nature of SDK it should provide or re-export (potentially behind a feature flag) the NEP standards and various helpers.
I propose near-contract-standards
or it would be even better to split them apart into dedicated crates (e.g. near-contract-nft-standard
), so it is easy to track the evolution of certain standards (if that is necessary).
fix: allow trait methods in generated impl
feat(contract-standards) Switch contract standards to use NEP-141 for FungibleToken
* refactor: add more simulation tests to ft example Co-authored-by: Willem Wyndham <willem@cs.umd.edu> * update directory structure for sim tests * clean up fungible-token/Cargo.toml * examples/ft: whitelist members again * Mike/141 movement with sim (#304) * implement account registration and don't use storage for fungible token * update sim tests * ft_resolve_transfer should just return U128, ar_is_registered view only * final change with use bytes for deposit * Cargo.toml changes * Reworking DeFi test example * Working again, except no force closing of the account * Add extra callbacks Co-authored-by: Evgeny Kuzyakov <ek@nearprotocol.com> Co-authored-by: Willem Wyndham <willem@cs.umd.edu> Co-authored-by: Mike Purvis <mikedotexe@gmail.com> Co-authored-by: Evgeny Kuzyakov <ek@nearprotocol.com>
Hm.... How does one put the hash of the contract (code) into the contract itself? |
@ilblackdragon I think you need it to be part of the initialization. |
The |
Let's merge it and iterate |
near-contract-standards
is a library with implementations of contract standards.Additional tools include testing and implementation tools that reduce contract code and tests size by 2x.
Also added
env::storage_byte_code()
which right now returns a constant but in the future will be switched to return current storage cost from environment.Fixes #254