Abigen sol
Is abigen command removed "sol" flag? I was able to run
abigen --sol=contract.sol --pkg=pkg --out=pkg/solidity_wrapper/token.go
but now I can't. I get error of flag provided but not defined: -sol
yeap.
This is the commit that removed the sol, solc flag. 8541ddbd951370b2a42df8d82b0633ff0efeba12
note this : https://geth.ethereum.org/docs/dapp/native-bindings
This is not good. How to generate a single binding from a contract that has multiple contract in it?
$ ls
Contract1.sol Contract2.sol Main.sol
---
import "./Contract1.sol";
import "./Contract2.sol";
Contract Main is Contract1, Contract2 {
.
.
.
}
---
$ solc --abi Main.sol -o build
$ abigen --abi ./build/Main.abi --pkg main --type Main --out Main.go
Like this. Doesn't it work?
Not really. It still generates three different abi file which I have to pass one by one to abigen.
Can you provide an example for your case? What's the relationship between your three abi files? Maybe only one is required for binding generation?
Theoretically you can use the output from solc compiler and pass it to abigen. It shouldn't break your pipeline at all.
I can't produce abi with hardhat nor foundry... I tried to do it with solc but it doesn't find any dependency...
Try to use combined-json
Yes we deprecated the -sol flag in abigen. Contracts need to be compiled with solc and we can consume the abi and bin files from that. Will close this issue for now, for advice on how to compile multiple contracts into a single abi, please consult the solidity compiler repository or the ethereum stack exchange.