unsafe_moveCall
Create an unsigned transaction to execute a Move call on the network, by calling the specified function in the module of a given package.
Parameters
signer·SuiAddress· requiredthe transaction signer's Sui addresspackage_object_id·ObjectID· requiredthe Move package ID, e.g.0x2module·string· requiredthe Move module name, e.g.payfunction·string· requiredthe move function name, e.g.splittype_arguments·TypeTag[] · requiredthe type arguments of the Move functionarguments·SuiJsonValue[] · requiredthe arguments to be passed into the Move function, in SuiJson formatgas·ObjectID· optionalgas object to be used in this transaction, node will pick one from the signer's possession if not providedgas_budget·BigInt<u64>· requiredthe gas budget, the transaction will fail if the gas cost exceed the budgetexecution_mode·SuiTransactionBlockBuilderMode· optionalWhether this is a Normal transaction or a Dev Inspect Transaction. Default to beSuiTransactionBlockBuilderMode::Commitwhen it's None."Commit"- Regular Sui Transactions that are committed on chain"DevInspect"- Simulated transaction that allows calling any Move function with arbitrary values.
Result
TransactionBlockBytes·TransactionBlockBytesgas·ObjectRef[] · requiredthe gas objects to be usedinputObjects·InputObjectKind[] · requiredobjects to be used in this transactiontxBytes·Base64· requiredBCS serialized transaction data bytes without its type tag, as base-64 encoded string.
Example
Replace each <param> with a value of the type listed under Parameters.
Request
curl https://mainnet-api.inodra.com/v1/jsonrpc \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "unsafe_moveCall",
"params": [
"<signer>",
"<package_object_id>",
"<module>",
"<function>",
"<type_arguments>",
"<arguments>",
"<gas_budget>"
]
}'