Zilliqa / scilla-compiler

Compile Scilla to LLVM-IR
GNU General Public License v3.0
7 stars 4 forks source link

Support `_balance` #73

Closed vaivaswatha closed 3 years ago

vaivaswatha commented 3 years ago

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.

vaivaswatha commented 3 years ago

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.

Closing.