aboutsummaryrefslogtreecommitdiffstats
path: root/eth/bind.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/bind.go')
-rw-r--r--eth/bind.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/eth/bind.go b/eth/bind.go
index e5abd8617..0385db1f9 100644
--- a/eth/bind.go
+++ b/eth/bind.go
@@ -54,14 +54,12 @@ func NewContractBackend(apiBackend ethapi.Backend) *ContractBackend {
// CodeAt retrieves any code associated with the contract from the local API.
func (b *ContractBackend) CodeAt(ctx context.Context, contract common.Address, blockNum *big.Int) ([]byte, error) {
- out, err := b.bcapi.GetCode(ctx, contract, toBlockNumber(blockNum))
- return common.FromHex(out), err
+ return b.bcapi.GetCode(ctx, contract, toBlockNumber(blockNum))
}
// CodeAt retrieves any code associated with the contract from the local API.
func (b *ContractBackend) PendingCodeAt(ctx context.Context, contract common.Address) ([]byte, error) {
- out, err := b.bcapi.GetCode(ctx, contract, rpc.PendingBlockNumber)
- return common.FromHex(out), err
+ return b.bcapi.GetCode(ctx, contract, rpc.PendingBlockNumber)
}
// ContractCall implements bind.ContractCaller executing an Ethereum contract