NethermindEth / near-sffl

https://nffl.nethermind.io/
MIT License
7 stars 7 forks source link

Improve anvil state and binding generation workflow #220

Open Hyodar opened 3 months ago

Hyodar commented 3 months ago

Currently, whenever the smart contracts are changed, some steps are required in a testing level. First, you should execute ./contracts/generate-go-bindings.sh to generate the new bindings using abigen, then execute tests/anvil/deploy-avs-save-anvil-state.sh or deploy-rollup-avs-save-anvil-state.sh depending on the contracts, which generates the new initial anvil state and the new deployment output addresses. Spawning an anvil instance in the background also sometimes fails. We need some thought into how to improve this workflow, in general getting it neater. IMO especially since we are using Go and it's pretty neat for CLI tools, we should get a small project CLI tool going that does everything - generates bindings and updates the anvil states for both rollup and mainnet devnets (even if one wasn't changed, doesn't matter) and drop the extra steps. We can also integrate other actions as specific commands.