near-sdk-js
near-sdk-js copied to clipboard
near-sdk-js ABI support
Remain work for this ticket:
- update to use latest abi
- add abi test as in rust sdk
ABI generation is done in #301 and available in 0.7. Great job @itegulov ! I have the same question as Serhii's: do you think it's possible to test ABI somehow?
My suggestions woul be:
- keep hardcoded file in the repo and compare it to the generated one (ideally, multiple files that cover all the edge cases)
- once we have proper implementation of the client code generation, we can create an end to end integration test
Yes, what @volovyks suggests would be ideal. We have a comprehensive set of Rust ABI generation tests under https://github.com/near/cargo-near/tree/main/integration-tests/tests/abi; it might make sense to port them here as well.
NAJ support for ABI is coming soon (https://github.com/near/near-api-js/pull/1045), we will be able to test it e2e after it is released.
Hello, please help me to solve this problem. All programs have been upgraded to the final version. However, the error still exists. :~/near/hello-near# cargo near deploy rezoo.testnet without-init-call network-config testnet sign-with-keychain send • Checking the host environment...done • Collecting cargo project metadata...done • Generating ABI │ Finished dev [unoptimized] target(s) in 0.28s • Extracting ABI...failed Here is the console command if you ever need to re-run it again: cargo near deploy rezoo.testnet without-init-call network-config testnet sign-with-keychain send
Error:
0: expected schema_version to be ~0.4, but got 0.3.0: consider re-generating your ABI file with a newer version of SDK and cargo-near
Location: /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-near-0.6.1/src/util/mod.rs:307
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
@Rezaheydariii Thanks for reporting. We're working on a fix.
@Rezaheydariii Your error is a cargo near problem and not related to near-sdk-js. Please ask by creating an issue here: https://github.com/near/cargo-near