Smart Account

sa_getSmartAccount

Get the smart account of address. Smart account has the same value in all networks. In other words, the smart account of the same address is the same in the Ether mainnet and the BSC mainnet.

Parameters

Return Value

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": { 
            "smartAccount": "0x79bbD96C7fd6bef0ED943ee42D8D350867d0D61E",
        }
    }
}

sa_getUserOpReceipt

Queries the results of user operation. Unlike regular transactions, user operation must call sc_getUserOpReceipt to check whether execution was successful.

Parameters

Return Value

Transaction status value

Example

{
  "resultCode":"200",
  "resultMessage":"success",
  "resultData":{
    "userOpHash":"0xdba638a19c23ee0f69fb9e8683528531211d1a9deb8c93402c9294b170080415",
    "success":"true",
    "actualGasCost":595091657654760,
    "actualGasUsed":169890,
    "reason":"",
    "status":"0x1",
    "transactionHash":"0xe822beb4b6700802df2b5bf459afa1bef5e53b83c47b75126c8b5e4450968675"
  }
}

If userOpHash is invalid or pending, the error below is returned.

{
  "resultCode":"532",
  "resultMessage":"USEROP_RECEIPT_NOT_FOUND",
  "resultData":""
}

sa_erc20_transfer

Create and submit an ERC20 token transfer transaction using user operation. The result is a user operation hash. You can check the success of the returned user operation hash through sc_getUserOpReceipt.

Because it is processed as a user operation, it is processed even if neither the owner nor the sender have a balance in the network's main coin (e.g. Ether, BNB) for gas fees. The gas fee will be paid on your behalf from your predefined payment master account.

Parameters

Return Value

Example

{
  "resultCode":"200",
  "resultMessage":"success",
  "resultData":{
    "userOpHash":"0xdba638a19c23ee0f69fb9e8683528531211d1a9deb8c93402c9294b170080415"
  }
}

Last updated