aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/bind/template.go
diff options
context:
space:
mode:
authorJeremy Schlatter <jeremy.schlatter@gmail.com>2018-10-06 04:24:54 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-10-06 04:24:54 +0800
commit5ed3960b9b2f699233452fb8445c5f9feb281f78 (patch)
treeeaabc155b73fc6cffc0566085abc17e00a36ed27 /accounts/abi/bind/template.go
parent5b0c9c8ae5f23b760992b6160a59b261be0d09d7 (diff)
downloaddexon-5ed3960b9b2f699233452fb8445c5f9feb281f78.tar
dexon-5ed3960b9b2f699233452fb8445c5f9feb281f78.tar.gz
dexon-5ed3960b9b2f699233452fb8445c5f9feb281f78.tar.bz2
dexon-5ed3960b9b2f699233452fb8445c5f9feb281f78.tar.lz
dexon-5ed3960b9b2f699233452fb8445c5f9feb281f78.tar.xz
dexon-5ed3960b9b2f699233452fb8445c5f9feb281f78.tar.zst
dexon-5ed3960b9b2f699233452fb8445c5f9feb281f78.zip
accounts/abi/bind: stop using goimports in the binding generator (#17768)
Diffstat (limited to 'accounts/abi/bind/template.go')
-rw-r--r--accounts/abi/bind/template.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/accounts/abi/bind/template.go b/accounts/abi/bind/template.go
index 7202ee67a..02d0258e0 100644
--- a/accounts/abi/bind/template.go
+++ b/accounts/abi/bind/template.go
@@ -64,6 +64,30 @@ const tmplSourceGo = `
package {{.Package}}
+import (
+ "math/big"
+ "strings"
+
+ ethereum "github.com/ethereum/go-ethereum"
+ "github.com/ethereum/go-ethereum/accounts/abi"
+ "github.com/ethereum/go-ethereum/accounts/abi/bind"
+ "github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/core/types"
+ "github.com/ethereum/go-ethereum/event"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var (
+ _ = big.NewInt
+ _ = strings.NewReader
+ _ = ethereum.NotFound
+ _ = abi.U256
+ _ = bind.Bind
+ _ = common.Big1
+ _ = types.BloomLookup
+ _ = event.NewSubscription
+)
+
{{range $contract := .Contracts}}
// {{.Type}}ABI is the input ABI used to generate the binding from.
const {{.Type}}ABI = "{{.InputABI}}"