DefiHackathon-2022/tasks/example-lcd-client-extra.js
2022-03-26 16:36:38 -04:00

14 lines
516 B
JavaScript

const { task } = require("@iboss/terrain");
task(async ({ wallets, refs, config, client }) => {
// query is a thin wrapper of contract query
const count = await client.query("counter", { get_count: {} });
console.log("prev count = ", count);
// execute is a thin wrapper of signing and broadcasting execute contract
await client.execute(wallets.validator, "counter", {
increment: {},
});
const count2 = await client.query("counter", { get_count: {} });
console.log("new count = ", count2);
});