You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Geth version: v1.9.25
OS & Version: Linux
Commit hash : (if develop)
Expected behaviour
Running abigen on the ABI of a smart contract should generate valid go code. I guess the regression bug has been introduced by #21020. The project go-solidity-sha3 had the same issue.
The correct code is the following:
// Code generated - DO NOT EDIT.// This file is a generated binding and any manual changes will be lost.package eth
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/common/math""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_=math.U256Bytes_=bind.Bind_=common.Big1_=types.BloomLookup_=event.NewSubscription
)
Actual behaviour
The compiler complains that in the generated code U256 not declared by package abi
// Code generated - DO NOT EDIT.// This file is a generated binding and any manual changes will be lost.package eth
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// 🚨🚨🚨 This is wrong: "U256 not declared by package abi" 🚨🚨🚨_=bind.Bind_=common.Big1_=types.BloomLookup_=event.NewSubscription
)
Steps to reproduce the behaviour
Run abigen on any abi file.
The text was updated successfully, but these errors were encountered:
System information
Geth version:
v1.9.25
OS & Version: Linux
Commit hash : (if
develop
)Expected behaviour
Running
abigen
on the ABI of a smart contract should generate valid go code. I guess the regression bug has been introduced by #21020. The projectgo-solidity-sha3
had the same issue.The correct code is the following:
Actual behaviour
The compiler complains that in the generated code
U256 not declared by package abi
Steps to reproduce the behaviour
Run
abigen
on any abi file.The text was updated successfully, but these errors were encountered: