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,upgradePurposefields are missinggasPrice?: bigintandbytecodeLength?: bigintfields are addedinputContract.contractIdsubfield is calledinputContract.contract- interface
Policieslacks thetipfield, but has an extragasPrice?: bigintfield - interfaces
SuccessStatusandFailureStatuslacktotalGasandtotalFeefields
- there are fewer transaction types:
-
In
Inputfields:InputCointype has an addedmaturity: numberfieldInputContracttype fieldcontractIdis calledcontract
-
In
Outputfields:ContractCreatedtype'scontractfield instead of a string contains an object:
contract: {
id: Bytes
bytecode: Bytes
salt: Bytes
} -
eventInboxRoot,consensusParametersVersion,stateTransitionBytecodeVersionandmessageOutboxRootfields are missingtransactionsCountandmessageReceiptCounthave typebigintinstead ofnumbermessageReceiptRoot: stringfield is added