Get contract state
Returns the raw storage fields of a deployed contract. No transaction needed this is a direct state read.immFields are set at deployment and never change. mutFields change as the contract executes transactions. Field order matches the order they are declared in the Ralph source code.
Field types
Call a view function
View functions run contract code without broadcasting a transaction. Use this to get computed values token balances, prices, ownership checks anything the contract calculates rather than stores directly.methodIndex is the zero-based index of the function in the contract. If the contract has three public functions, they are 0, 1, and 2 in declaration order.
Call a view function with arguments
Pass arguments in theargs array using the same type names as the field types above:
Call multiple functions in one request
Usemulticall-contract to batch several calls into a single round trip:
calls array.
Get contract bytecode
Returns the compiled bytecode of a contract by its code hash. Useful for verifying a deployed contract matches a known build:Get parent and sub-contracts
Ralph supports hierarchical contract relationships. A factory contract can deploy child contracts you can navigate that tree: Get the parent of a contract:Read contract events
Events emitted by a contract are queryable by contract address. Usestart and limit to paginate:
eventIndex maps to the order events are declared in the Ralph contract. nextStart is the offset to pass to fetch the next page store it between requests rather than calculating it yourself.
Get the current event count
Before paginating events, check how many exist so you can page backwards from the latest:start to count - 20.
Parameters reference
Next steps
Contract events
Subscribe to and query events from Ralph contracts
Error handling
Retry logic and error code reference

