Docs Icon CaretRight Reference Icon CaretRight Objects

Objects

Balance

The balance of a particular asset for a wallet address.

fields:

owner: Address!

An EOA account represented by 32 bytes.

amount: U64!

The amount of the selected asset id as an unsigned 64 bit number.

assetId: AssetId!

A 32 byte representation of the asset.

BalanceFilterInput

The filter input type used to filter the balances query.

fields:

owner: Address!

The owner address of the balances.

Block

Information about a block in the network.

fields:

id: BlockId!

A unique identifier for the block.

header: Header!

Metadata about a block.

consensus: Consensus!

The type of consensus used.

transactions: [Transaction!]!

An array of transactions included in the block.

ChainInfo

Information about the base chain. At a very high level chainInfo helps you understand what Fuel chain you're connected to and the different parameters of this chain.

fields:

name: String!

The human-readable string name of the chain. i.e. beta-4

latestBlock: Block!

The most recently created block.

baseChainHeight: U32!

Returns 0 (in development mode, this will change). This should return the height of the chain at start.

peerCount: Int!

The number of nodes that node is peered with.

consensusParameters: ConsensusParameters!

The consensus parameters used to validate blocks.

gasCosts: GasCosts!

The gas cost of each opcode.

ChangeOutput

A transaction output that changes the unspent coins in a UTXO.

fields:

to: Address!

The recipient address of the coins.

amount: U64!

The amount of coins.

assetId: AssetId!

The asset id for the coins.

Coin

Information about a coin.

fields:

utxoId: UtxoId!

A unique 32 byte identifier for a UTXO.

owner: Address!

The owner address of the coins.

amount: U64!

The amount of coins.

assetId: AssetId!

The asset id of the coin.

maturity: U32!

The UTXO being spent must have been created at least this many blocks ago.

blockCreated: U32!

The block when the coins were created.

txCreatedIdx: U64!

The index of the transaction that created this coin.

CoinFilterInput

The filter input type for the coins query.

fields:

owner: Address!

The owner of the coins.

assetId: AssetId

The asset id of the coins.

CoinOutput

A type representing a coin output.

fields:

to: Address!

The receiver address of the output coins.

amount: U64!

The amount of coins in the output.

assetId: AssetId!

The asset id for the output coins.

ConsensusParameters

The consensus parameters used for validating blocks.

fields:

contractMaxSize: U64!

The maximum contract size, in bytes.

maxInputs: U64!

The maximum number of inputs.

maxOutputs: U64!

The maximum number of outputs.

maxWitnesses: U64!

The maximum number of witnesses.

maxGasPerTx: U64!

The maximum gas per transaction.

maxScriptLength: U64!

The maximum length of a script, in instructions.

maxGasPerPredicate: U64!

The maximum gas per predicate transaction.

maxScriptDataLength: U64!

The maximum length of script data, in bytes.

maxStorageSlots: U64!

The maximum number of initial storage slots.

maxPredicateLength: U64!

The maximum length of a predicate, in instructions.

maxPredicateDataLength: U64!

The maximum length of predicate data, in bytes.

gasPriceFactor: U64!

A factor to convert between gas and the transaction assets value.

gasPerByte: U64!

A fixed ratio linking metered bytes to a gas price.

maxMessageDataLength: U64!

The maximum length of message data, in bytes.

chainId: U64!

A unique identifier for the chain.

Contract

An object representing a deployed contract.

fields:

id: ContractId!

The contract address.

bytecode: HexString!

The contract bytecode.

salt: Salt!

A unique identifier for the contract.

ContractBalance

An object representing the balance of a deployed contract for a certain asset.

fields:

contract: ContractId!

The contract address.

amount: U64!

The contract balance for the given asset.

assetId: AssetId!

The asset id for the coins.

ContractBalanceFilterInput

The filter input type for the contractBalances query.

fields:

contract: ContractId!

The contract id that the query will return balances for.

ContractCreated

The output type from deploying a contract.

fields:

contract: Contract!

The contract that was created.

stateRoot: Bytes32!

The initial state root of contract.

ContractOutput

The output type from a transaction that changed the state of a contract.

fields:

inputIndex: Int!

The index of the input.

balanceRoot: Bytes32!

The root of amount of coins owned by contract after transaction execution.

stateRoot: Bytes32!

The state root of contract after transaction execution.

DependentCost

Contains the dependent cost of opcodes.

fields:

base: U64!

The base gas cost.

depPerUnit: U64!

The dependent gas cost per unit.

ExcludeInput

The input type for the resourcesToSpend query that defines what utxos and messages to exclude.

fields:

utxos: [UtxoId!]!

An array of utxo IDs to exclude.

messages: [Nonce!]!

An array of message IDs to exclude.

FailureStatus

The status type of a transaction that has failed.

fields:

block: Block!

The block number for the failed transaction.

time: Tai64Timestamp!

The time the transaction failed.

reason: String!

The reason why the transaction failed.

programState: ProgramState

The state of the program execution.

GasCosts

The breakdown of the gas costs of each opcode.

fields:

add: U64!

The gas cost of using the $add ALU opcode.

addi: U64!

The gas cost of using the $addi ALU opcode.

aloc: U64!

The gas cost of using the $aloc memory opcode.

and: U64!

The gas cost of using the $and ALU opcode.

andi: U64!

The gas cost of using the $andi ALU opcode.

bal: U64!

The gas cost of using the $bal contract opcode.

bhei: U64!

The gas cost of using the $bhei contract opcode.

bhsh: U64!

The gas cost of using the $bhsh contract opcode.

burn: U64!

The gas cost of using the $burn contract opcode.

cb: U64!

The gas cost of using the $cb contract opcode.

cfei: U64!

The gas cost of using the $cfei memory opcode.

cfsi: U64!

The gas cost of using the $cfsi memory opcode.

croo: U64!

The gas cost of using the $croo contract opcode.

div: U64!

The gas cost of using the $div ALU opcode.

divi: U64!

The gas cost of using the $divi ALU opcode.

ecr1: U64!

The gas cost of using the $ecr1 cryptographic opcode.

eck1: U64!

The gas cost of using the $eck1 cryptographic opcode.

ed19: U64!

The gas cost of using the $ed19 cryptographic opcode.

eq: U64!

The gas cost of using the $eq ALU opcode.

exp: U64!

The gas cost of using the $exp ALU opcode.

expi: U64!

The gas cost of using the $expi ALU opcode.

flag: U64!

The gas cost of using the $flag opcode.

gm: U64!

The gas cost of using the $gm opcode.

gt: U64!

The gas cost of using the $gt opcode.

gtf: U64!

The gas cost of using the $gtf ALU opcode.

ji: U64!

The gas cost of using the $ji control flow opcode.

jmp: U64!

The gas cost of using the $jmp control flow opcode.

jne: U64!

The gas cost of using the $jne control flow opcode.

jnei: U64!

The gas cost of using the $jnei control flow opcode.

jnzi: U64!

The gas cost of using the $jnzi control flow opcode.

jmpf: U64!

The gas cost of using the $jmpf control flow opcode.

jmpb: U64!

The gas cost of using the $jmpb control flow opcode.

jnzf: U64!

The gas cost of using the $jnzf control flow opcode.

jnzb: U64!

The gas cost of using the $jnzb control flow opcode.

jnef: U64!

The gas cost of using the $jnef control flow opcode.

jneb: U64!

The gas cost of using the $jneb control flow opcode.

k256: U64!

The gas cost of using the $k256 cryptographic opcode.

lb: U64!

The gas cost of using the $lb memory opcode.

log: U64!

The gas cost of using the $log contract opcode.

lt: U64!

The gas cost of using the $lt ALU opcode.

lw: U64!

The gas cost of using the $lw memory opcode.

mcpi: U64!

The gas cost of using the $mcpi memory opcode.

mint: U64!

The gas cost of using the $mint contract opcode.

mlog: U64!

The gas cost of using the $mlog ALU opcode.

modOp: U64!

The gas cost of using the $modOp opcode.

modi: U64!

The gas cost of using the $modi ALU opcode.

moveOp: U64!

The gas cost of using the $moveOp ALU opcode.

movi: U64!

The gas cost of using the $movi ALU opcode.

mroo: U64!

The gas cost of using the $mroo ALU opcode.

mul: U64!

The gas cost of using the $mul ALU opcode.

muli: U64!

The gas cost of using the $muli ALU opcode.

mldv: U64!

The gas cost of using the $mldv ALU opcode.

noop: U64!

The gas cost of using the $noop ALU opcode.

not: U64!

The gas cost of using the $not ALU opcode.

or: U64!

The gas cost of using the $or ALU opcode.

ori: U64!

The gas cost of using the $ori ALU opcode.

ret: U64!

The gas cost of using the $ret opcode.

rvrt: U64!

The gas cost of using the $rvrt contract opcode.

s256: U64!

The gas cost of using the $s256 cryptographic opcode.

sb: U64!

The gas cost of using the $sb memory opcode.

scwq: U64!

The gas cost of using the $scwq contract opcode.

sll: U64!

The gas cost of using the $sll ALU opcode.

slli: U64!

The gas cost of using the $slli ALU opcode.

srl: U64!

The gas cost of using the $srl ALU opcode.

srli: U64!

The gas cost of using the $srli ALU opcode.

srw: U64!

The gas cost of using the $srw contract opcode.

sub: U64!

The gas cost of using the $sub ALU opcode.

subi: U64!

The gas cost of using the $subi ALU opcode.

sw: U64!

The gas cost of using the $sw memory opcode.

sww: U64!

The gas cost of using the $sww contract opcode.

swwq: U64!

The gas cost of using the $swwq contract opcode.

time: U64!

The gas cost of using the $time contract opcode.

tr: U64!

The gas cost of using the $tr contract opcode.

tro: U64!

The gas cost of using the $tro contract opcode.

wdcm: U64!

The gas cost of using the $wdcm ALU opcode.

wqcm: U64!

The gas cost of using the $wqcm ALU opcode.

wdop: U64!

The gas cost of using the $wdop ALU opcode.

wqop: U64!

The gas cost of using the $wqop ALU opcode.

wdml: U64!

The gas cost of using the $wdml ALU opcode.

wqml: U64!

The gas cost of using the $wqml ALU opcode.

wddv: U64!

The gas cost of using the $wddv ALU opcode.

wqdv: U64!

The gas cost of using the $wqdv ALU opcode.

wdmd: U64!

The gas cost of using the $wdmd ALU opcode.

wqmd: U64!

The gas cost of using the $wqmd ALU opcode.

wdam: U64!

The gas cost of using the $wdam ALU opcode.

wqam: U64!

The gas cost of using the $wqam ALU opcode.

wdmm: U64!

The gas cost of using the $wdmm ALU opcode.

wqmm: U64!

The gas cost of using the $wqmm ALU opcode.

xor: U64!

The gas cost of using the $xor ALU opcode.

xori: U64!

The gas cost of using the $xori ALU opcode.

call: DependentCost!

The dependent gas cost of using the $call contract opcode.

ccp: DependentCost!

The dependent gas cost of using the $ccp contract opcode.

csiz: DependentCost!

The dependent gas cost of using the $csiz contract opcode.

ldc: DependentCost!

The dependent gas cost of using the $ldc contract opcode.

logd: DependentCost!

The dependent gas cost of using the $logd contract opcode.

mcl: DependentCost!

The dependent gas cost of using the $mcl memory opcode.

mcli: DependentCost!

The dependent gas cost of using the $mcli memory opcode.

mcp: DependentCost!

The dependent gas cost of using the $mcp memory opcode.

meq: DependentCost!

The dependent gas cost of using the $meq memory opcode.

retd: DependentCost!

The dependent gas cost of using the $retd contract opcode.

smo: DependentCost!

The dependent gas cost of using the $smo contract opcode.

srwq: DependentCost!

The dependent gas cost of using the $srwq contract opcode.

Genesis

The genesis consensus type.

fields:

chainConfigHash: Bytes32!

The chain configuration hash. The chain configuration defines what consensus type to use, what settlement layer to use, and the rules of block validity.

coinsRoot: Bytes32!

The binary Merkle tree root of all genesis coins.

contractsRoot: Bytes32!

The binary Merkle tree root of state, balances, and the contracts code hash of each contract.

messagesRoot: Bytes32!

The binary merkle tree root of all genesis messages.

The header contains metadata about a certain block.

fields:

id: BlockId!

The current block id.

daHeight: U64!

The block height for the data availability layer up to which (inclusive) input messages are processed.

transactionsCount: U64!

The number of transactions in the block.

messageReceiptCount: U64!

The number of receipt messages in the block.

messageReceiptRoot: Bytes32!

The merkle root of the receipt messages in the block.

height: U32!

The block height.

prevRoot: Bytes32!

The merkle root of all previous consensus header hashes (not including this block).

time: Tai64Timestamp!

The timestamp for the block.

applicationHash: Bytes32!

The hash of the serialized application header for this block.

InputCoin

Information about a coin input.

fields:

utxoId: UtxoId!

A unique 32 byte identifier for the UTXO.

owner: Address!

The owning address or predicate root.

amount: U64!

The amount of coins.

assetId: AssetId!

The asset ID of the coins.

txPointer: TxPointer!

A pointer to the transaction whose output is being spent.

witnessIndex: Int!

The index of the witness that authorizes spending the coin.

maturity: U32!

The UTXO being spent must have been created at least this many blocks ago.

predicateGasUsed: U64!

The amount of gas used in the predicate transaction.

predicate: HexString!

The predicate bytecode.

predicateData: HexString!

The predicate input parameters.

InputContract

Information about a contract input.

fields:

utxoId: UtxoId!

A unique 32 byte identifier for the UTXO.

balanceRoot: Bytes32!

The root of amount of coins owned by contract before transaction execution.

stateRoot: Bytes32!

The state root of contract before transaction execution.

txPointer: TxPointer!

A pointer to the TX whose output is being spent.

contract: Contract!

The input contract.

InputMessage

Information about a message input.

fields:

sender: Address!

The sender address of the message.

recipient: Address!

The recipient address of the message.

amount: U64!

The amount sent in the message.

nonce: Nonce!

A nonce value for the message input, which is determined by the sending system and is published at the time the message is sent.

witnessIndex: Int!

The index of witness that authorizes spending the coin.

predicateGasUsed: U64!

The amount of gas used in the predicate transaction.

data: HexString!

The message data.

predicate: HexString!

The predicate bytecode.

predicateData: HexString!

The predicate input parameters.

MerkleProof

Information about a merkelproof.

fields:

proofSet: [Bytes32!]!=

The proof set of the message proof.

proofIndex: U64!

The index used to generate this proof.

Message

Contains information about a message.

fields:

messageId: MessageId!

A unique id for the message.

amount: U64!

The amount of base asset coins sent with the message.

sender: Address!

The address of the message sender.

recipient: Address!

The recipient of the message.

nonce: Nonce!

The nonce value for the message.

data: [Int!]!

The vector with the message data.

daHeight: U64!

The block height of the data availability layer up to which (inclusive) input messages are processed.

MessageCoin

Information about message coin

fields:

sender: Address!

The address of the message sender.

recipient: Address!

The recipient of the message.

nonce: Nonce!

The nonce value for the message.

amount: U64!

The amount of base asset coins sent with the message.

assetId: AssetId

The asset id of the coins transferred.

daHeight: U64!

The block height of the data availability layer up to which (inclusive) input messages are processed.

MessageProof

Information about the message proof.

fields:

messageProof: MerkleProof!

The merkle proof of the message.

blockProof: MerkleProof!

The merkle proof of the block.

messageBlockHeader: Header!

The merkle proof of the message.

commitBlockHeader: Header!

The merkle proof of the block.

sender: Address!

The message sender.

recipient: Address!

The message recipient.

nonce: Nonce!

The message nonce.

amount: U64!

The amount sent in the message.

data: HexString!

The data from the message.

NodeInfo

Information about a node.

fields:

utxoValidation: Boolean!

Whether or not the node is using UTXO validation.

vmBacktrace: Boolean!

Whether or not logging of backtraces from VM errors is enabled.

minGasPrice: U64!

The minimum gas price for the node.

maxTx: U64!

The maximum number of transactions.

maxDepth: U64!

The maximum number of connected UTXOs allowed, excluding contracts.

nodeVersion: String!

The node version.

PoAConsensus

The proof-of-authority (PoA) consensus type.

fields:

signature: Signature!

The signature of the block produced by PoA consensus.

ProgramState

An object representing the state of execution of a transaction.

fields:

returnType: ReturnType!

The type of return response for the transaction.

data: HexString!

The data returned from the transaction.

Receipt

An object representing all possible types of receipts.

fields:

contract: Contract

The contract that produced the receipt.

pc: U64

The value of the program counter register $pc, which is the memory address of the current instruction.

is: U64

The value of register $is, which is the pointer to the start of the currently-executing code.

to: Contract

The recipient contract.

toAddress: Address

The recipient address.

amount: U64

The amount of coins transferred.

assetId: AssetId

The asset id of the coins transferred.

gas: U64

The gas used for the transaction.

param1: U64

The first parameter for a CALL receipt type, holds the function selector.

param2: U64

The second parameter for a CALL receipt type, typically used for the user-specified input to the ABI function being selected.

val: U64

The value of registers at the end of execution, used for debugging.

ptr: U64

The value of the pointer register, used for debugging.

digest: Bytes32

A 32-byte hash of MEM[$rC, $rD]. The syntax MEM[x, y] means the memory range starting at byte x, of length y bytes.

reason: U64

The decimal string representation of an 8-bit unsigned integer for the panic reason. Only returned if the receipt type is PANIC.

ra: U64

The value of register $rA.

rb: U64

The value of register $rB.

rc: U64

The value of register $rC.

rd: U64

The value of register $rD.

len: U64

The length of the receipt.

receiptType: ReceiptType!

The type of receipt.

result: U64

0 if script exited successfully, any otherwise.

gasUsed: U64

The amount of gas consumed by the script.

data: HexString

The receipt data.

sender: Address

The address of the message sender.

recipient: Address

The address of the message recipient.

nonce: Nonce

The nonce value for a message.

contractId: ContractId

The contract id.

subId: Bytes32

The sub id.

SpendQueryElementInput

A type used in the queryPerAsset argument for the resourcesToSpend query.

fields:

assetId: AssetId!

The asset id for the asset.

amount: U64!

The amount of coins to send.

max: U64

The max number of resources in the selection.

SqueezedOutStatus

The status for a transaction that was squeezed out of the transaction pool.

fields:

reason: String!

The reason why the transaction was squeezed out.

SuccessStatus

The status of a successful transaction.

fields:

block: Block!

The block of the transaction.

time: Tai64Timestamp!

The time of the transaction.

programState: ProgramState

The state of the program execution.

SubmittedStatus

The status for a submitted transaction.

fields:

time: Tai64Timestamp!

The time a transaction was submitted

TimeParameters

An object containing information about block times

fields:

startTime: U64

The time to set on the first block.

blockTimeInterval: U64

The time interval between subsequent blocks.

Transaction

An object containing information about a transaction.

fields:

id: TransactionId!

A unique transaction id.

inputAssetIds: [AssetId!]

An array of asset ids used for the transaction inputs.

inputContracts: [Contract!]

An array of contracts used for the transaction inputs.

gasPrice: U64

The gas price for the transaction.

gasLimit: U64

The gas limit for the transaction.

maturity: U32

The minimum block height that the transaction can be included at.

txPointer: TxPointer

The location of the transaction in the block.

isScript: Boolean!

Whether or not the transaction is a script.

isCreate: Boolean!

Whether or not the transaction is creating a new contract.

isMint: Boolean!

Whether or not the transaction is minting new coins.

inputs: [Input!]

An array of inputs for the transaction.

outputs: [Output!]!

An array of outputs for the transaction.

witnesses: [HexString!]

An array of witnesses.

receiptsRoot: Bytes32

The root of the receipts.

status: TransactionStatus

The status of the transaction.

receipts: [Receipt!]

An array of the receipts produced by the transaction.

script: HexString

The script to execute.

scriptData: HexString

The script input parameters.

bytecodeWitnessIndex: Int

The witness index of contract bytecode.

bytecodeLength: U64

The length of the transaction bytecode.

salt: Salt

The salt value for the transaction.

storageSlots: [HexString!]

An array of storage slot.

rawPayload: HexString!

A hex string of the raw transaction payload.

VariableOutput

The output type for a transaction that outputs an amount that may vary based on transaction execution.

fields:

to: Address

The address the coins were sent to.

amount: U64

The amount of coins in the output.

assetId: AssetId

The asset id for the coins sent.