-
Notifications
You must be signed in to change notification settings - Fork 314
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
add a from method to ContractClient to instantiate from a contractId #960
add a from method to ContractClient to instantiate from a contractId #960
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.
👏
Still marked as draft. Is that intended, @BlaineHeffron? Seems like it's about ready to go! |
See my comment here - #960 (comment) To summarize, I think it makes sense since we are giving a way to create it from a wasm we should also give a way to create it from a wasmHash. This would also make sense in the context of our e2e tests. |
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.
The RPC work looks good to me, I'll wait for approval from @chadoh / @willemneal on the actual client-side work as I see there's open discussion there before merging!
Should be all ready to go now. |
Latest commit fixes all of Chad's comments. |
Tests are failing |
Looks like that weird spawnSync issue we were seeing before. I added a fallback in case it doesnt work the first time. |
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.
Thanks for all the work here! Looks great
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.
I think my last approval was for a single commit?
ok, I guess I just don't have the correct permissions to get this thing marked as mergeable |
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.
another pass 👀
also be sure to run yarn fmt
I addressed comments from @Shaptic although this now is dependent on stellar/js-stellar-base#744 being merged first. The latest changes remove the external js-xdr dependency and uses the |
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.
❤️
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@stellar/[email protected] |
Adds a
from
method which uses thecontractId
to create an instance of theContractClient
by retrieving the wasm from the blockchain and extracting itsContractSpec
. I also add afromWasm
method which bypasses the wasm retrieval portion if you already have the wasm buffer.