File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,9 +75,10 @@ Parse the `localToken` field from the receipt to get your L2 token address.
7575
7676``` bash
7777# Extract the L2 token address from the event logs
78- # topic[0] is keccak256("OptimismMintableERC20Created(address,address,address)")
78+ # topics[0] is keccak256("OptimismMintableERC20Created(address,address,address)")
79+ # topics[1] is the L2 token address ABI-encoded as a 32-byte padded value; [26:] strips the leading zeros
7980cast receipt $TX_HASH --rpc-url $L2_RPC --json \
80- | jq ' .logs[] | select(.topics[0] == "0x52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb") | .topics[1]'
81+ | jq -r ' .logs[] | select(.topics[0] == "0x52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb") | "0x" + .topics[1][26: ]'
8182```
8283
8384{% endstep %}
You can’t perform that action at this time.
0 commit comments