call
scrypt-ts-opcat / call
Function: call()
call\<
Contract
>(signer
,provider
,contract
,contractCall
,options
?):Promise
\<ExtPsbt
>
Defined in: packages/scrypt-ts-opcat/src/features/call.ts:53
Calls a smart contract method and broadcasts the transaction.
Type Parameters
• Contract extends SmartContract
\<StructObject
>
Parameters
signer
The signer to sign the transaction
provider
The provider to interact with the blockchain
contract
Contract
The smart contract instance to call
contractCall
ContractCall
\<Contract
>
The contract method call details
options?
CallOptions
Optional call configuration (fee rate, change address, etc.)
Returns
Promise
\<ExtPsbt
>
A promise resolving to the signed PSBT (Partially Signed Bitcoin Transaction)
Remarks
- Automatically handles UTXO selection and change calculation
- Supports contract outputs if specified in options
- Can include backtrace information if enabled
- Broadcasts the transaction by default (can be disabled with unfinalize option)