Repository navigation
Support constructors in contract creation via Operation.createCustomContract - #770
Merged
Merged
Conversation
|
Size Change: +2.31 kB (+0.07%) Total Size: 3.26 MB
|
Contributor
|
Why |
Contributor
Author
|
@chadoh will you accept "laziness" as an answer? 😆 fixed! |
Shaptic
marked this pull request as ready for review
August 27, 2024 20:24
Shaptic
force-pushed
the
add-invocation-abstraction
branch
from
August 27, 2024 20:25
4e30bde to
b368f81
Compare
Operation.createCustomContract
Shaptic
force-pushed
the
add-invocation-abstraction
branch
from
September 12, 2024 17:48
0bea18a to
5e2b7d4
Compare
sreuland
reviewed
Sep 12, 2024
| * * `{@link Operation.liquidityPoolDeposit}` | ||
| * * `{@link Operation.liquidityPoolWithdraw}` | ||
| * * `{@link Operation.invokeHostFunction}` | ||
| * * `{@link Operation.invokeHostFunction}`, which has the following additional |
sreuland
reviewed
Sep 12, 2024
| // note: using a string here doesn't work because once the operation | ||
| // is encoded/decoded it will be a Buffer internally and it'd be a | ||
| // mild pain in the ass to check equivalence | ||
| nativeToScVal(Buffer.from('admin name')), |
Contributor
There was a problem hiding this comment.
understood, but, it may be worthwhile to demonstrate plain string usage here as it represents typical client code scenario(and test is used as a reference by devs and followed verbatim), and then add the clunky buffer conversion down later for just test assertion purposes.
Contributor
Author
There was a problem hiding this comment.
fair enough :) way to advocate for the user 😎 done in 8450ac2!
sreuland
approved these changes
Sep 12, 2024
sreuland
left a comment
Contributor
There was a problem hiding this comment.
really clean integration and test coverage!
Shaptic
added a commit
that referenced
this pull request
Sep 17, 2024
* Add TypeScript definitions * Make code fmt action separate from tests
Shaptic
added a commit
that referenced
this pull request
Oct 31, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade the
createCustomContractabstraction to accept a new, optional parameter:class Operation { // ... createCustomContract( address: Address, wasmHash: Buffer | Uint8Array, + constructorArgs?: xdr.ScVal[], salt?: Buffer | Uint8Array, ...and upgrade the internals to use the
CreateContractV2host function.This closes #768.