writeContractFunction
POST/api/v1/contracts/:id/write/
Write a function from a contract using a vault
Request
Path Parameters
id stringrequired
- application/json
Body
required
vaultId stringrequired
functionName stringrequired
args undefined[]required
value stringrequired
Responses
- 201
- 400
- 404
- 503
Default Response
- application/json
- Schema
- Example (from schema)
Schema
error booleanrequired
Possible values: [false
]
statusCode numberrequired
Possible values: [201
]
data objectrequired
id stringrequired
hash stringrequired
from stringrequired
to stringrequired
value stringrequired
blockchainId integerrequired
vaultId stringrequired
contractId stringrequired
status stringrequired
Possible values: [TO_BE_SENT
, FAILED_TO_SEND
, SENT
, CONFIRMED
, FAILED
]
{
"error": false,
"statusCode": 201,
"data": {
"id": "string",
"hash": "string",
"from": "string",
"to": "string",
"value": "string",
"blockchainId": 0,
"vaultId": "string",
"contractId": "string",
"status": "TO_BE_SENT"
}
}
Default Response
- application/json
- Schema
- Example (from schema)
Schema
error booleanrequired
Possible values: [true
]
statusCode numberrequired
Possible values: [400
]
code stringrequired
Possible values: [errors.contract.invalidArgs
, errors.contract.invalidValue
, errors.insufficientFunds
, errors.failedToEstimateTransaction
]
data required
{
"error": true,
"statusCode": 400,
"code": "errors.contract.invalidArgs",
"data": {}
}
Default Response
- application/json
- Schema
- Example (from schema)
Schema
error booleanrequired
Possible values: [true
]
statusCode numberrequired
Possible values: [404
]
code stringrequired
Possible values: [errors.contract.notFound
, errors.contract.notDeployed
, errors.vault.notFound
, errors.contract.functionNotFound
]
data required
{
"error": true,
"statusCode": 404,
"code": "errors.contract.notFound",
"data": {}
}
Default Response
- application/json
- Schema
- Example (from schema)
Schema
error booleanrequired
Possible values: [true
]
statusCode numberrequired
Possible values: [503
]
code stringrequired
Possible values: [errors.contract.failedToSend
]
data required
{
"error": true,
"statusCode": 503,
"code": "errors.contract.failedToSend",
"data": {}
}
Loading...