Hi friends, I have a question regarding state changes via calling contract functions in a State Channel. Suppose I have a function f
in a state channel which changes state:
public stateful function f() =
put(state{var1 = 1 })
put(state{var2 = 2 })
Also, get_var1() should retrieve the var1 current value:
public function get_var1() : int =
state.var1
If I do the following stateful call in a state channel:
const callData = await player.contractEncodeCallDataAPI(ctr_bytecode, "f",[]);
const result = await channel.callContract({
amount: 0,
callData,
contract: contract_address,
abiVersion: 1
}, async (tx) => await signer_func(tag, tx)
);
Should I be able to immediately get the current state after the call via get_var1()
?