nahmii-contracts
nahmii-contracts copied to clipboard
Export state from all contracts
Description
Export of state of a number of contracts is needed for the possible redeployment of updated contracts. The concerned contracts include but is not limited to CancelOrdersChallenge
, DriipSettlementChallenge
, FraudChallenge
, Exchange
, RevenueFund
, ReserveFund
and SecurityBond
. Contracts containing ETH and token balances have to be able to transfer funds to new contract instance.
ClientFund
and ReserveFund
already have mechanism in place from their stageTo()
functions that can be used to transfer user balances. However, aggregate balances are not covered by this function.
Definition of done
- All concerned contracts support export of state including transfer of ETH and token balances.
- Unit test have been updated.
Details & Questions
Depends on
If favor of the future project that allows anyone to monitor the activity and check for possible frauds, we can:
- Make all variables public or add getters.
- Add a
Lockdown
base class to completely block any operation on this contract while the upgrade is in progress (also might help if a key is stolen)