You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[cosmwasm] Deploy tool: Add new commands (update contract admin + get contract info) (#473)
* add terra local config
* terra update admin and contract info
* osmosis update admin and contract info
* update deployer interface
* injective update admin and contract info
* refactor yargs structure
* update injective sdk ts library
* update readme.md
* error handling for update admin code
* fix typo
* move logging to the calling function
* comment the update admin method
Instantiated pyth at osmo1hzz0s0ucrhdp6tue2lxk3c03nj6f60qy463we7lgx0wudd72ctms64096d (0xb884f83f981dda1d2f9957cd68e1f19cb49d3c04aea2ecfbe833ddc6b7cac2f7)
57
+
Deployed Pyth contract at osmo1hzz0s0ucrhdp6tue2lxk3c03nj6f60qy463we7lgx0wudd72ctms64096d
63
58
```
64
59
65
60
### Migrating existing contract
66
61
67
-
If you want to upgrade an existing contract pass `--migrate --contract terra123456xyzqwe..` to the above command.
68
-
This command will upload the code, and with the resulting code id, will migrate the existing contract to the new one:
62
+
If you want to upgrade an existing contract pass use the `migrate` command as follows.
63
+
This command will upload the code, and with the given code id, will migrate the existing contract to the new one:
Contract osmo1hzz0s0ucrhdp6tue2lxk3c03nj6f60qy463we7lgx0wudd72ctms64096d code_id successfully updated to 9
83
75
```
84
76
85
-
### Common Errors
77
+
### Updating contract's admin
86
78
87
-
While running the instantiation/migration commands you might get the following errors:
79
+
Pyth contracts are owner of their own. To update a smart contract's admin use the following command.
88
80
89
-
- Gateway timeout: This error means that the request timed out. It is good to double check with terra finder as sometimes transactions succeed despite being timed out.
90
-
- Account sequence mismatch: Transactions from an account should have an increasing sequence number. This error happens when a transaction from the same sender is not fully synchronized with the terra RPC and an old sequence number is used. This is likely to happen because the deploy script sends two transactions: one to submit the code, and one to do the instantiation/migration.
You can rerun your command if you encounter any of the above errors. If an error occurs after the new code is uploaded, you can avoid re-uploading the code and use the uploaded code for instantiation/migration. You can use the printed code id in the logs
93
-
by passing `--code-id <codeId>` instead of `--artifact`. If you do so, the script will skip uploading the code and instantiate/migrate the contract with the given code id.
100
+
### Getting contract's info
94
101
95
-
An example command using an existing code id looks like so:
102
+
If you want to check a contract details, use the following command.
While running the instantiation/migration commands you might get the following errors:
125
+
126
+
- Gateway timeout: This error means that the request timed out. It is good to double check with terra finder as sometimes transactions succeed despite being timed out.
127
+
- Account sequence mismatch: Transactions from an account should have an increasing sequence number. This error happens when a transaction from the same sender is not fully synchronized with the terra RPC and an old sequence number is used. This is likely to happen because the deploy script sends two transactions: one to submit the code, and one to do the instantiation/migration.
128
+
129
+
Sometimes the output might have some node.js warning. But if you see a similar output as mentioned above. Transaction was successful.
0 commit comments