diff --git a/contracts/checkpointoracle/oracle.go b/contracts/checkpointoracle/oracle.go index 0d44a35587f77edfbc0ae3f608f9fd1d0410b57e..879f986bb2a64271643d04cf5e31a0e92eda57c0 100644 --- a/contracts/checkpointoracle/oracle.go +++ b/contracts/checkpointoracle/oracle.go @@ -29,8 +29,9 @@ import ( "github.com/ledgerwatch/turbo-geth/core/types" ) -// CheckpointOracle is a Go wrapper around an on-chain light client checkpoint oracle. +// CheckpointOracle is a Go wrapper around an on-chain checkpoint oracle contract. type CheckpointOracle struct { + address common.Address contract *contract.CheckpointOracle } @@ -40,7 +41,12 @@ func NewCheckpointOracle(contractAddr common.Address, backend bind.ContractBacke if err != nil { return nil, err } - return &CheckpointOracle{contract: c}, nil + return &CheckpointOracle{address: contractAddr, contract: c}, nil +} + +// ContractAddr returns the address of contract. +func (oracle *CheckpointOracle) ContractAddr() common.Address { + return oracle.address } // Contract returns the underlying contract instance.