Skip to main content

Blockchain API

Execute Method

Execute Smart contract method

POST

API_URL/api/token/contract-execute

HEADERS

client_id : 9b16ae5638534a...* client_secret : sk_9b16ae563853...* content-type : application/json Authorization : Bearer ...**

Body

NameTypeRequired
wallet_addressstringYes
tostringNo
contract_addressstringYes
callback_urlstringYes
signed_datastringYes
is_feeintno
extra_infostringno

extra_info field

NameTypeRequiredDescription
methodstringnomethod use to execute
amountstringnoamount transfer
paramsstringnoAdditional data that will be passed back

if no contract_address pass will use MasToken as Default
if invalid contract_address was pass will use MasToken

Sample result
{
"status": 200,
"result": {
"from": "0x147f20a28739da1541...",
"transactionHash": "0xf519ba69ba0e603583e0e...",
"nonce": 0,
"status": "pending",
}
}
Sample Callback Success response
{
"status": 200,
"result": {
"transactionHash": "0xf519ba69ba0e603583e0e...",
"nonce": 752,
"from": "0x147f20a28739da1541...",
"status": "success"
"receipt" : { Transaction Receipt Object }
}
}
Sample Callback Fail response
{
"status": 200,
"result": {
"transactionHash": "0xf519ba69ba0e603583e0e...",
"nonce": 752,
"from": "0x147f20a28739da1541...",
"status": "failed"
"message": "Error message"
}
}

Call Method

Call Smart contract method

POST

API_URL/api/token/contract-call

HEADERS

client_id : 9b16ae5638534a...* client_secret : sk_9b16ae563853...* content-type : application/json Authorization : Bearer ...**

Body

NameTypeRequired
wallet_addressstringYes
contract_addressstringYes
method_namestringYes
method_paramsarrayNo

if no contract_address pass will use MasToken as Default
if invalid contract_address was pass will use MasToken

Sample result
{
"status": 200,
"result": {
"from": "0x147f20a28739da1541...",
"transactionHash": "0xf519ba69ba0e603583e0e...",
"nonce": 0,
"status": "pending",
}
}
Sample Callback Success response
{
"status": 200,
"result": {
"transactionHash": "0xf519ba69ba0e603583e0e...",
"nonce": 752,
"from": "0x147f20a28739da1541...",
"status": "success"
"receipt" : { Transaction Receipt Object }
}
}
Sample Callback Fail response
{
"status": 200,
"result": {
"transactionHash": "0xf519ba69ba0e603583e0e...",
"nonce": 752,
"from": "0x147f20a28739da1541...",
"status": "failed"
"message": "Error message"
}
}