LOoking at https://compound.finance/developers, there is ABI file for cDAI, but if I would want to develop something in solidity, how should I "import" those ABIs? Is there a way of converting those to .sol, or is there some .sol someone already did?

Jul 27, 2019, 10:18 AM
Nope
Abi is to interact with contracts from javascript
For solidity you will have to write interface for compound
Jul 27, 2019, 10:20 AM
I am surprised there is no one having written a tool to convert the ABI back to a solidity interface/abstract contract yet...
or there is?
Jul 27, 2019, 10:21 AM
I don't think such tool exist
How can you convert abi to solidity
That's not possible imo
Jul 27, 2019, 10:22 AM
if I can read and hand write, why not a machine can...
https://compound.finance/developers/abi/mainnet/cDAI for example, basicially copy paste the input output parameters, etc.
Jul 27, 2019, 10:24 AM
Abi doesn't has logic of underlying contracts
Jul 27, 2019, 10:24 AM
what I need is the interface
Jul 27, 2019, 10:24 AM
Just function hashes
Yupp in solidity
Jul 27, 2019, 10:24 AM
Maxme has done some significant work on this

https://www.npmjs.com/package/abi2solidity
Also check this out

https://bia.is/tools/abi2solidity/
Jul 27, 2019, 11:15 AM
oh thanks @abhi_tele !
if you told me earlier, I would have saved my hassle of writting a quick one just now
https://gist.github.com/hellwolf/71779776003a99b82dd641f76e420e63
:D
abi2solidity seems what I need anyhow
Jul 27, 2019, 11:16 AM
Admins can't be online all the time ;p

But anyhow, keep up the good work and keep sharing your thoughts here๐Ÿ˜ƒ
Jul 27, 2019, 11:23 AM
I found everything I need about compound from the docs, but I wanted a tool like that too ๐Ÿ™ˆ
Jul 27, 2019, 11:46 PM
Yupp thanks for that tool it saved my time
Never knew it existed
is there a similar tool for vyper
Jul 28, 2019, 12:35 AM

ยฉ 2024 Draquery.com All rights reserved.