Counter Smart Contract in JS
export async function handle(state, action) { const input = action.input; if (input.function === "increment") { state.counter += 1; state.users.push(lambda.msg.sender); return { state }; } }
{ "counter": 0, "users": [] }
Last updated 5 months ago