-
Notifications
You must be signed in to change notification settings - Fork 133
Update to CosmWasm 1.0.0-soon #260
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
Conversation
|
Happy for a review, so we can work on wasmd integration |
alpe
left a comment
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.
👍 Added some questions
types/env.go
Outdated
| } | ||
|
|
||
| type ContractInfo struct { | ||
| // binary encoding of sdk.AccAddress of the contract, to be used when sending messages |
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.
q: should this be "bech32 encoded address" instead?
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.
oh, you are right. I will update all the comments
| Creator string `json:"creator"` | ||
| // Set to the admin who can migrate contract, if any | ||
| Admin string `json:"admin,omit_empty"` | ||
| Pinned bool `json:"pinned"` |
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.
Q: We have this info with an extra index in wasmd but I was wondering now if pinned would be useful for a contract? 🤷
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 don't know how you want to store it, but it is interesting info if you want an idea of gas cost (maybe you do powerful Smart Queries if pinned and weaker Raw Queries if not).
| Contract ContractInfo `json:"contract"` | ||
| Block BlockInfo `json:"block"` | ||
| Contract ContractInfo `json:"contract"` | ||
| Transaction *TransactionInfo `json:"transaction_info,omit_empty"` |
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.
q: Would this be empty for simulations/ queries? In the "spike" I did not make a different and defaulted to 0.
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.
Yes. Also empty if the contract was called in a cron job or such. Thus optional.
If this was directly triggered by a TX in a block (DeliverTx), then this should be filled in.
This allows contacts to store some unique reference (requested by Secret Network, but may be useful in other use cases to identify or order tx)
|
Nice work, thanks! |
Adds support for CosmWasm 1.0.0-soon
For Go, the biggest changes are to add the TransactionInfo field to Env as well as the ContractInfoQuery variant to WasmQuery