contract Call
Calls an arbitrary function on an external contract directly from the smart account.
Builds a host function that invokes target.targetFn(targetArgs) directly (not through the smart account's execute() entry point). The smart account authorizes the call via require_auth triggered by the target contract. Context rules of type CallContract(target) are matched for authorization.
Use this for any external contract interaction (e.g., token approve, token transfer, DeFi protocol calls) where the smart account is the authorized party.
For the multi-signer equivalent, see OZMultiSignerManager.multiSignerContractCall.
Return
TransactionResult indicating success or failure.
Parameters
The contract address (C-address) to call.
The function name to invoke on the target contract.
Pre-encoded SCVal arguments for the function.
Optional override to force relayer or RPC submission.
Optional callback to resolve context rule IDs per auth entry.
Throws
if validation fails, simulation fails, or submission fails.