nahmii-contracts icon indicating copy to clipboard operation
nahmii-contracts copied to clipboard

Export state from all contracts

Open jijordre opened this issue 6 years ago • 1 comments

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

jijordre avatar Jun 29 '18 10:06 jijordre

If favor of the future project that allows anyone to monitor the activity and check for possible frauds, we can:

  1. Make all variables public or add getters.
  2. 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)

mxmauro avatar Jul 10 '18 13:07 mxmauro