Documentation Index
Fetch the complete documentation index at: https://mintlify.com/rhinestonewtf/warp-router/llms.txt
Use this file to discover all available pages before exploring further.
Overview
RouterUtils is a utility contract that provides pure helper functions for router operations. It contains common checks and validations that can be used across the router system.Functions
isContractDeployed
Checks whether a contract is deployed at the specified address.The address to check for contract deployment.
bool: True if a contract is deployed at the address, false otherwise
.code.length to determine if bytecode exists at the given address. Returns true for contracts, false for EOAs (Externally Owned Accounts) or undeployed addresses.
This check will return false for addresses in the middle of construction, as constructor code is not yet stored at the address during deployment.
getContractCode
Returns the contract code for a given address.The address to retrieve contract code from.
bytes: The bytecode of the contract at the address, or empty bytes if none
Use Cases
Contract Verification
UseisContractDeployed to verify that an address contains contract code before attempting to interact with it:
Bytecode Analysis
UsegetContractCode to retrieve and analyze contract bytecode for validation or verification purposes: