We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0814d99 commit 4d9d728Copy full SHA for 4d9d728
accounts/abi/abigen/bind.go
@@ -33,6 +33,10 @@ import (
33
"github.com/ethereum/go-ethereum/log"
34
)
35
36
+var (
37
+ intRegex = regexp.MustCompile(`(u)?int([0-9]*)`)
38
+)
39
+
40
func isKeyWord(arg string) bool {
41
switch arg {
42
case "break":
@@ -299,7 +303,7 @@ func bindBasicType(kind abi.Type) string {
299
303
case abi.AddressTy:
300
304
return "common.Address"
301
305
case abi.IntTy, abi.UintTy:
302
- parts := regexp.MustCompile(`(u)?int([0-9]*)`).FindStringSubmatch(kind.String())
306
+ parts := intRegex.FindStringSubmatch(kind.String())
307
switch parts[2] {
308
case "8", "16", "32", "64":
309
return fmt.Sprintf("%sint%s", parts[1], parts[2])
0 commit comments