package
1.0.11
Repository: https://github.com/dappnode/mev-sp-oracle.git
Documentation: pkg.go.dev

# README

# contract

The content of this folder is automatically generated from the smoothing pool smart contract. The are two components that can be generated as follows. Note that if the smart contract changes, this would need to be updated:

  • abi.abi
  • contract.go

Generating abi.go

This contains the smart contract abi. If the contract is verified in etherscan, it can be copied from there. Example see "Contract ABI" section. Make sure you get the abi of the contract itself and not the proxy.

Generating contract.go

With the abi, now we can generate the contract.go file using abigen. This allows to easily interact with the contract using golang. First you need to install abigen.

git clone https://github.com/ethereum/go-ethereum.git
cd go-ethereum
go build ./cmd/abigen

And now from the root of this repo, generate the contract.

./abigen --abi=../mev-sp-oracle/contract/abi.abi --pkg=contract --out=../mev-sp-oracle/contract/contract.go