Skip to content

feat(cast): add abi-encode-event command #11300

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

shiyasmohd
Copy link
Contributor

Solution

Implemented cast abi-encode-event command that encodes event signatures & args into topics and data.

Example Usage

cast abi-encode-event "Transfer(address indexed from, address indexed to, uint256 value)" 0x1234567890123456789012345678901234567890 0xabcdefabcdefabcdefabcdefabcdefabcdefabcd 1000

Output

[topic0]: 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
[topic1]: 0x0000000000000000000000001234567890123456789012345678901234567890
[topic2]: 0x000000000000000000000000abcdefabcdefabcdefabcdefabcdefabcdefabcd
[data]: 0x00000000000000000000000000000000000000000000000000000000000003e8

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Closes #10905

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

feat(cast abi-encode-event): add support for event encoding to get topics and data
1 participant