Skip to content

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