One way to do this is to define a Uint128 field in the contract for it, and have SRTL access this contract variable (foraccept handling and for final balance).
Alternatively, it could be completely tracked in SRTL and accesses to it in the contract will translate to a _get_balance() SRTL call.
Balance is already treated as any other field, resulting in an IPC fetch call. Just needs special handling in RTL which is taken care of by https://github.com/Zilliqa/scilla-rtl/issues/34.
Support for reading
_balance
is missing.One way to do this is to define a
Uint128
field in the contract for it, and have SRTL access this contract variable (foraccept
handling and for final balance).Alternatively, it could be completely tracked in SRTL and accesses to it in the contract will translate to a
_get_balance()
SRTL call.