diff --git a/docs/overview.mdx b/docs/overview.mdx
index 851ce3b..cd8db5c 100644
--- a/docs/overview.mdx
+++ b/docs/overview.mdx
@@ -14,8 +14,8 @@ The playground is an interactive and graphical IDE that includes a reference for
You can test out the Fuel GraphQL API playground here:
-https://beta-5.fuel.network/playground
+https://testnet.fuel.network/v1/playground
## RPC Endpoint
-https://beta-5.fuel.network/graphql
+https://testnet.fuel.network/v1/graphql
diff --git a/docs/reference/enums.mdx b/docs/reference/enums.mdx
index 0d5ff99..8f44a83 100644
--- a/docs/reference/enums.mdx
+++ b/docs/reference/enums.mdx
@@ -5,6 +5,34 @@ category: Reference
# Enums
+## `ConsensusParametersVersion`
+
+The version of the consensus parameters.
+
+`V1`:
+Version 1.
+
+## `ContractParametersVersion`
+
+The version of the contract-specific consensus parameters.
+
+`V1`:
+Version 1.
+
+## `FeeParametersVersion`
+
+The version of the fee-specific consensus parameters.
+
+`V1`:
+Version 1.
+
+## `GasCostsVersion`
+
+The version of the gas-specific consensus parameters.
+
+`V1`:
+Version 1.
+
## `MessageState`
The state of a message, either `UNSPENT`, `SPENT`, or `NOT_FOUND`.
@@ -61,6 +89,13 @@ The receipt was generated from a mint.
`BURN`:
The receipt was generated from a burn.
+## `PredicateParametersVersion`
+
+The version of the predicate-specific consensus parameters.
+
+`V1`:
+Version 1.
+
## `ReturnType`
The type of return response for a transaction
@@ -83,3 +118,17 @@ All breakpoints have been processed, and the program has terminated.
`BREAKPOINT`:
The program stopped on a breakpoint.
+
+## `ScriptParametersVersion`
+
+The version of the script-specific consensus parameters.
+
+`V1`:
+Version 1.
+
+## `TxParametersVersion`
+
+The version of the transaction-specific consensus parameters.
+
+`V1`:
+Version 1.
diff --git a/docs/reference/objects.mdx b/docs/reference/objects.mdx
index d10fc0a..e0d4ede 100644
--- a/docs/reference/objects.mdx
+++ b/docs/reference/objects.mdx
@@ -82,7 +82,7 @@ Information about the base chain. At a very high level `chainInfo` helps you und
`name`: `String!`
-The human-readable string name of the chain. i.e. `beta-5`.
+The human-readable string name of the chain. i.e. `Upgradable Testnet`.
`latestBlock`: [`Block!`](#block)
@@ -1775,11 +1775,3 @@ The amount of coins in the output.
`assetId`: [`AssetId`](/docs/reference/scalars/#assetid)
The asset id for the coins sent.
-
-## `Version`
-
-The version of the consensus parameters.
-
-**fields:**
-
-`value`: [`U8`](/docs/reference/scalars/#u8)
diff --git a/docs/reference/scalars.mdx b/docs/reference/scalars.mdx
index fab4359..251a694 100644
--- a/docs/reference/scalars.mdx
+++ b/docs/reference/scalars.mdx
@@ -53,10 +53,6 @@ A unique 32 byte hash identifier for a transaction.
The location of the transaction in the block. It can be used by UTXOs as a reference to the transaction or by the transaction itself to make it unique.
-## `U8`
-
-Unsigned 8 bit integer.
-
## `U16`
Unsigned 16 bit integer.
diff --git a/docs/reference/unions.mdx b/docs/reference/unions.mdx
index bfa46c3..818f7c1 100644
--- a/docs/reference/unions.mdx
+++ b/docs/reference/unions.mdx
@@ -26,22 +26,6 @@ The type of consensus mechanism used to validate a block.
[`PoAConsensus`](/docs/reference/objects/#poaconsensus): PoA
consensus
-## `ConsensusParametersVersion`
-
-The version of the consensus parameters.
-
-**Types:**
-
-[`Version`](/docs/reference/objects/#version): The version of the consensus parameters.
-
-## `ContractParametersVersion`
-
-The version of the contract-specific consensus parameters.
-
-**Types:**
-
-[`Version`](/docs/reference/objects/#version): The version of the contract-specific consensus parameters.
-
## `DependentCost`
Contains the dependent cost of opcodes.
@@ -62,22 +46,6 @@ The status of a transaction dry run.
[`DryRunFailureStatus`](/docs/reference/objects/#dryrunfailurestatus): The transaction dry run failed.
-## `FeeParametersVersion`
-
-The version of the fee-specific consensus parameters.
-
-**Types:**
-
-[`Version`](/docs/reference/objects/#version): The version of the consensus parameters.
-
-## `GasCostsVersion`
-
-The version of the gas-specific consensus parameters.
-
-**Types:**
-
-[`Version`](/docs/reference/objects/#version): The version of the consensus parameters.
-
## `Input`
An input type for a transaction.
@@ -120,22 +88,6 @@ they could be set to a non-zero value.
[`ContractCreated`](/docs/reference/objects/#contractcreated):
Indicates a contract was deployed.
-## `PredicateParametersVersion`
-
-The version of the predicate-specific consensus parameters.
-
-**Types:**
-
-[`Version`](/docs/reference/objects/#version): The version of the consensus parameters.
-
-## `ScriptParametersVersion`
-
-The version of the script-specific consensus parameters.
-
-**Types:**
-
-[`Version`](/docs/reference/objects/#version): The version of the consensus parameters.
-
## `TransactionStatus`
The status type of a transaction.
@@ -149,11 +101,3 @@ The status type of a transaction.
[`SqueezedOutStatus`](/docs/reference/objects/#squeezedoutstatus): The transaction was kicked out of the mempool.
[`FailureStatus`](/docs/reference/objects/#failurestatus): The transaction has failed.
-
-## `TxParametersVersion`
-
-The version of the transaction-specific consensus parameters.
-
-**Types:**
-
-[`Version`](/docs/reference/objects/#version): The version of the consensus parameters.
diff --git a/examples/ContractBalances.tsx b/examples/ContractBalances.tsx
index 2458cc5..9a077df 100644
--- a/examples/ContractBalances.tsx
+++ b/examples/ContractBalances.tsx
@@ -2,5 +2,7 @@ import { CONTRACT_BALANCES_ARGS, CONTRACT_BALANCES_QUERY } from './queries';
import { Query } from './query';
export function ContractBalances() {
- return ;
+ return (
+
+ );
}
diff --git a/examples/queries.ts b/examples/queries.ts
index 97e00e2..a4d6208 100644
--- a/examples/queries.ts
+++ b/examples/queries.ts
@@ -7,10 +7,8 @@ export const BALANCE_QUERY = `query Balance($address: Address, $assetId: AssetId
}`;
export const BALANCE_ARGS = {
- address:
- '0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871',
- assetId:
- '0x0000000000000000000000000000000000000000000000000000000000000000',
+ address: '0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871',
+ assetId: '0x0000000000000000000000000000000000000000000000000000000000000000',
};
export const BALANCES_QUERY = `query Balances($filter: BalanceFilterInput) {
@@ -23,11 +21,10 @@ export const BALANCES_QUERY = `query Balances($filter: BalanceFilterInput) {
}`;
export const BALANCES_ARGS = {
- filter: {
- owner:
- '0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871',
- },
- };
+ filter: {
+ owner: '0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871',
+ },
+};
export const BLOCK_BY_HEIGHT_QUERY = `query Block($height: U64) {
block(height: $height) {
@@ -35,11 +32,11 @@ export const BLOCK_BY_HEIGHT_QUERY = `query Block($height: U64) {
}
}`;
- export const BLOCK_BY_HEIGHT_ARGS = {
- height: '3412',
- };
+export const BLOCK_BY_HEIGHT_ARGS = {
+ height: '3412',
+};
- export const CONTRACT_BALANCE_QUERY = `query ContractBalance($contract: ContractId, $asset: AssetId) {
+export const CONTRACT_BALANCE_QUERY = `query ContractBalance($contract: ContractId, $asset: AssetId) {
contractBalance(contract: $contract, asset: $asset) {
contract
amount
@@ -47,11 +44,10 @@ export const BLOCK_BY_HEIGHT_QUERY = `query Block($height: U64) {
}
}`;
-
export const CONTRACT_BALANCE_ARGS = {
- contract:
- '0xc9a5366c269438d294ef942bc962dd2e6c86121e3bca00192723eb7eb58fa87d',
- asset: '0x0000000000000000000000000000000000000000000000000000000000000000',
+ contract:
+ '0xc9a5366c269438d294ef942bc962dd2e6c86121e3bca00192723eb7eb58fa87d',
+ asset: '0x0000000000000000000000000000000000000000000000000000000000000000',
};
export const CONTRACT_BALANCES_QUERY = `query ContractBalances($filter: ContractBalanceFilterInput!) {
@@ -64,10 +60,10 @@ export const CONTRACT_BALANCES_QUERY = `query ContractBalances($filter: Contract
}`;
export const CONTRACT_BALANCES_ARGS = {
- filter: {
- contract:
- '0x0a98320d39c03337401a4e46263972a9af6ce69ec2f35a5420b1bd35784c74b1',
- },
+ filter: {
+ contract:
+ '0x0a98320d39c03337401a4e46263972a9af6ce69ec2f35a5420b1bd35784c74b1',
+ },
};
export const MESSAGE_INFO_QUERY = `query MessageInfo($address: Address) {
@@ -83,12 +79,10 @@ export const MESSAGE_INFO_QUERY = `query MessageInfo($address: Address) {
}
}`;
-
export const MESSAGE_INFO_ARGS = {
- address:
- '0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871',
+ address: '0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871',
};
-
+
export const LATEST_BLOCKS_QUERY = `query LatestBlocks {
blocks(last: 5) {
nodes {
@@ -147,7 +141,7 @@ export const LATEST_BLOCKS_QUERY = `query LatestBlocks {
}
}`;
- export const LATEST_TRANSACTIONS_QUERY = `query LatestTransactions {
+export const LATEST_TRANSACTIONS_QUERY = `query LatestTransactions {
transactions(last: 5) {
nodes {
id
@@ -274,8 +268,7 @@ export const TRANSACTIONS_QUERY = `query Transactions($address: Address) {
}`;
export const TRANSACTIONS_ARGS = {
- address:
- '0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871',
+ address: '0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871',
};
export const ALL_QUERY_CONSTANTS = {
@@ -295,4 +288,4 @@ export const ALL_QUERY_CONSTANTS = {
LATEST_TRANSACTIONS_QUERY,
TRANSACTIONS_QUERY,
TRANSACTIONS_ARGS,
-};
\ No newline at end of file
+};
diff --git a/examples/tests/balance.test.ts b/examples/tests/balance.test.ts
index c28e0f4..91cf79c 100644
--- a/examples/tests/balance.test.ts
+++ b/examples/tests/balance.test.ts
@@ -65,7 +65,9 @@ describe('Balance', () => {
// BALANCE_ARGS
const getBalance = async () => {
- const response = await urqlClient.query(BALANCE_QUERY, BALANCE_ARGS).toPromise();
+ const response = await urqlClient
+ .query(BALANCE_QUERY, BALANCE_ARGS)
+ .toPromise();
console.log('BALANCE:', response.data.balance);
expect(response.data.balance.amount).toBeTruthy();
};
diff --git a/examples/tests/balances.test.ts b/examples/tests/balances.test.ts
index 319e60d..ed9e128 100644
--- a/examples/tests/balances.test.ts
+++ b/examples/tests/balances.test.ts
@@ -65,7 +65,9 @@ describe('Balances', () => {
// BALANCES_ARGS
const getBalances = async () => {
- const response = await urqlClient.query(BALANCES_QUERY, BALANCES_ARGS).toPromise();
+ const response = await urqlClient
+ .query(BALANCES_QUERY, BALANCES_ARGS)
+ .toPromise();
console.log('BALANCES:', response.data.balances);
expect(response.data.balances.nodes).toBeTruthy();
};
diff --git a/examples/tests/latest-transactions.test.ts b/examples/tests/latest-transactions.test.ts
index 60b650e..f122601 100644
--- a/examples/tests/latest-transactions.test.ts
+++ b/examples/tests/latest-transactions.test.ts
@@ -19,7 +19,7 @@ const urqlClient = new Client({
describe('Latest transactions', () => {
test('get latest transactions with ts', async () => {
// LATEST_TRANSACTIONS_QUERY
-
+
const getLatestTransactions = async () => {
const response = await fetch(TESTNET_ENDPOINT, {
method: 'POST',
diff --git a/examples/tests/messages.test.ts b/examples/tests/messages.test.ts
index 8a74bea..a9953e5 100644
--- a/examples/tests/messages.test.ts
+++ b/examples/tests/messages.test.ts
@@ -65,7 +65,9 @@ describe('Messages', () => {
// MESSAGE_INFO_ARGS
const getMessages = async () => {
- const response = await urqlClient.query(MESSAGE_INFO_QUERY, MESSAGE_INFO_ARGS).toPromise();
+ const response = await urqlClient
+ .query(MESSAGE_INFO_QUERY, MESSAGE_INFO_ARGS)
+ .toPromise();
console.log('MESSAGES:', response.data.messages);
expect(response.data.messages.nodes).toBeTruthy();
};
diff --git a/jest.examples.ts b/jest.examples.ts
index bfc4b94..44f9a0f 100644
--- a/jest.examples.ts
+++ b/jest.examples.ts
@@ -13,7 +13,7 @@ const config: JestConfigWithTsJest = {
verbose: true,
moduleNameMapper: {
// Maps all imports starting with "~/" to the correct directory
- "^~/(.*)$": "/$1",
+ '^~/(.*)$': '/$1',
},
};
diff --git a/scripts/coverage/utils.mjs b/scripts/coverage/utils.mjs
index 8d772d8..3963ce9 100644
--- a/scripts/coverage/utils.mjs
+++ b/scripts/coverage/utils.mjs
@@ -38,7 +38,7 @@ export async function getHeadings(filepath) {
}
export async function request(query) {
- const response = await fetch('https://beta-5.fuel.network/graphql', {
+ const response = await fetch('https://testnet.swayswap.io/v1/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx
index 12ddb75..9bdfe1d 100644
--- a/src/components/Layout.tsx
+++ b/src/components/Layout.tsx
@@ -18,7 +18,7 @@ export function Layout({ title, children }: LayoutProps) {
? `${title} | Fuel GraphQL Docs`
: 'Fuel GraphQL Docs';
const META_OGIMG = URL + ogImage.src;
-
+
return (
<>
diff --git a/src/constants.ts b/src/constants.ts
index c5435f7..6b208a5 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -7,4 +7,4 @@ export const DEFAULT_SLUG = ['overview'];
export const META_DESC = 'Official documentation for the Fuel GraphQL API';
-export const TESTNET_ENDPOINT = 'https://beta-5.fuel.network/graphql';
+export const TESTNET_ENDPOINT = 'https://testnet.fuel.network/v1/graphql';
diff --git a/src/lib/code-examples.ts b/src/lib/code-examples.ts
index 8186740..6f417cc 100644
--- a/src/lib/code-examples.ts
+++ b/src/lib/code-examples.ts
@@ -12,7 +12,6 @@ import { ALL_QUERY_CONSTANTS } from '~/examples/queries';
import { TESTNET_ENDPOINT } from '../constants';
-
const ROOT_DIR = path.resolve(__dirname, '../../../');
function toAST(content: string) {
@@ -95,29 +94,33 @@ function addQuery(content: string) {
let argsLine;
let argsName;
const lines = content.split(EOL);
- for(let i = 0; i < lines.length; i++) {
+ for (let i = 0; i < lines.length; i++) {
const trimmed = lines[i].trim().replace('// ', '');
const found = Object.keys(ALL_QUERY_CONSTANTS).includes(trimmed);
- if(found){
- if(trimmed.includes("QUERY")){
+ if (found) {
+ if (trimmed.includes('QUERY')) {
queryLine = i;
queryName = trimmed;
- } else if (trimmed.includes("ARGS")){
+ } else if (trimmed.includes('ARGS')) {
argsLine = i;
argsName = trimmed;
}
}
}
- if(queryName && queryLine !== undefined && queryLine !== null){
- lines[queryLine] = `const ${queryName} = ` + "`" + `${ALL_QUERY_CONSTANTS[queryName]}` + "`";
+ if (queryName && queryLine !== undefined && queryLine !== null) {
+ lines[queryLine] =
+ `const ${queryName} = ` + '`' + `${ALL_QUERY_CONSTANTS[queryName]}` + '`';
}
- if(argsName && argsLine){
- lines[argsLine] = `const ${argsName} = ${JSON.stringify(ALL_QUERY_CONSTANTS[argsName], null, 2)}`;
+ if (argsName && argsLine) {
+ lines[argsLine] = `const ${argsName} = ${JSON.stringify(
+ ALL_QUERY_CONSTANTS[argsName],
+ null,
+ 2
+ )}`;
}
- return lines
- .join('\n');
+ return lines.join('\n');
}
const files = new Map();
diff --git a/src/lib/code-import.ts b/src/lib/code-import.ts
index 943d522..c919488 100644
--- a/src/lib/code-import.ts
+++ b/src/lib/code-import.ts
@@ -9,6 +9,7 @@ import * as prettier from 'prettier';
import type { Root } from 'remark-gfm';
import { visit } from 'unist-util-visit';
import type { Parent } from 'unist-util-visit';
+
import { TESTNET_ENDPOINT } from '../constants';
const ROOT_DIR = path.resolve(__dirname, '../../../../../../../');
@@ -109,8 +110,11 @@ export function codeImport(options: Options = { filepath: '' }) {
});
visit(tree, '', (node: any, _idx, _parent) => {
- if(node.type === 'code' && node.value.includes("TESTNET_ENDPOINT"))
- node.value = node.value.replaceAll("TESTNET_ENDPOINT", `'${TESTNET_ENDPOINT}'`);
+ if (node.type === 'code' && node.value.includes('TESTNET_ENDPOINT'))
+ node.value = node.value.replaceAll(
+ 'TESTNET_ENDPOINT',
+ `'${TESTNET_ENDPOINT}'`
+ );
});
nodes.forEach(([node]) => {