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
Executing the following code encountered the following error
---code---
package main
import (
"fmt"
"log"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
)
func main() {
conn, err := ethclient.Dial("https://mainnet.infura.io")
if err != nil {
log.Fatalf("Failed to connect to the Ethereum network: %v", err)
}
contract, err := NewTronToken(common.HexToAddress("0x3459748F010d56203b2379BB2Fe9FB4e9AEFfd23"), conn)
if err != nil {
log.Fatalf("Failed to instantiate contract: %v", err)
}
amt, _ := contract.BalanceOf(&bind.CallOpts{}, common.HexToAddress("0x6Fe99132E282686F9976dD5DA69c26aB69A665a3"))
fmt.Println(amt)
}
---error----
bardia@kzm:/media/bardia/code/goether$ go run main.go token.go
command-line-arguments
./token.go:121:30: not enough arguments in call to bind.NewBoundContract
have (common.Address, abi.ABI, bind.ContractCaller, bind.ContractTransactor)
want (common.Address, abi.ABI, bind.ContractCaller, bind.ContractTransactor, bind.ContractFilterer)
The text was updated successfully, but these errors were encountered:
Executing the following code encountered the following error
---code---
package main
import (
"fmt"
"log"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
)
func main() {
conn, err := ethclient.Dial("https://mainnet.infura.io")
if err != nil {
log.Fatalf("Failed to connect to the Ethereum network: %v", err)
}
contract, err := NewTronToken(common.HexToAddress("0x3459748F010d56203b2379BB2Fe9FB4e9AEFfd23"), conn)
if err != nil {
log.Fatalf("Failed to instantiate contract: %v", err)
}
amt, _ := contract.BalanceOf(&bind.CallOpts{}, common.HexToAddress("0x6Fe99132E282686F9976dD5DA69c26aB69A665a3"))
fmt.Println(amt)
}
---error----
bardia@kzm:/media/bardia/code/goether$ go run main.go token.go
command-line-arguments
./token.go:121:30: not enough arguments in call to bind.NewBoundContract
have (common.Address, abi.ABI, bind.ContractCaller, bind.ContractTransactor)
want (common.Address, abi.ABI, bind.ContractCaller, bind.ContractTransactor, bind.ContractFilterer)
The text was updated successfully, but these errors were encountered: