Run through the full script
This commit is contained in:
+32
-7
@@ -1,22 +1,37 @@
|
||||
## Setup
|
||||
|
||||
Start chain:
|
||||
|
||||
```sh
|
||||
./scripts/cosm/start.sh
|
||||
```
|
||||
|
||||
```sh
|
||||
cd packages/cli
|
||||
./bin/cosmwasm-cli --init examples/helpers.ts
|
||||
```
|
||||
|
||||
```js
|
||||
const account = (await client.authAccounts(faucetAddress)).result.value;
|
||||
account
|
||||
|
||||
client.listCodeInfo()
|
||||
client.listContractAddresses()
|
||||
```
|
||||
|
||||
## Deploy Contract
|
||||
|
||||
```sh
|
||||
node ./scripts/cosm/deploy_erc20.js
|
||||
```
|
||||
|
||||
## Make account
|
||||
|
||||
```sh
|
||||
cd packages/cli
|
||||
./bin/cosmwasm-cli --init examples/helpers.ts
|
||||
```
|
||||
|
||||
Now, check it and init/execute contracts:
|
||||
|
||||
```js
|
||||
const account = (await client.authAccounts(faucetAddress)).result.value;
|
||||
account
|
||||
|
||||
// see it is now deployed
|
||||
client.listCodeInfo()
|
||||
client.listContractAddresses()
|
||||
|
||||
@@ -34,6 +49,16 @@ const foo = await instantiateContract(client, pen, 1, initMsg);
|
||||
|
||||
client.queryContractSmart(foo, { balance: { address: faucetAddress } })
|
||||
|
||||
const rcpt = await randomAddress();
|
||||
rcpt
|
||||
client.queryContractSmart(foo, { balance: { address: rcpt } })
|
||||
|
||||
const execMsg = { transfer: {recipient: rcpt, amount: "808"}}
|
||||
const exec = await executeContract(client, pen, foo, execMsg);
|
||||
exec
|
||||
client.queryContractSmart(foo, { balance: { address: rcpt } })
|
||||
|
||||
|
||||
// TODO: unused account
|
||||
// TODO: execute and send tokens
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user