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

Avoid cloning a contract object when performing multiple .query(...) and .call(...) #15

Open
gfusee opened this issue Nov 8, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@gfusee
Copy link
Owner

gfusee commented Nov 8, 2023

No description provided.

@gfusee gfusee added the enhancement New feature or request label Nov 8, 2023
@andreireanu
Copy link
Contributor

Why not just add a Copy to the derive where the contract is constructed in the impl_contract.rs file ?

@gfusee
Copy link
Owner Author

gfusee commented Nov 27, 2023

I like this idea. It is possible since a contract holds a single Address, which itself holds a mx-sdk-rs's Address, which finally holds a 32-length array of u8

The steps would be as following:

  • creating a PR on the mx-sdk-rs repo to derive Copy on its Address struct
  • waiting for a new version to be published on crates.io
  • updating the mx-rs-sdk related crates version dependencies in all NovaX's Cargo.toml files
  • deriving Copy on the NovaX's Address struct
  • deriving Copy on all generated "*Contract" structs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants