sophia/test/contracts/builtin_map_get_bug.aes
2018-12-22 01:23:40 +01:00

13 lines
301 B
Plaintext

contract TestContract =
record state = {
_allowed : map(address, map(address, int))}
public stateful function init() = {
_allowed = {}}
public stateful function approve(spender: address, value: int) : bool =
put(state{_allowed[Call.caller][spender] = value})
true