sophia/test/contracts/builtin_map_get_bug.aes
2019-06-28 09:42:28 +02:00

9 lines
259 B
Plaintext

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