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

[Ethereum]: Support obtaining the function signature from an Ethereum function ABI #4182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

10gic
Copy link
Contributor

@10gic 10gic commented Dec 19, 2024

Description

The function signature is useful for indicating the intended contract call and for computing the 4-byte selector.

There is a similar function, tw_ethereum_abi_function_get_signature, in the code; however, it is not exported, and its input argument is difficult to construct. Therefore, I added a new function named EthereumAbi.getFunctionSignature. This new function accepts an ABI JSON string as an argument, making it very easy to use.

How to test

Run Rust, C++, iOS, Android tests

Types of changes

Checklist

  • Create pull request as draft initially, unless its complete.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • If there is a related Issue, mention it in the description.

If you're adding a new blockchain

  • I have read the guidelines for adding a new blockchain.

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

Successfully merging this pull request may close these issues.

1 participant