NexusMutual / smart-contracts

GNU General Public License v3.0
170 stars 62 forks source link

feat: v1 NXM push #1232

Closed rackstar closed 1 month ago

rackstar commented 2 months ago

Context

Closes https://github.com/NexusMutual/smart-contracts/issues/1215

NOTE: Not sure we should merge this as the code will only be used once. We can keep the branch to refer to it later if need be.

Scripts to find out v1 nxm details, accounting, gas estimates as well as v1 nxm push scripts

Account to execute txs:

Changes proposed in this pull request

v1 NXM push (the scripts that will be use for executing the push)

v1 NXM details:

Estimate gas:

Test plan

Checklist

Review

When reviewing a PR, please indicate intention in comments using the following emojis:

rackstar commented 2 months ago

@shark0der @MilGard91

There are quite a few scripts here but these are the ones that will execute the push:

Please prioritise these files in the review.

rackstar commented 2 months ago

This is the latest accounting as of 5th Sept

Screenshot 2024-09-05 at 17 05 49
rackstar commented 2 months ago

Execution Plan

It's best to run the script on one of our machines as it will be a long running process (waiting for gas fees to be favourable before executing txs)

  1. ssh into deployer box
  2. use the cover-expiration account to execute the txs
  3. run all v1 NXM scan scripts to get the latest state of v1-nxm owed to users
  4. run the v1 NXM accounting script to get the current state / balances
  5. execute the push txs early morning when the gasFees is low (ideally <= 2 gwei)
  6. keep an eye as the process will halt if there was an error
  7. restart push script until complete
  8. re-run v1 NXM scan scripts to ensure all V1 NXM is pushed
  9. repeat steps 4-8 until there are no more v1 NXM
rackstar commented 1 month ago

closing ticket as its a one time execution. will keep the branch if for some reason we need the scripts in the future