Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support parse human readable function signature to abi json #3427

Closed
yihuang opened this issue Mar 26, 2022 · 4 comments
Closed

Support parse human readable function signature to abi json #3427

yihuang opened this issue Mar 26, 2022 · 4 comments

Comments

@yihuang
Copy link

yihuang commented Mar 26, 2022

similar to ethersjs's parseSignature function.

@anonymous-sushi
Copy link

Need this please!
some way to convert
constructor(string symbol, string name)
to ["string","string]

tuple {
uint256 foo,
bytes[] bar,
}
function(string symbol, tuple name)
to ["string","uint256","bytes[]"]

https://docs.ethers.io/v5/api/utils/abi/formats/#abi-formats--human-readable-abi

@0xSt1ng3R
Copy link

0xSt1ng3R commented Jan 21, 2024

@0xSt1ng3R
Copy link

+1

https://github.com/blockpipe/eth-abi-parser

wrote a working lib for that:
https://github.com/0xSt1ng3R/abi-dehumanizer

@pacrob pacrob transferred this issue from ethereum/eth-abi Jul 1, 2024
@pacrob
Copy link
Contributor

pacrob commented Jul 1, 2024

I think collapse_if_tuple from the eth_abi library should solve your problem. Please re-open if not.

@pacrob pacrob closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants