forked from cosmos/ibc-go
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #208 from CosmWasm/history_store_196
Use prefix store for contract history
- Loading branch information
Showing
18 changed files
with
333 additions
and
167 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Changes to the api | ||
|
||
## [\#196](https://github.com/CosmWasm/wasmd/issues/196) - Move history of contract code migrations to their own prefix store | ||
|
||
The `ContractDetails.initMsg` used in cosmJs was moved into a new entity `ContractCodeHistoryEntry`. They contain code updates to a contract. | ||
|
||
### Route | ||
This data is available via a new route `/wasm/contract/{contractAddr}/history` | ||
|
||
### Response | ||
A list of ContractCodeHistoryEntries with following fields: | ||
* `operation` can be any of `"Init", "Migrate", "Genesis"` | ||
* `code_id` uint64 | ||
* `msg` as raw json | ||
|
||
### Errors | ||
* 404 - for an unknown contract | ||
|
||
### CLI | ||
`wasmcli query wasm contract-history [bech32_address] to print all the code changes.` | ||
Example: | ||
`wasmcli query wasm contract-history cosmos18r5szma8hm93pvx6lwpjwyxruw27e0k5uw835c` | ||
```json | ||
[ | ||
{ | ||
"operation": "Init", | ||
"code_id": 1, | ||
"msg": "\"init-msg\"" | ||
}, | ||
{ | ||
"operation": "Migrate", | ||
"code_id": 2, | ||
"msg": "\"migrate-msg\"" | ||
} | ||
] | ||
``` |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.