mirror of
https://github.com/BiPhan4/DefiHackathon-2022.git
synced 2025-04-02 10:41:42 -04:00
14 lines
516 B
JavaScript
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);
|
|
});
|