Closed Hanggi closed 3 years ago
Could you please post the definition of lib/contracts/contract.abi.json
?
I even tried the abi.json file in example, but got the save error. https://github.com/simolus3/web3dart/blob/master/example/token.abi.json
I extracted the abi json file from truffle build, which copied the content of abi property.
And I can also generate .go file successfully by following abigen command:
$ abigen --abi build/contract.abi --pkg contract --out contract.go
The contract.abi file is totally same as the contract.abi.json file. So I think there is no problem with the abi.json file.
(Are there any thing I can have a try to solve the error?) Thank you
I got the same issue, abi is copied from here: https://bscscan.com/address/0xb92ab7c1edcb273aba24b0656ceb3681654805d2#code
It's solved...
contract.abi.json
was not real command I executed.
The real abi.json file name was 'order-contract' which contains '-' , it results the generated class name is class order-contract
.
Maybe we need add some hints to README.md file? lol
Run
pub run build_runner build
got error following: