-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# op-bindings | ||
|
||
This package contains built go bindings of the smart contracts. It must be | ||
updated after any changes to the smart contracts to ensure that the bindings are | ||
up to date. | ||
|
||
The bindings include the bytecode for each contract so that go based tests | ||
can deploy the contracts. There are also `more` files that include the deployed | ||
bytecode as well as the storage layout. These are used to dynamically set | ||
bytecode and storage slots in state. | ||
|
||
## Dependencies | ||
|
||
- `abigen` | ||
- `make` | ||
|
||
## abigen | ||
|
||
The `abigen` tool is part of `go-ethereum` and can be used to build go bindings | ||
for smart contracts. It can be installed with go using the commands: | ||
|
||
```bash | ||
$ go get -u github.com/ethereum/go-ethereum | ||
$ cd $GOPATH/src/github.com/ethereum/go-ethereum/ | ||
$ make devtools | ||
``` | ||
|
||
The geth docs for `abigen` can be found [here](https://geth.ethereum.org/docs/dapp/native-bindings). |