Skip to content

Conversation

rackstar
Copy link
Contributor

@rackstar rackstar commented Sep 4, 2024

Context

Closes #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:

  • we can re-use the cover-expiration account 0xdd0f34762468db72d74f8cd27d7fd52793597238 - 0.97 ETH
  • should be enough if we execute it when fees are very low
  • but we might need to top it up soon for further cover-expiration txs

Changes proposed in this pull request

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

  • v1-nxm-push.js
  • v1-nxm-push-utils.js

v1 NXM details:

  • v1-cla-locked.js
  • v1-cn-locked.js
  • v1-stake-rewards.js
  • v1-nxm-accounting

Estimate gas:

  • v1-nxm-gas-estimate

Test plan

Checklist

  • Rebased the base branch
  • Attached corresponding Github issue
  • Prefixed the name with the type of change (i.e. feat, chore, test)
  • Performed a self-review of my own code
  • Followed the style guidelines of this project
  • Made corresponding changes to the documentation
  • Didn't generate new warnings
  • Didn't generate failures on existing tests
  • Added tests that prove my fix is effective or that my feature works

Review

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

  • 🍰 = Nice to have but not essential.
  • 💡 = Suggestion or a comment based on personal opinion
  • 🔨 = I believe this should be changed.
  • 🤔 = I don’t understand something, do you mind giving me more context?
  • 🚀 = Feedback

@rackstar rackstar self-assigned this Sep 4, 2024
@rackstar rackstar marked this pull request as draft September 4, 2024 14:02
@rackstar rackstar changed the title Feat/v1 nxm feat: v1 NXM push Sep 4, 2024
@rackstar rackstar linked an issue Sep 4, 2024 that may be closed by this pull request
6 tasks
@rackstar
Copy link
Contributor Author

rackstar commented Sep 4, 2024

@shark0der @MilGard91

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

  • v1-nxm-push.js
  • v1-nxm-push-utils.js

Please prioritise these files in the review.

@rackstar rackstar force-pushed the feat/v1-nxm branch 4 times, most recently from 62f7f8a to 2c1d237 Compare September 4, 2024 16:48
@rackstar
Copy link
Contributor Author

rackstar commented Sep 5, 2024

This is the latest accounting as of 5th Sept
Screenshot 2024-09-05 at 17 05 49

@rackstar
Copy link
Contributor Author

rackstar commented Sep 5, 2024

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
Copy link
Contributor Author

rackstar commented Oct 3, 2024

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

@rackstar rackstar closed this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v1 NXM push and deprecate
2 participants