Notices
Notices are informational statements that can be validated in the base layer blockchain.
1. Get Notice by Index
Retrieve a specific notice based on its index and associated input index.
query notice($noticeIndex: Int!, $inputIndex: Int!) {
notice(noticeIndex: $noticeIndex, inputIndex: $inputIndex) {
index
input {
index
timestamp
msgSender
blockNumber
}
payload
proof {
validity {
inputIndexWithinEpoch
outputIndexWithinInput
outputHashesRootHash
vouchersEpochRootHash
noticesEpochRootHash
machineStateHash
outputHashInOutputHashesSiblings
outputHashesInEpochSiblings
}
context
}
}
}
For notices, the API provides access to proof data that can be used for validation on the base layer blockchain. This proof data is accessible through the Proof
field on notice objects.
Arguments
Name | Type | Description |
---|---|---|
noticeIndex | Int! | Index of the notice to retrieve. |
inputIndex | Int! | Index of the input associated with the notice. |
Response Type
2. Get Notices
Retrieve a list of notices with support for pagination.
query notices {
notices {
edges {
node {
index
input {
index
timestamp
msgSender
blockNumber
}
payload
}
}
}
}
Arguments
None
Response Type
3. Get Notices by Input
Retrieve notices associated with a specific input.
query noticesByInput($inputIndex: Int!) {
input(index: $inputIndex) {
notices {
edges {
node {
index
input {
index
timestamp
msgSender
blockNumber
}
payload
}
}
}
}
}
Arguments
Name | Type | Description |
---|---|---|
inputIndex | Int! | Index of the input to retrieve notices for. |
Response Type
Examples
- Fetching a specific notice:
query {
notice(noticeIndex: 3, inputIndex: 2) {
index
payload
proof {
validity {
inputIndexWithinEpoch
outputIndexWithinInput
}
context
}
}
}
- Listing earlier(first 5) notices:
query {
notices(first: 5) {
edges {
node {
index
input {
index
timestamp
}
payload
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
}
}
- Retrieving notices for a specific input:
query {
input(index: 10) {
notices(first: 3) {
edges {
node {
index
payload
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
}
}
}