Skip to main content

unsafe_moveCall

POST

Create an unsigned transaction to execute a Move call on the network, by calling the specified function in the module of a given package.
param[0]
signerstringrequired
The transaction signer's Sui address
param[1]
packageObjectIdstringrequired
The Move package ID, e.g. 0x2
param[2]
modulestringrequired
The Move module name, e.g. pay
param[3]
functionstringrequired
The move function name, e.g. split
param[4]
typeArgumentsarrayrequired
The type arguments of the Move function
param[5]
argumentsarrayrequired
The arguments to be passed into the Move function, in SuiJson format
param[6]
gasstringrequired
Gas object to be used in this transaction, node will pick one from the signer's possession if not provided
param[7]
gasBudgetstringrequired
The gas budget, the transaction will fail if the gas cost exceed the budget
param[8]
executionModestringrequired
Whether this is a Normal transaction or a Dev Inspect Transaction. Default to be SuiTransactionBlockBuilderMode::Commit when it's None.
Responses
jsonrpcstring
idinteger
the gas objects to be used
digestobjectrequired
objectIdobjectrequired
versionobjectrequired
inputObjectsarrayrequired
objects to be used in this transaction
txBytesstringrequired
BCS serialized transaction data bytes without its type tag, as base-64 encoded string.
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Bad Request"
}
cURL
curl -X POST 'https://sui-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "unsafe_moveCall",
"params": [
null,
null,
null,
null,
[],
[],
null,
null,
null
]
}'