-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add st.balance consistent with contract_balance #28
Add st.balance consistent with contract_balance #28
Conversation
I think the assumption mentioned in the first item is unnecessary since the balance field is initialized appropriately as the third item. For the unknown contract, you can put a corresponding assumption for the initializing code.
|
3aa76eb
to
24c464a
Compare
As you suggested, I removed balance-related assumptions from dispatchings and added them in the unknown function as follows instead.
|
731eb5c
into
SoftwareFoundationGroupAtKyotoU:master
This MR introduces the
st.balance
parameter, which corresponds to theBALANCE
Michelson op.This MR adds the following codes.
st.balance = c.[dst_contract_name]_balance + st.amount
is added.st.balance = c.[contract_name]_balance + st.amount
is added as therequire
closue of eachcontract_func
s.Xfer
op in the contracts, thest.balance
field is initialized with the appropriate value. (For the unknown case, I initialized it with 0 for now.)This MR also adds https://github.com/satos---jp/icon-why3/blob/satos%40add-balance/examples/test_balance.tzw which tests
st.balance
.(In addition, this MR contains a commit irrelevant to
st.balance
, which fixes https://github.com/satos---jp/icon-why3/blob/satos%40add-balance/examples/neg/entrypoints.tzw )