optimistic-specs
optimistic-specs copied to clipboard
go: Better handle solidity bindings
We would like to address the following issues:
- Ensure that the compiler version is deterministic and locked
- We do this with solidity pragmas for version
0.8.10
, but should be better
- We do this with solidity pragmas for version
- We want a CI check that ensures that if a contract changes, the go bindings also change
- We may want to restructure where contract bindings are located / how they are built
- The output oracle contract bindings are split from the opnode contract bindings requiring two makefile invocations
- The opnode contracts are built in a specific folder. That makefile should probably be lifted to the main makefile (or we should add recursive make)
foundry
is supportive of adding forge bind go
which would use abigen
to build bindings
The bindings have a separate go module now, with a single makefile, which is checked in CI to be equal to the bindings that are generated from the latest contracts: https://github.com/ethereum-optimism/optimistic-specs/pull/446
Aside from compiler-version locking I think this issue can be closed.
The compiler version is locked by foundry, it's the version of abigen that is not locked. Currently we use latest, as the check in ci uses the master branch of geth to install abigen