-
Notifications
You must be signed in to change notification settings - Fork 345
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 instantiate2 broadcast in SigningCosmwasmClient #1407
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.
Very nice, thank you!
/** | ||
* FixMsg include the msg value into the hash for the predictable address. | ||
* Default is false | ||
*/ | ||
readonly fixMsg?: boolean; |
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.
This should be removed (and hardcoded to false)
funds: [...(options.funds || [])], | ||
admin: options.admin, | ||
salt: options.salt, | ||
fixMsg: options.fixMsg, |
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.
fixMsg: options.fixMsg, | |
fixMsg: false, |
/** | ||
* salt is an arbitrary value provided by the sender. Size can be 1 to 64. | ||
*/ | ||
readonly salt?: Uint8Array; |
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.
This value is required. Let's add it as a required positional argument after codeId: number,
public async instantiate2( | ||
senderAddress: string, | ||
codeId: number, | ||
msg: Record<string, unknown>, |
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.
msg: Record<string, unknown>, | |
msg: JsonObject, |
* The options of an .instantiate() call. | ||
* All properties are optional. | ||
*/ | ||
export interface Instantiate2Options { |
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.
This should be listed in index.ts
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 found that Instantiate2Options
is exactly same with InstantiateOptions
after I delete salt and fixMsg.
So I delete Instantiate2Options
.
@@ -103,6 +105,38 @@ export interface InstantiateOptions { | |||
readonly admin?: string; | |||
} | |||
|
|||
/** | |||
* The options of an .instantiate() call. |
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 options of an .instantiate() call. | |
* The options of an .instantiate2() call. |
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 found that Instantiate2Options
is exactly same with InstantiateOptions
after I delete salt and fixMsg.
So I delete Instantiate2Options
.
Add instantiate2 (finish #1407)
Thank you. Will be shipped in the next release. |
Closes #1399