Fuel Network Beta 5
In Fuel Squid SDK, Fuel testnet and beta 5 data require different package versions.
To work with Fuel beta 5, you need to set the following versions in your package.json
:
{
"dependencies": {
"@subsquid/fuel-objects": "0.0.3",
"@subsquid/fuel-stream": "0.0.3"
}
}
and run:
rm -rf package-lock.json node_modules
npm i
Data sources
To access beta 5 data, you need to set the gateway URL as follows:
const dataSource = new DataSourceBuilder()
.setGateway("https://v2.archive.subsquid.io/network/fuel-stage-5");
You may also want to use a Beta 5 GraphQL endpoint for real-time data:
dataSource.setGraphql({
url: 'https://beta-5.fuel.network/graphql'
})
Data requests
Data requests are the same as they are in the testnet version:
Field Selection
For Fuel DataSource
the top-level Block
interface is defined the same as in the testnet version.
Here are the differences in Beta 5 data structures, compared to Testnet:
-
- there are fewer transaction types:
'Script' | 'Create' | 'Mint'
mintGasPrice
,isUpgrade
,isUpload
,bytecodeRoot
,subsectionIndex
,subsectionsNumber
,proofSet
,upgradePurpose
fields are missinggasPrice?: bigint
andbytecodeLength?: bigint
fields are addedinputContract.contractId
subfield is calledinputContract.contract
- interface
Policies
lacks thetip
field, but has an extragasPrice?: bigint
field - interfaces
SuccessStatus
andFailureStatus
lacktotalGas
andtotalFee
fields
- there are fewer transaction types:
-
In
Input
fields:InputCoin
type has an addedmaturity: number
fieldInputContract
type fieldcontractId
is calledcontract
-
In
Output
fields:ContractCreated
type'scontract
field instead of a string contains an object:
contract: {
id: Bytes
bytecode: Bytes
salt: Bytes
} -
eventInboxRoot
,consensusParametersVersion
,stateTransitionBytecodeVersion
andmessageOutboxRoot
fields are missingtransactionsCount
andmessageReceiptCount
have typebigint
instead ofnumber
messageReceiptRoot: string
field is added