Skip to content

Run one validator consensus round (same contract as legacy `/api/execute`)

POST
/v1/execute
curl --request POST \
--url https://testnet-rpc.necter.network/v1/execute \
--header 'Content-Type: application/json' \
--data '{ "module": "example", "function": "example", "input": "example", "gas_limit": 1000000 }'
Media typeapplication/json
object
module
required
string
/^0x[0-9a-f]{64}$/
function
required
string
<= 64 characters
input
required

String (passed byte-for-byte) or JSON value (canonicalized; no floats)

gas_limit
integer
default: 1000000 >= 1

Finalized round result

Media typeapplication/json
object
round_id
required
string
success
required
boolean
output
required
string
receipt_hash
required
string
/^0x[0-9a-f]{64}$/
gas_used
required
integer
events
Array<object>
object
name
string
data
consensus
required
object
state
string
votes
integer
quorum
integer
error
string | null

Example generated

{
"round_id": "example",
"success": true,
"output": "example",
"receipt_hash": "example",
"gas_used": 1,
"events": [
{
"name": "example",
"data": "example"
}
],
"consensus": {
"state": "example",
"votes": 1,
"quorum": 1
},
"error": "example"
}

Malformed request (bad_request, invalid_field)

Media typeapplication/json
object
error
required

Stable machine code

string
message
required
string
details
object
key
additional properties
any
request_id
required
string

Example generated

{
"error": "example",
"message": "example",
"details": {},
"request_id": "example"
}

not_found

Media typeapplication/json
object
error
required

Stable machine code

string
message
required
string
details
object
key
additional properties
any
request_id
required
string

Example generated

{
"error": "example",
"message": "example",
"details": {},
"request_id": "example"
}

too_large

Media typeapplication/json
object
error
required

Stable machine code

string
message
required
string
details
object
key
additional properties
any
request_id
required
string

Example generated

{
"error": "example",
"message": "example",
"details": {},
"request_id": "example"
}

rate_limited

Media typeapplication/json
object
error
required

Stable machine code

string
message
required
string
details
object
key
additional properties
any
request_id
required
string

Example generated

{
"error": "example",
"message": "example",
"details": {},
"request_id": "example"
}
Retry-After
integer

unavailable, no_validators, faucet_empty

Media typeapplication/json
object
error
required

Stable machine code

string
message
required
string
details
object
key
additional properties
any
request_id
required
string

Example generated

{
"error": "example",
"message": "example",
"details": {},
"request_id": "example"
}