File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -358,6 +358,19 @@ enable-token token:
358358 sleep 0.5
359359 done
360360
361+ [group (' zone' )]
362+ [doc (' Lists TIP-20 token addresses currently enabled on the ZonePortal. Pass a portal address or set L1_PORTAL_ADDRESS. Requires L1_RPC_URL.' )]
363+ list-enabled-tokens portal = " ":
364+ #!/ bin/ bash
365+ set -euo pipefail
366+ RPC=" ${L1_RPC_URL:?Set L1_RPC_URL env var}"
367+ PORTAL=" {{ portal}} "
368+ if [[ -z " $PORTAL" ]]; then
369+ PORTAL=" ${L1_PORTAL_ADDRESS:?Set L1_PORTAL_ADDRESS env var or pass a portal address}"
370+ fi
371+ HTTP_RPC=$(echo " $RPC" | sed ' s|^wss://|https://|' | sed ' s|^ws://|http://|' )
372+ for ((i=0,n=$(cast call " $PORTAL" " enabledTokenCount()(uint256)" --rpc-url " $HTTP_RPC" ); i<n; i++ )); do cast call " $PORTAL" " enabledTokenAt(uint256)(address)" " $i" --rpc-url " $HTTP_RPC" ; done
373+
361374[group (' tip403' )]
362375[doc (' Creates a new TIP-20 token on L1 via TIP20Factory. Returns the token address. Requires L1_RPC_URL and PRIVATE_KEY env vars.' )]
363376create-token name symbol salt = " 0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890":
You can’t perform that action at this time.
0 commit comments