add GetContractCode
This commit is contained in:
parent
db4457a65f
commit
663e8543c9
2
go.mod
2
go.mod
@ -127,4 +127,4 @@ require (
|
||||
rsc.io/tmplfunc v0.0.3 // indirect
|
||||
)
|
||||
|
||||
replace github.com/openrelayxyz/plugeth-utils => git.vdb.to/cerc-io/plugeth-utils v0.0.0-20230614134222-d8d1347863d8
|
||||
replace github.com/openrelayxyz/plugeth-utils => git.vdb.to/cerc-io/plugeth-utils v0.0.0-20230622072028-1d3da8ce80ee
|
||||
|
1
go.sum
1
go.sum
@ -1,6 +1,7 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
git.vdb.to/cerc-io/plugeth-utils v0.0.0-20230614134222-d8d1347863d8 h1:ey1JrByQ0PJBvlGaYcCPNQT++Halj3LF75GR0wq8/Iw=
|
||||
git.vdb.to/cerc-io/plugeth-utils v0.0.0-20230614134222-d8d1347863d8/go.mod h1:p5Jc8deG2yxXI8DzmrH3kHNEwlQqcOQS0pmGulsqg+M=
|
||||
git.vdb.to/cerc-io/plugeth-utils v0.0.0-20230622072028-1d3da8ce80ee/go.mod h1:p5Jc8deG2yxXI8DzmrH3kHNEwlQqcOQS0pmGulsqg+M=
|
||||
github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 h1:qoVeMsc9/fh/yhxVaA0obYjVH/oI/ihrOoMwsLS9KSA=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM=
|
||||
|
@ -11,8 +11,9 @@ import (
|
||||
"github.com/ethereum/go-ethereum"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
gcore "github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/core/state"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/event"
|
||||
"github.com/ethereum/go-ethereum/internal/ethapi"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
@ -487,7 +488,6 @@ func (b *Backend) GetAccountTrie(stateRoot core.Hash, account core.Address) (cor
|
||||
return NewWrappedTrie(acTr), nil
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func (b *Backend) GetContractCode(h core.Hash) ([]byte, error) {
|
||||
return state.NewDatabase(b.b.ChainDb()).ContractCode(common.Hash{}, common.Hash(h))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user