From 57e13591cce2929248da3ddb9c2ddbeabee0f95d Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Mon, 2 Dec 2024 14:58:05 +0700 Subject: [PATCH] small cleanups --- accounts/abi/bind/base.go | 6 +----- accounts/abi/bind/bind.go | 1 - accounts/abi/bind/lib.go | 28 ---------------------------- 3 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 accounts/abi/bind/lib.go diff --git a/accounts/abi/bind/base.go b/accounts/abi/bind/base.go index 690766f7b5..2ae92391a3 100644 --- a/accounts/abi/bind/base.go +++ b/accounts/abi/bind/base.go @@ -403,11 +403,7 @@ func (c *BoundContract) estimateGasLimit(opts *TransactOpts, contract *common.Ad Value: value, Data: input, } - res, err := c.transactor.EstimateGas(ensureContext(opts.Context), msg) - if err != nil { - return 0, err - } - return res, nil + return c.transactor.EstimateGas(ensureContext(opts.Context), msg) } func (c *BoundContract) getNonce(opts *TransactOpts) (uint64, error) { diff --git a/accounts/abi/bind/bind.go b/accounts/abi/bind/bind.go index 59b04926e8..ea4ed55540 100644 --- a/accounts/abi/bind/bind.go +++ b/accounts/abi/bind/bind.go @@ -393,7 +393,6 @@ func bind(types []string, abis []string, bytecodes []string, fsigs []map[string] } } } - // Check if that type has already been identified as a library for i := 0; i < len(types); i++ { _, ok := isLib[types[i]] diff --git a/accounts/abi/bind/lib.go b/accounts/abi/bind/lib.go deleted file mode 100644 index 2ffb0dec51..0000000000 --- a/accounts/abi/bind/lib.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2023 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package bind - -import ( - "github.com/ethereum/go-ethereum/common" -) - -// ContractInstance provides means to interact with -// a deployed contract. -type ContractInstance interface { - Address() common.Address - Backend() ContractBackend -}