-
Notifications
You must be signed in to change notification settings - Fork 2
/
check.js
38 lines (35 loc) · 1.12 KB
/
check.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env -S yarn node
const { calculateFee, GasPrice } = require("@cosmjs/stargate");
const { fromBase64, toHex, toUtf8 } = require("@cosmjs/encoding");
const { toBinary } = require("@cosmjs/cosmwasm-stargate");
const utils = require('./utils');
async function main() {
const config = await utils.getChainConfig()
const coinConfig = await utils.getChainCoinConfig(config)
const userWallet = await utils.getLabelledWallet(config, utils.agentnyms[0])
const user = await utils.getAgentClient(config, utils.agentnyms[0])
const iftttSimpleWallet = await utils.getLabelledWallet(config, utils.catnyms[1])
const iftttSimpleContract = `${iftttSimpleWallet.contractAddress}`
console.log('iftttSimpleContract', iftttSimpleContract);
try {
const q_tx = await user.queryContractSmart(
iftttSimpleContract,
{ get_count: {} },
// { check_modulo: {} },
);
console.log('get', q_tx);
} catch (e) {
console.log('GET FAILED', e);
return;
}
}
main().then(
() => {
console.info("All meows complete.");
process.exit(0);
},
(error) => {
console.error(error);
process.exit(1);
},
);