-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scripts for creating mainnet proposals
- Loading branch information
Showing
7 changed files
with
74 additions
and
22 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "stargaze-reserve-auction" | ||
version = "1.0.0" | ||
version = "1.0.1" | ||
authors = [ | ||
"Shane Vitarana <[email protected]>", | ||
"Tasio Victoria <[email protected]>", | ||
|
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,3 @@ | ||
## Migrate Contract | ||
|
||
By voting YES on this proposal, you agree to migrate the Stargaze Reserve Auction contract from V1.0.0 to V1.0.1. The migrate code ID of the contract uploaded in proposal #185. |
File renamed without changes.
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,42 @@ | ||
## Store WASM Code | ||
|
||
This uploads the code for Stargaze Live Auction v1.0.1 | ||
|
||
The source code is available at https://github.com/public-awesome/marketplace/releases/tag/stargaze_reserve_auction-v1.0.1 | ||
|
||
This patch follows the release of Reserve Auctions on mainnet to fix a few items outlined below: | ||
|
||
- fix usage of seller_funds_recipient address | ||
- add more attributes to certain contract events | ||
|
||
### Compile Instructions | ||
|
||
```sh | ||
docker run --rm -v "$(pwd)":/code --platform linux/amd64 \ | ||
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \ | ||
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ | ||
cosmwasm/workspace-optimizer:0.12.13 | ||
``` | ||
|
||
This results in the following SHA256 checksum: | ||
|
||
``` | ||
4e77dfe1830d5a33058502d19ef990773f45acfee7862ebb5355626c75bd0eb1 stargaze_reserve_auction.wasm | ||
``` | ||
|
||
### Verify On-chain Contract | ||
|
||
```sh | ||
starsd q gov proposal $id --output json \ | ||
| jq -r '.content.wasm_byte_code' \ | ||
| base64 -d \ | ||
| gzip -dc \ | ||
| sha256sum | ||
|
||
``` | ||
|
||
### Verify Local Contract | ||
|
||
``` | ||
sha256sum artifacts/stargaze_reserve_auction.wasm | ||
``` |
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 |
---|---|---|
@@ -1,22 +1,29 @@ | ||
RESERVE_AUCTION_ADDRESS=stars1pl77jpe2rrmtppv5tvs7d0g6xjq6smqxd879snksf2jwmuvxl6qs0jtvyt | ||
# MSG=$(cat <<EOF | ||
# { | ||
# "fair_burn": "stars1mp4dg9mst3hxn5xvcd9zllyx6gguu5jsp5tyt9nsfrtghhwj2akqudhls8" | ||
# } | ||
|
||
# EOF | ||
# ) | ||
|
||
# starsd tx wasm migrate $RESERVE_AUCTION_ADDRESS 2355 "$MSG" \ | ||
# --from testnet-1 --gas-prices 0.1ustars --gas-adjustment 1.7 --gas auto \ | ||
# -b block -o json | jq . | ||
|
||
RESERVE_AUCTION="stars1dnadsd7tx0dmnpp26ms7d66zsp7tduygwjgfjzueh0lg9t5lq5vq9kn47c" | ||
NEW_CODE_ID=123 | ||
MSG=$(cat <<EOF | ||
{ | ||
"config": {} | ||
} | ||
} | ||
EOF | ||
) | ||
|
||
starsd query wasm contract-state smart $RESERVE_AUCTION_ADDRESS "$MSG" -o json | jq . | ||
TITLE="Stargaze Live Auction v1.0.1" | ||
MARKDOWN="scripts/markdown/migrateContractReserveAuctionV1.0.1.md" | ||
DESCRIPTION=$(cat "$MARKDOWN" | base64 | tr -d '\n') | ||
|
||
FROM="hot-wallet" | ||
DEPOSIT="10000000000ustars" | ||
|
||
CHAIN_ID="stargaze-1" | ||
NODE="https://rpc.stargaze-apis.com:443" | ||
|
||
starsd tx gov submit-proposal migrate-contract "$RESERVE_AUCTION" $NEW_CODE_ID "$MSG" \ | ||
--title "$TITLE" \ | ||
--description "$(echo "$DESCRIPTION" | base64 --decode)" \ | ||
--from "$FROM" \ | ||
--deposit "$DEPOSIT" \ | ||
--chain-id "$CHAIN_ID" \ | ||
--node "$NODE" \ | ||
--gas-prices 1ustars \ | ||
--gas auto \ | ||
--gas-adjustment 1.5 |
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