@stacks/transactions
Construct, decode transactions and work with Clarity smart contracts on the Stacks blockchain.
callReadOnlyFunction
Read-only contract functions can be called without generating or broadcasting a transaction. Instead it works via a direct API call to a Stacks node.
Properties
contractAddressRequiredstring
The principal of the contract address you are calling, starts with SP for mainnet and ST for testnet.
contractNameRequiredstring
The name of the contract address you are calling, comes after the . on the contract address.
functionNameRequiredstring
The name of the read-only function you are calling.
functionArgsRequiredarray
An array of arguments that need to be passed to the read-only function. If no arguments are needed, you must pass an empty array.
networkRequiredobject
The network instance that the contract exists on.
Example:new StacksTestnet()senderAddressRequiredstring
The principal address that the call is being made from.
postConditionsarray
A set of conditions that can optionally be passed along in the transaction to prevent any unwanted asset movement.
Last updated on