diff --git a/docs/spell-check-custom-words.txt b/docs/spell-check-custom-words.txt index 04de3c8..04f8312 100644 --- a/docs/spell-check-custom-words.txt +++ b/docs/spell-check-custom-words.txt @@ -4,6 +4,7 @@ testnets mainnet config JSON +json abigen blockchain blockchain's diff --git a/docs/src/assets.md b/docs/src/assets.md index 0ca1b38..c9845ec 100644 --- a/docs/src/assets.md +++ b/docs/src/assets.md @@ -1,5 +1,16 @@ + # Verified Assets +## Using this section + +You can find the current list of verified assets maintained by Fuel here: [verified-assets.json](https://verified-assets.fuel.network/assets.json) + +Projects are welcome to use this information, but please note that it is provided at your own risk. + +Additionally, you can download the latest asset information and icons in a single archive. This is useful if you want to locally cache the list or include it in a release pipeline for your tools and libraries: [verified-assets.zip](https://github.com/FuelLabs/verified-assets/) + +For more information, please visit the verified assets repository [here](https://github.com/FuelLabs/verified-assets/). + ## Ethereum Sepolia Testnet | Name | Address | Decimals | diff --git a/docs/src/contracts.md b/docs/src/contracts.md index 4392685..59a8474 100644 --- a/docs/src/contracts.md +++ b/docs/src/contracts.md @@ -2,28 +2,28 @@ ## Ethereum Mainnet -Contract Name | Contract Address | Implementation Address ---- | --- | --- -FuelChainState | [0xf3D20Db1D16A4D0ad2f280A5e594FF3c7790f130](https://etherscan.io/address/0xf3D20Db1D16A4D0ad2f280A5e594FF3c7790f130) | [0x725B2b1a15D818E1f25c68be77816802e6036559](https://etherscan.io/address/0x725B2b1a15D818E1f25c68be77816802e6036559) -FuelERC20GatewayV4 | [0xa4cA04d02bfdC3A2DF56B9b6994520E69dF43F67](https://etherscan.io/address/0xa4cA04d02bfdC3A2DF56B9b6994520E69dF43F67) | [0xdE2D792ca3C4d02DE3CE1cD1456d8D0990cC3fab](https://etherscan.io/address/0xdE2D792ca3C4d02DE3CE1cD1456d8D0990cC3fab) -FuelMessagePortal | [0xAEB0c00D0125A8a788956ade4f4F12Ead9f65DDf](https://etherscan.io/address/0xAEB0c00D0125A8a788956ade4f4F12Ead9f65DDf) | [0x05f886DDeE0FE07496f6e38b0e140F8eF4655B16](https://etherscan.io/address/0x05f886DDeE0FE07496f6e38b0e140F8eF4655B16) +Contract Name | Contract Address +--- | --- +FuelChainState | [`0xf3D20Db1D16A4D0ad2f280A5e594FF3c7790f130`](https://etherscan.io/address/0xf3D20Db1D16A4D0ad2f280A5e594FF3c7790f130) +FuelERC20GatewayV4 | [`0xa4cA04d02bfdC3A2DF56B9b6994520E69dF43F67`](https://etherscan.io/address/0xa4cA04d02bfdC3A2DF56B9b6994520E69dF43F67) +FuelMessagePortal | [`0xAEB0c00D0125A8a788956ade4f4F12Ead9f65DDf`](https://etherscan.io/address/0xAEB0c00D0125A8a788956ade4f4F12Ead9f65DDf) ## Fuel Mainnet -Contract Name | Contract Address | Implementation Address ---- | --- | --- -FuelL2BridgeId | [0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8](https://app.fuel.network/contract/0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8/minted-assets) | [0x0ceafc5ef55c66912e855917782a3804dc489fb9e27edfd3621ea47d2a281156](https://app.fuel.network/contract/0x0ceafc5ef55c66912e855917782a3804dc489fb9e27edfd3621ea47d2a281156/minted-assets) +Contract Name | Contract Address +--- | --- +FuelL2BridgeId | [`0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8`](https://app.fuel.network/contract/0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8/minted-assets) ## Ethereum Testnet -Contract Name | Contract Address | Implementation Address ---- | --- | --- -FuelChainState | [0xf38F1e65adc58fc74BaaA132f645Aa5307F2d304](https://sepolia.etherscan.io/address/0xf38F1e65adc58fc74BaaA132f645Aa5307F2d304) | [0xdCF1bdBF5341c15e9C1285202f6F6bEA70Db6172](https://sepolia.etherscan.io/address/0xdCF1bdBF5341c15e9C1285202f6F6bEA70Db6172) -FuelERC20GatewayV4 | [0xd1d5a4379dccC46D5c8D1c6c2656ce705698e359](https://sepolia.etherscan.io/address/0xd1d5a4379dccC46D5c8D1c6c2656ce705698e359) | [0x5F9eAEB3b7ec396F01617e9BAd787D0A6f93B7a3](https://sepolia.etherscan.io/address/0x5F9eAEB3b7ec396F01617e9BAd787D0A6f93B7a3) -FuelMessagePortal | [0x01855B78C1f8868DE70e84507ec735983bf262dA](https://sepolia.etherscan.io/address/0x01855B78C1f8868DE70e84507ec735983bf262dA) | [0x6A541330221BE3df4aD6D696Cd3513c0cBFB4752](https://sepolia.etherscan.io/address/0x6A541330221BE3df4aD6D696Cd3513c0cBFB4752) +Contract Name | Contract Address +--- | --- +FuelChainState | [`0xf38F1e65adc58fc74BaaA132f645Aa5307F2d304`](https://sepolia.etherscan.io/address/0xf38F1e65adc58fc74BaaA132f645Aa5307F2d304) +FuelERC20GatewayV4 | [`0xd1d5a4379dccC46D5c8D1c6c2656ce705698e359`](https://sepolia.etherscan.io/address/0xd1d5a4379dccC46D5c8D1c6c2656ce705698e359) +FuelMessagePortal | [`0x01855B78C1f8868DE70e84507ec735983bf262dA`](https://sepolia.etherscan.io/address/0x01855B78C1f8868DE70e84507ec735983bf262dA) ## Fuel Testnet -Contract Name | Contract Address | Implementation Address ---- | --- | --- -FuelL2BridgeId | 0xd02112ef9c39f1cea7c8527c26242ca1f5d26bcfe8d1564bee054d3b04175471 | 0xfb233ce0bbdc826d1fefa567f025d6f61199f55b59930189841970943cbe6794 +Contract Name | Contract Address +--- | --- +FuelL2BridgeId | `0xd02112ef9c39f1cea7c8527c26242ca1f5d26bcfe8d1564bee054d3b04175471` diff --git a/src/gen-asset-docs.mjs b/src/gen-asset-docs.mjs index 465c874..2350fe9 100644 --- a/src/gen-asset-docs.mjs +++ b/src/gen-asset-docs.mjs @@ -4,6 +4,21 @@ import fetch from 'node-fetch'; const url = "https://raw.githubusercontent.com/FuelLabs/verified-assets/main/ASSETS.md"; const outputPath = "./docs/src/assets.md"; +// The custom section to be included +const customSection = ` +# Verified Assets + +## Using this section + +You can find the current list of verified assets maintained by Fuel here: [verified-assets.json](https://verified-assets.fuel.network/assets.json) + +Projects are welcome to use this information, but please note that it is provided at your own risk. + +Additionally, you can download the latest asset information and icons in a single archive. This is useful if you want to locally cache the list or include it in a release pipeline for your tools and libraries: [verified-assets.zip](https://github.com/FuelLabs/verified-assets/) + +For more information, please visit the verified assets repository [here](https://github.com/FuelLabs/verified-assets/). +`; + // Main function to fetch and write content const fetchAndWriteContent = async () => { try { @@ -13,7 +28,8 @@ const fetchAndWriteContent = async () => { } const text = await response.text(); - const content = "# Verified Assets\n\n" + text; + // Prepend the custom section to the fetched content + const content = customSection + '\n' + text; // Write the content to the specified file fs.writeFileSync(outputPath, content); diff --git a/src/gen-contract-docs.mjs b/src/gen-contract-docs.mjs index f55aa26..c9a48e7 100644 --- a/src/gen-contract-docs.mjs +++ b/src/gen-contract-docs.mjs @@ -36,8 +36,8 @@ const generateMarkdown = async () => { for (const folder of folders) { // Add a section header for the Ethereum contracts mdContent += `## Ethereum ${folder.charAt(0).toUpperCase() + folder.slice(1)}\n\n`; - mdContent += "Contract Name | Contract Address | Implementation Address\n"; - mdContent += "--- | --- | ---\n"; + mdContent += "Contract Name | Contract Address\n"; + mdContent += "--- | ---\n"; // URL to list files in the current folder const folderUrl = `${baseApiUrl}/${folder}?ref=${branch}`; @@ -60,17 +60,15 @@ const generateMarkdown = async () => { // Extract required fields const contractAddress = data.address || 'N/A'; - const implementationAddress = data.implementation || 'N/A'; // Determine the Etherscan URL const etherscanBaseUrl = folder === "mainnet" ? "https://etherscan.io" : "https://sepolia.etherscan.io"; // Create hyperlinks for addresses - const contractAddressLink = contractAddress !== 'N/A' ? `[${contractAddress}](${etherscanBaseUrl}/address/${contractAddress})` : 'N/A'; - const implementationAddressLink = implementationAddress !== 'N/A' ? `[${implementationAddress}](${etherscanBaseUrl}/address/${implementationAddress})` : 'N/A'; + const contractAddressLink = contractAddress !== 'N/A' ? `[\`${contractAddress}\`](${etherscanBaseUrl}/address/${contractAddress})` : 'N/A'; // Add to markdown content - mdContent += `${contractName} | ${contractAddressLink} | ${implementationAddressLink}\n`; + mdContent += `${contractName} | ${contractAddressLink}\n`; } // Add a newline for separation between sections @@ -84,21 +82,19 @@ const generateMarkdown = async () => { if (!fuelData) continue; const fuelContractAddress = fuelData.address || 'N/A'; - const fuelImplementationAddress = fuelData.implementation || 'N/A'; // Add Fuel section mdContent += `## Fuel ${folder.charAt(0).toUpperCase() + folder.slice(1)}\n\n`; - mdContent += "Contract Name | Contract Address | Implementation Address\n"; - mdContent += "--- | --- | ---\n"; + mdContent += "Contract Name | Contract Address\n"; + mdContent += "--- | ---\n"; if (folder === "mainnet") { // Create hyperlinks for mainnet addresses - const fuelAddressLink = `[${fuelContractAddress}](https://app.fuel.network/contract/${fuelContractAddress}/minted-assets)`; - const fuelImplementationLink = fuelImplementationAddress !== 'N/A' ? `[${fuelImplementationAddress}](https://app.fuel.network/contract/${fuelImplementationAddress}/minted-assets)` : 'N/A'; - mdContent += `FuelL2BridgeId | ${fuelAddressLink} | ${fuelImplementationLink}\n\n`; + const fuelAddressLink = `[\`${fuelContractAddress}\`](https://app.fuel.network/contract/${fuelContractAddress}/minted-assets)`; + mdContent += `FuelL2BridgeId | ${fuelAddressLink}\n\n`; } else { // Just show the addresses for testnet - mdContent += `FuelL2BridgeId | ${fuelContractAddress} | ${fuelImplementationAddress}\n\n`; + mdContent += `FuelL2BridgeId | \`${fuelContractAddress}\`\n\n`; } } }