Skip to content
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

near-sdk-js ABI support #245

Closed
Tracked by #391
exalate-issue-sync bot opened this issue Sep 23, 2022 · 6 comments
Closed
Tracked by #391

near-sdk-js ABI support #245

exalate-issue-sync bot opened this issue Sep 23, 2022 · 6 comments
Assignees
Labels

Comments

@exalate-issue-sync
Copy link

exalate-issue-sync bot commented Sep 23, 2022

Remain work for this ticket:

  • update to use latest abi
  • add abi test as in rust sdk
@ailisp
Copy link
Member

ailisp commented Jan 17, 2023

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?

@volovyks
Copy link
Collaborator

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

@itegulov
Copy link
Contributor

itegulov commented Jan 19, 2023

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 (near/near-api-js#1045), we will be able to test it e2e after it is released.

@Rezaheydariii
Copy link

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.

@ailisp ailisp added v2.0 and removed v1.0+ labels Apr 19, 2024
@ailisp
Copy link
Member

ailisp commented Apr 19, 2024

@Rezaheydariii Thanks for reporting. We're working on a fix.

@ailisp ailisp moved this to Ready in near-sdk-js May 1, 2024
@ailisp ailisp moved this from Ready to In progress in near-sdk-js May 2, 2024
@ailisp ailisp self-assigned this May 2, 2024
@ailisp
Copy link
Member

ailisp commented May 10, 2024

@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

@ailisp ailisp mentioned this issue May 21, 2024
4 tasks
@ailisp ailisp moved this from In progress to Done in near-sdk-js May 22, 2024
@ailisp ailisp closed this as completed by moving to Done in near-sdk-js May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

5 participants
@volovyks @itegulov @ailisp @Rezaheydariii and others