Skip to main content

Transactions

GraphQL Endpoint

https://platform.beta.enjin.io/graphql

Use these queries to look up the state of transactions you've submitted (GetTransaction / GetTransactions) and to read the underlying blocks and extrinsics they ended up in (GetBlock / GetBlocks, GetExtrinsic / GetExtrinsics).

GetTransaction

Returns a single transaction by uuid, idempotencyKey, or extrinsicHash — pass exactly one. The most common use is to look up the live state of a transaction you submitted via CreateTransaction.

query GetTransaction {
GetTransaction(
network: ENJIN
chain: MATRIX
uuid: "a90ded41-4262-40a2-95c0-98255b660bf1"
) {
uuid
idempotencyKey
action
state
encodedData
extrinsicHash
createdAt
updatedAt
}
}

See the state argument for the full list of transaction states.

GetTransactions

Returns a paginated list of transactions. Pagination is cursor-based — pass the previous response's nextCursor to fetch the next page. You can filter by uuids, idempotencyKeys, or extrinsicHashes.

query GetTransactions {
GetTransactions(
network: ENJIN
chain: MATRIX
limit: 15
) {
data {
uuid
action
state
extrinsicHash
createdAt
}
perPage
nextCursor
previousCursor
}
}

GetBlock

Returns a single block by id (block number) or hash.

query GetBlock {
GetBlock(
network: ENJIN
chain: MATRIX
id: 402865
) {
number
hash
validator {
address
}
createdAt
}
}
GetBlock is currently unavailable

GetBlock is temporarily disabled — every call returns an Internal server error. The platform team is aware of the issue and a fix is planned. For event-level lookups in the meantime, see Working with Events.

GetBlocks

Returns a list of blocks. Filter by ids (block numbers) or hashes.

query GetBlocks {
GetBlocks(
network: ENJIN
chain: MATRIX
ids: [402865, 402866]
) {
number
hash
createdAt
}
}
Block.extrinsics and Block.events return null

The extrinsics and events sub-fields on Block are defined in the schema but currently return null on every request. For event-level lookups in the meantime, see Working with Events.

GetExtrinsic

Returns a single extrinsic by hash.

query GetExtrinsic {
GetExtrinsic(
network: ENJIN
chain: MATRIX
hash: "0xbafe459e8248b802f3aef98d2e4a695bbb238899edf40519b082366e3ff8b98f"
) {
id
hash
pallet
method
success
nonce
signer {
address
}
block {
number
}
}
}
GetExtrinsic and GetExtrinsics are currently unavailable

Both queries are temporarily disabled and return Internal server error. Use the Subscan workaround described above until the platform fix lands.

GetExtrinsics

Returns a list of extrinsics by hashes. Same temporary outage as GetExtrinsic.

query GetExtrinsics {
GetExtrinsics(
network: ENJIN
chain: MATRIX
hashes: [
"0xbafe459e8248b802f3aef98d2e4a695bbb238899edf40519b082366e3ff8b98f"
"0x12ab34cd56ef78ab90cd12ef34ab56cd78ef90ab12cd34ef56ab78cd90ef12ab"
]
) {
hash
pallet
method
success
}
}