View calls reading data
View calls are free and instant. Use them to read contract fields or call pure/view functions:methodIndex is the zero-based position of the function in the contract source. The first public function is 0, the second is 1, and so on.
Passing arguments
Match the type names to the Ralph types declared in the function signature:State-changing calls TxScript
To execute a function that modifies state you build and submit a transaction using a TxScript. First build the unsigned transaction:txId with your private key and submit:
Compile a TxScript on the fly
If you have Ralph source for a script you can compile it before building the transaction:bytecodeTemplate in the execute-script call above.
Reading state after a transaction
After a state-changing transaction confirms, read the updatedmutFields:
Next steps
Contract events
Query events emitted by your contract
Reading contracts via API
Full guide to view calls and state reads

