Utility Operations
resource: utility — ABI encode/decode, unit conversion, address tools; mostly local
Mostly local: only
chainId makes an RPC call. Every other operation on
this page runs entirely locally against the supplied input — no network round trip.
validateAddress
| Field | Type | Required | Description |
|---|---|---|---|
address | text | ✓ Yes | Address string to validate. |
{
"success": true,
"isValid": true,
"isChecksumValid": true,
"checksummedAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
}
isValid checks basic format (20-byte hex); isChecksumValid checks the
EIP-55 mixed-case checksum specifically — an all-lowercase or all-uppercase address is valid format but
not checksum-valid.
convertUnits
| Field | Type | Required | Description |
|---|---|---|---|
value | text | ✓ Yes | Value to convert. |
fromUnit | text | ✓ Yes | Source unit, e.g. ether, gwei, wei. |
toUnit | text | ✓ Yes | Target unit. |
{ "success": true, "valueWei": "1500000000000000000", "convertedValue": 1.5, "fromUnit": "ether", "toUnit": "ether" }
Conversion always chains through wei as the common base unit.
chainId — the only RPC call in this resource
eth_chainId. No operation-specific fields.
{ "success": true, "chainID": 1 }
encodeFunctionData / decodeFunctionData
| Operation | Fields | Returns |
|---|---|---|
encodeFunctionData | abi* (JSON), functionName*, args | { "data": "0xa9059cbb...", "selector": "0xa9059cbb" } — full calldata plus the 4-byte selector. |
decodeFunctionData | abi* (JSON), data* | { "functionName": "transfer", "selector": "0xa9059cbb", "decodedArgs": {"to":"0x...","amount":"1000000"} } |
Useful for building contract.write/transaction.send calldata ahead of
time, or decoding calldata pulled from transaction.get/block.get without
making another call.
encodeEventTopics / decodeEventLog
| Operation | Fields | Description |
|---|---|---|
encodeEventTopics | eventAbi* (JSON), args | Builds an eth_getLogs topics filter array. topics[0] is always the event signature hash; later entries are either an encoded filter value or null (wildcard). |
decodeEventLog | eventAbi* (JSON), topics* (JSON array), data* | Turns a raw log entry's topics/data into named event arguments. |
{ "success": true, "eventName": "Transfer", "decodedArgs": { "from": "0x0000...", "to": "0x742d35Cc...", "value": "1000000" } }
Load-bearing pair:
decodeEventLog is what turns the raw
EthereumEventLogEntry objects returned by
transaction.receipt and
contract.logs into usable, named event data — those two
operations deliberately return logs raw/undecoded and expect this pairing.
contractAddress
Predicts a contract's deployment address ahead of (or after) deployment — CREATE via nonce, or CREATE2 via bytecode hash + salt.
| Field | Type | Required | Description |
|---|---|---|---|
from | text | ✓ Yes | Deployer address. |
nonce | number | One of nonce / bytecodeHash+salt | Deployer's nonce at time of deployment — for CREATE prediction. |
bytecodeHash | text | One of nonce / bytecodeHash+salt | Keccak256 hash of the init code — for CREATE2 prediction. |
salt | text | One of nonce / bytecodeHash+salt | CREATE2 salt value. |
{ "success": true, "contractAddress": "0x5FbDB2315678afecb367f032d93F642f64180aa", "method": "CREATE" }