diff --git a/README.md b/README.md index 959320922..31afaaf24 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ In fact, it's part of the PR process. ### Contribute to community tutorials If you've created fleshed-out guides and tutorials, or intend to, we'd love to feature your content -in our [community tutorials section](developers/guides/community). +in our [community tutorials section](./docs/developers/guides/community/index.mdx). First, create an issue describing the content you want to see added or intend to add. If you're representing an organization (such as a dapp), please use the ecosystem contribution issue form. diff --git a/docs/developers/guides/finalized-block.mdx b/docs/developers/guides/finalized-block.mdx index 83ab96b63..f41ca1b06 100644 --- a/docs/developers/guides/finalized-block.mdx +++ b/docs/developers/guides/finalized-block.mdx @@ -6,24 +6,34 @@ image: /img/socialCards/retrieve-finalized-l2-blocks.jpg A finalized L2 block is a block on an L2 blockchain (Linea) that has been confirmed and validated by the L1 blockchain (Ethereum), ensuring its immutability and security. -Linea doesn't currently support the Ethereum-standard `finalized` block parameter tag, meaning you -cannot use the tag in JSON-RPC API calls to retrieve blocks that have been confirmed by the L1 -network. This includes, for example, methods where you can specify a block parameter, such as -[`linea_estimateGas`](../reference/api/linea-estimategas.mdx). +There are two methods to obtain the current finalized block: -:::note -Support for the `finalized` block parameter is planned in a future Linea release. -::: +- [Use the `finalized` block parameter tag](#use-the-finalized-tag) in JSON-RPC API calls. +- [Query the Linea L1 rollup contract](#query-the-rollup-contract). -This limitation requires you to query the [Linea L1 rollup contract](https://etherscan.io/address/0xd19d4b5d358258f05d7b411e21a1460d11b0876f#readProxyContract) -to retrieve the value of the current finalized L2 block number stored in the `currentL2BlockNumber` -variable. +## Use the `finalized` tag -## Prerequisites +Use the `finalized` tag in API calls to specify a block that has been confirmed by the L1 +network. For example, here the `eth_getBlockByNumber` method returns information about the current +finalized block: + +```bash +curl https://rpc.linea.build \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["finalized",false],"id":1}' +``` + +## Query the rollup contract + +Query the [Linea L1 rollup contract](https://etherscan.io/address/0xd19d4b5d358258f05d7b411e21a1460d11b0876f#readProxyContract) +to retrieve the value of the current finalized L2 block number stored in the `currentL2BlockNumber` variable. + +### Prerequisites - [Download and install Node.js](https://nodejs.org/en) -## Create the script +### Create the script 1. In your project folder, initialize the project and install the `web3` package: diff --git a/docs/developers/linea-version/index.mdx b/docs/developers/linea-version/index.mdx index 3130201b5..a83871d5a 100644 --- a/docs/developers/linea-version/index.mdx +++ b/docs/developers/linea-version/index.mdx @@ -10,6 +10,52 @@ import zkEVM2 from "!!raw-loader!/files/testnet/2023-06-13-release/zkEVM2.abi"; import L2MessageService from "!!raw-loader!/files/testnet/2023-06-13-release/L2MessageService.abi"; import TokenBridgeL1 from "!!raw-loader!/files/testnet/2023-06-13-release/TokenBridgeL1.abi"; import TokenBridgeL2 from "!!raw-loader!/files/testnet/2023-06-13-release/TokenBridgeL2.abi"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +## Alpha v3.5.2 + +### Transaction exclusion API + +**Mainnet: September 23** + +**Linea Sepolia: September 16** + +Introduces an API that can be used to check whether a transaction was rejected because it exceeded +the sequencer's trace limits. + +## Alpha v3.5.1 + +### Linea native bridge UI v2 + +**Mainnet: September 18** + +**Linea Sepolia: September 16** + +Upgrades the [Linea bridge](https://bridge.linea.build/) UI. + +## Alpha v3.5.0 + +### `finalized` tag + +**Mainnet: September 16** + +**Linea Sepolia: Already available** + +Adds support for the `finalized` tag to the `blockParameters` strings that can be used in various +JSON-RPC API calls. The tag enables you to confirm whether or not a block has been finalized on L1. +See our [guide](../guides/finalized-block.mdx) for more. + +## Alpha v3.4.1 + +### Reactivate `linea_estimateGas` + +**Mainnet: September 16** + +**Linea Sepolia: September 9** + +Reactivates [`linea_estimateGas`](../reference/api/linea-estimategas.mdx), disabling compatibility +mode. ## Alpha v3.4 diff --git a/docs/developers/quickstart/deploy-smart-contract/cookbook.md b/docs/developers/quickstart/deploy-smart-contract/cookbook.md index 3513e27b1..158dec531 100644 --- a/docs/developers/quickstart/deploy-smart-contract/cookbook.md +++ b/docs/developers/quickstart/deploy-smart-contract/cookbook.md @@ -17,8 +17,8 @@ Cookbook's no-code deploy and using Cookbook with Remix, Hardhat and Foundry. Before you begin, ensure you: -1. [Set up your wallet](/users/move-funds/set-up-your-wallet) -2. [Fund your wallet with Linea ETH](/users/move-funds/fund) on either the testnet or mainnet +1. [Set up your wallet](../../../users/move-funds/set-up-your-wallet.mdx) +2. [Fund your wallet with Linea ETH](../../../users/move-funds/fund.mdx) on either the testnet or mainnet ## Search Cookbook's smart contract registry diff --git a/docs/developers/quickstart/deploy-smart-contract/foundry.md b/docs/developers/quickstart/deploy-smart-contract/foundry.md index e9821a187..9fd7e28ae 100644 --- a/docs/developers/quickstart/deploy-smart-contract/foundry.md +++ b/docs/developers/quickstart/deploy-smart-contract/foundry.md @@ -23,8 +23,8 @@ In this quickstart, we'll create a basic [Foundry](https://book.getfoundry.sh/) Before you begin, ensure you: -1. [Set up your wallet](/users/move-funds/set-up-your-wallet) -1. [Fund your wallet with Linea ETH](/users/move-funds/fund) on either the testnet, or mainnet +1. [Set up your wallet](../../../users/move-funds/set-up-your-wallet.mdx) +1. [Fund your wallet with Linea ETH](../../../users/move-funds/fund.mdx) on either the testnet, or mainnet 1. Download and install Foundry: ```bash @@ -72,8 +72,9 @@ forge create --rpc-url YOUR_LINEA_ENDPOINT src/Counter.sol:Counter --private-key In the command: -- Replace `YOUR_LINEA_ENDPOINT` with the URL of a [supported Infura Linea network](https://docs.infura.io/api/networks/linea/choose-a-network) - or [public endpoint URL](/developers/quickstart/info-contracts#network-information). +- Replace `YOUR_LINEA_ENDPOINT` with the URL of a + [supported Infura Linea network](https://docs.infura.io/api/networks/linea/choose-a-network) + or [public endpoint URL](../info-contracts.mdx#network-information). - Replace `YOUR_PRIVATE_KEY` with your wallet's private key. Your output should look similar to: diff --git a/docs/developers/quickstart/deploy-smart-contract/remix.md b/docs/developers/quickstart/deploy-smart-contract/remix.md index 195c74507..173cfbd5d 100644 --- a/docs/developers/quickstart/deploy-smart-contract/remix.md +++ b/docs/developers/quickstart/deploy-smart-contract/remix.md @@ -12,8 +12,8 @@ In this tutorial, we'll walk through creating a basic Remix project and deployin Before you begin, ensure you: -1. [Set up your wallet](/users/move-funds/set-up-your-wallet) -2. [Fund your wallet with Linea ETH](/users/move-funds/fund) on either the testnet, or mainnet +1. [Set up your wallet](../../../users/move-funds/set-up-your-wallet.mdx) +2. [Fund your wallet with Linea ETH](../../../users/move-funds/fund.mdx) on either the testnet, or mainnet ## Explore the Remix workspace @@ -49,8 +49,10 @@ on and your account information. To do this, navigate to the **Deploy & run tran :::caution -The public endpoints are rate limited and not meant for production systems. To use Infura, you'll need to [get an API key](https://support.infura.io/hc/en-us/articles/15116941373979-Connecting-to-the-Linea-network). Then, [manually add a network to your MetaMask wallet](https://support.metamask.io/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC#h_01G63GGJ83DGDRCS2ZWXM37CV5) with the information found -[here](/developers/quickstart/info-contracts#network-information). +The public endpoints are rate limited and not meant for production systems. To use Infura, you'll need to +[get an API key](https://docs.infura.io/api/getting-started). +Then, [manually add a network to your MetaMask wallet](https://support.metamask.io/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC#h_01G63GGJ83DGDRCS2ZWXM37CV5) using the +[network information](../info-contracts.mdx#network-information). ::: diff --git a/docs/developers/quickstart/verify-smart-contract/foundry.md b/docs/developers/quickstart/verify-smart-contract/foundry.md index 1327b8141..9e99d2b69 100644 --- a/docs/developers/quickstart/verify-smart-contract/foundry.md +++ b/docs/developers/quickstart/verify-smart-contract/foundry.md @@ -14,7 +14,8 @@ You'll need to get a Lineascan (Linea instance of Etherscan) API key by creating :::note -These instructions verify using the Linea instance of Etherscan, which currently does not support Yul. If you would like to verify using Blockscout, please use the API URLs referenced [here](/developers/quickstart/info-contracts#block-explorers). +These instructions verify using the Linea instance of Etherscan, which currently does not support Yul. If you +would like to verify using Blockscout, please use the [Blockscout API URL for the required network](../info-contracts.mdx#block-explorers). ::: @@ -84,9 +85,11 @@ You can check that it was verified correctly by navigating to the [testnet block ## Using `.env` and `foundry.toml` to store etherscan information -If you don't want to paste your keys inline and have multiple Etherscan API keys to manage, you can use `.env` and `foundry.toml` to set up custom configurations. +If you don't want to paste your keys inline and have multiple Etherscan API keys to manage, you can use +the `.env` and `foundry.toml` files to set up custom configurations. -Assuming you followed the instructions to create a `.env` file [here](../deploy-smart-contract/foundry), add your Lineascan API key to the file: +These steps assume you stored your secret keys in a `.env` file. which you can read more about +[in the Foundry deployment instructions](../deploy-smart-contract/foundry.md#deploy-a-smart-contract-using-a-env-file). ```bash LINEASCAN_API_KEY=YOUR_LINEASCAN_API_KEY @@ -126,8 +129,7 @@ forge verify-contract --chain linea-testnet path_to_contract:contract_name --wat :::info - - -Learn more about different configurations for verifying your smart contracts [here](https://book.getfoundry.sh/reference/forge/forge-verify-contract) and [here](https://book.getfoundry.sh/forge/deploying). - +Learn more about different configurations for verifying your smart contracts using the +[`forge verify-contract`](https://book.getfoundry.sh/reference/forge/forge-verify-contract#forge-verify-contract) +command and the [Forge deployment instructions](https://book.getfoundry.sh/forge/deploying). ::: diff --git a/docs/developers/quickstart/verify-smart-contract/hardhat.md b/docs/developers/quickstart/verify-smart-contract/hardhat.md index 42e07bfe1..0ce303d7e 100644 --- a/docs/developers/quickstart/verify-smart-contract/hardhat.md +++ b/docs/developers/quickstart/verify-smart-contract/hardhat.md @@ -3,16 +3,16 @@ title: Hardhat image: /img/socialCards/hardhat.jpg --- -To verify your Hardhat contracts, you can use [Hardhat's Etherscan plugin](https://hardhat.org/hardhat-runner/plugins/nomiclabs-hardhat-etherscan) to verify contracts on Lineascan. +To verify your Hardhat contracts, use [Hardhat's Etherscan plugin](https://hardhat.org/hardhat-runner/plugins/nomiclabs-hardhat-etherscan) to verify contracts on Lineascan. :::note - -Note that this is included as part of the `hardhat-toolbox` plugin. +This is included as part of the `hardhat-toolbox` plugin. ::: -These steps assume you stored your secret keys in a `.env` file, which you can read more about [here](../deploy-smart-contract/hardhat). +These steps assume you stored your secret keys in a `.env` file. which you can read more about +[in the Hardhat deployment instructions](../deploy-smart-contract/hardhat.mdx#deploy-the-contract). ## Download the plugin @@ -20,9 +20,8 @@ If you aren't already using `@nomicfoundation/hardhat-toolbox`, you can use `@no ## Add your Lineascan API Key -We'll be using a `.env` file to store our sensitive information. You can find instructions on how to set up the file [here](../deploy-smart-contract/hardhat). - -Next, you'll need to get a Lineascan (Linea instance of Etherscan) key by creating an account at [https://lineascan.build/myapikey](https://lineascan.build/myapikey). Grab your key, and add it to the `.env` file: +Obtain a Lineascan (Linea instance of Etherscan) key by creating an account at +[https://lineascan.build/myapikey](https://lineascan.build/myapikey). Grab your key, and add it to the `.env` file: ``` LINEASCAN_API_KEY=YOUR_API_KEY_HERE @@ -39,7 +38,8 @@ const { PRIVATE_KEY, LINEASCAN_API_KEY } = process.env; :::note -These instructions verify using the Linea instance of Etherscan, which currently does not support Yul. If you would like to verify using Blockscout, please use the API URLs referenced [here](/developers/quickstart/info-contracts#block-explorers). +These instructions verify using the Linea instance of Etherscan, which currently does not support Yul. If you +would like to verify using Blockscout, please use the [Blockscout API URL for the required network](../info-contracts.mdx#block-explorers). ::: diff --git a/docs/developers/reference/api/linea-estimategas.mdx b/docs/developers/reference/api/linea-estimategas.mdx index e5de7920b..0887def84 100644 --- a/docs/developers/reference/api/linea-estimategas.mdx +++ b/docs/developers/reference/api/linea-estimategas.mdx @@ -61,10 +61,13 @@ using `linea_estimateGas` for more accurate results. - `value`: _\[optional]_ Hexadecimal value of the value sent with this transaction. - `data`: _\[optional]_ Hash of the method signature and encoded parameters. See the [Ethereum contract ABI specification](https://docs.soliditylang.org/en/latest/abi-spec.html). - - `block number`: _\[optional]_ A string representing a block number, or one of the string tags `latest`, `earliest`, or - `pending`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - You can [query the L1 rollup contract](../../guides/finalized-block.mdx) to retrieve the current finalized block. + - `block number`: _\[optional]_ A string representing a block number, or one of the string tags `latest`, `earliest`, + `pending`, or `finalized`. + :::note + A `finalized` block is a block on an L2 blockchain (Linea) that has been confirmed and validated by + the L1 blockchain (Ethereum). + ::: ## Returns diff --git a/docs/developers/reference/api/linea-getproof.mdx b/docs/developers/reference/api/linea-getproof.mdx index 94a614e89..c4c0c395b 100644 --- a/docs/developers/reference/api/linea-getproof.mdx +++ b/docs/developers/reference/api/linea-getproof.mdx @@ -16,21 +16,17 @@ The supplied block parameter must be an L2 block that has been finalized on L1. In the [example response](#response) the account exists but the slot does not. -:::info important - -Linea currently does not support the block parameter `finalized`, meaning that to get the current -finalised block on the L1, users must [retrieve the value from the `currentL2BlockNumber`](../../guides/finalized-block.mdx) -variable in the [LineaRollup L1 contract](https://etherscan.io/address/0xd19d4b5d358258f05d7b411e21a1460d11b0876f#readProxyContract). - -::: - ## Parameters - `address`: A string representing the address (20 bytes) for which the proof is requested. - `storageKeys`: An array of 32-byte storage keys to be proofed and included. -- `blockParameter`: A hexadecimal block number, or one of the string tags `latest`, `earliest`, or - `pending`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - You can [query the L1 rollup contract](../../guides/finalized-block.mdx) to retrieve the current finalized block. +- `blockParameter`: A hexadecimal block number, or one of the string tags `latest`, `earliest`, + `pending`, or `finalized`. + + :::note + A `finalized` block is a block on an L2 blockchain (Linea) that has been confirmed and validated by + the L1 blockchain (Ethereum). + ::: ## Returns diff --git a/docs/developers/tooling/automation/_category_.json b/docs/developers/tooling/automation/_category_.json deleted file mode 100644 index 0be7fb295..000000000 --- a/docs/developers/tooling/automation/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "label": "Automation" -} diff --git a/docs/developers/tooling/automation/hal-stream.md b/docs/developers/tooling/automation/hal-stream.md deleted file mode 100644 index e339075db..000000000 --- a/docs/developers/tooling/automation/hal-stream.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Hal Stream -image: /img/socialCards/hal-stream.jpg ---- - -# Hal Stream - -As a web3 developer, manually monitoring on-chain activities can be a complex and time-consuming task. Integrating real-time blockchain data into existing tools or platforms often requires custom infrastructure. Hal Stream is a no-code tool that delivers real-time data streaming from the Linea blockchain, automating the process of tracking and filtering blockchain events and exposing data in a standard way. - -## Key Features - -### Data Streaming: - -Hal Stream ensures real-time updates on all on-chain activities such as transactions, contract interactions, events, and more, keeping your applications synced with the latest blockchain events. - -### Automation and Integration: - -Hal Stream's integration capabilities enable automatic data streaming to various endpoints including webhooks, databases, and AWS SQS. This automation streamlines the process of combining blockchain data with your existing tools and platforms, enhancing overall development efficiency. - -You can find the Hal Stream documentation [here](https://docs.hal.xyz/docs "Hal Stream documentation") diff --git a/docs/developers/tooling/automation/index.mdx b/docs/developers/tooling/automation/index.mdx deleted file mode 100644 index c2256193b..000000000 --- a/docs/developers/tooling/automation/index.mdx +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Automation -image: /img/socialCards/automation.jpg ---- - - -import DocCardList from '@theme/DocCardList'; - - diff --git a/docs/developers/tooling/cloud-infra/spheron.md b/docs/developers/tooling/cloud-infra/spheron.md index 6ee49cd07..1ea553f8c 100644 --- a/docs/developers/tooling/cloud-infra/spheron.md +++ b/docs/developers/tooling/cloud-infra/spheron.md @@ -5,296 +5,11 @@ image: /img/socialCards/spheron-network.jpg ## What is Spheron? -[Spheron](https://spheron.network/) is a platform-as-a-service (PaaS) designed for dapps looking to launch their applications on decentralized infrastructure with optimal performance, and provides compute capabilities, decentralized storage, CDN and web hosting out of the box. With its comprehensive set of tools and services rooted in web3 infrastructure provision, Spheron empowers developers to meet the dynamic demands of the digital landscape. Its exceptional performance not only rivals web2 counterparts but also showcases the potential of web3 technology for the next generation of applications. - -> Learn more about Spheron through [our documentation](https://docs.spheron.network/). - -## How to deploy a static site on Spheron - -Deploying static apps on Spheron is straightforward. Follow these steps: - -1. **Connect your Git provider:**
Connecting your Git provider allows Spheron to sync your repositories and trigger deployments whenever new updates are made. Spheron supports the following [Git providers](https://docs.spheron.network/static/deployment/logs/): Github, Gitlab, and Bitbucket. - -2. **Set up your project:**
Create a new project on Spheron and choose your desired app repository for deployment. - -3. **Select deployment protocol:**
Select the desired protocol for hosting your static app. Spheron supports **Arweave**, **Filecoin**, and **IPFS**. - -4. **Configure deployment settings:**
Spheron will automatically detect and configure most of these settings for you, though you have to [add environment variables](https://docs.spheron.network/static/projects/variables/) in the dedicated section. If needed, modify the remaining parameters according to your requirements. That includes selecting the framework, branch, root directory, build and output settings, and the node engine. - -5. **Trigger deployment:**
After configuring all the required settings, initiate the deployment process. Spheron will fetch your code, build the static files, and deploy them to your specified protocol. - -6. **Access your app:**
Once the deployment is complete, you can access your app through the domain generated by Spheron. You also have the option to [set up a custom domain](https://docs.spheron.network/static/projects/domain/) for your app. - -> Checkout our [Framework Guide](https://docs.spheron.network/framework-guide/) for more info. - -## How to deploy dynamic apps/servers on Spheron - -Whether you're using a Docker image from Docker Hub or deploying a marketplace app, deploying compute instances on Spheron is simple and effortless. Follow these steps to deploy your compute instance on Spheron: - -1. **Set up your cluster:**
Create a new cluster on Spheron by selecting **Import from Docker Hub** or **Start from Marketplace App**. - -2. **For Docker Hub:**
- - 1. Click "New Cluster" in the top-right corner. - 2. Select **Import from Docker Hub**. - 3. Enter the names for your cluster and docker image. - 4. Then, add the tag and click "Next." - 5. Choose your compute type option under **Compute Type**. - 6. Select your preferred **Region**, if any. If you do not add a region, the container will be deployed in **any** region for **Spot**, or in the **eu-east** region for **On Demand**. [Click here](https://docs.spheron.network/compute/cluster/compute#region) to learn more. - 7. Spheron will automatically select the recommended plan for the specific template. If you intend to move forward with the recommended plan, click "Deploy" to initiate deployment. - 8. Select the instance plan that suits your needs. Use the "Create Custom Plan" toggle to create custom plans for your instance. - 9. Configure the storage (SSD) plan for your instance. Use the "Add Persistent Storage" toggle to add persistent storage for your instance. - 10. Create new **Port Policy Mapping**. Add the container port and select the exposed port you want to map it to. Refer to our docs for more information. - 11. Add **Environment Variable**, if any. - 12. Add **Secret Environment Variable** if the value is a secret key. It will not be saved in the database. [Click here](https://docs.spheron.network/compute/cluster/compute#secret-environment-variables) to learn more. - 13. You can add advanced configuration if required. [Click here](https://docs.spheron.network/compute/cluster/compute#advance-configuration-1) to read more. - 14. You can add a health checkup if required. [Click here](https://docs.spheron.network/compute/cluster/compute#health-checkup) to learn more. - 15. Click "Deploy" to initiate deployment. - -
- - > Checkout our [Server Guide](https://docs.spheron.network/server-guide/) for more info. - -3. **For a Marketplace app:**
- - 1. Click "New Cluster" in the top right corner. - 2. Select **Start from Marketplace App**. - 3. Pick your desired template from the marketplace. - 4. Choose your desired compute type option under **Compute Type**. - 5. Select your preferred **Region**, if any. If you do not add a region, the container will be deployed in **any** region for **Spot**, or in the **eu-east** region for **On Demand**. [Click here](https://docs.spheron.network/compute/cluster/compute#region) to learn more. - 6. Spheron will automatically select the recommended plan for the specific template. If you intend to move forward with the recommended plan, just click "Deploy" to initiate deployment. - 7. Select the instance plan that suits your needs. Use the "Create Custom Plan" toggle to create custom plans for your instance. - 8. Configure the storage (SSD) plan for your instance. Use the "Add Persistent Storage" toggle to add persistent storage for your instance. - 9. You can add advanced configuration if required. [Click here](https://docs.spheron.network/compute/cluster/compute#advance-configuration-1) to know more. - 10. Click "Deploy" to initiate deployment. - -
- - > Checkout our [Marketplace Guide](https://docs.spheron.network/marketplace-guide/) for more info. - -## How to upload to IPFS using Spheron SDK - -### 1. Spheron Storage SDK (for Nodejs environments) - -### Installation - -```sh -npm i @spheron/storage -``` - -### Usage - -```js -import { SpheronClient, ProtocolEnum } from "@spheron/storage"; - -const client = new SpheronClient({ token }); - -let currentlyUploaded = 0; - -const { uploadId, bucketId, protocolLink, dynamicLinks } = await client.upload( - filePath, - { - protocol: ProtocolEnum.IPFS, - name, - onUploadInitiated: (uploadId) => { - console.log(`Upload with id ${uploadId} started...`); - }, - onChunkUploaded: (uploadedSize, totalSize) => { - currentlyUploaded += uploadedSize; - console.log(`Uploaded ${currentlyUploaded} of ${totalSize} Bytes.`); - }, - }, -); -``` - -> Checkout our [Storage SDK Documentation](https://docs.spheron.network/sdk/storage-v2/) for more info. - -### 2. Spheron Browser Upload SDK (for Browser environments) - -### Installation - -```sh -npm i @spheron/browser-upload -``` - -### Usage - -**Server** - -You have to set up a web server with an endpoint that will be used by the frontend to fetch the token for upload. - -```js -import { SpheronClient, ProtocolEnum } from "@spheron/storage"; - -... - -app.get("/initiate-upload", async (req, res, next) => { - try { - const bucketName = "example-browser-upload"; // use your preferred name - const protocol = ProtocolEnum.IPFS; // use your preferred protocol - const token = process.env.SPHERON_TOKEN; // add your access token in .env or paste it here - - const client = new SpheronClient({ token }); - - const { uploadToken } = await client.createSingleUploadToken({ - name: bucketName, - protocol, - }); - - res.status(200).json({ - uploadToken, - }); - } catch (error) { - console.error(error); - next(error); - } -}); -``` - -**Client** - -You have to send a request to your server to create the uploadToken that will be used to upload files from the browser. - -```js -import { upload } from "@spheron/browser-upload"; - -... - -const response = await fetch(`/initiate-upload`); // get the temporary access token from server -const resJson = await response.json(); -const token = resJson.uploadToken; - -let currentlyUploaded = 0; - -const { uploadId, bucketId, protocolLink, dynamicLinks } = await upload(files, { - token, - onChunkUploaded: (uploadedSize, totalSize) => { - currentlyUploaded += uploadedSize; - console.log(`Uploaded ${currentlyUploaded} of ${totalSize} Bytes.`); - }, -}); - -... -``` - -> Checkout our [Browser Upload SDK](https://docs.spheron.network/sdk/browser/) for more info. - -> Checkout all other [SDKs](https://docs.spheron.network/sdk/) for more in-depth information. - -## How to create and deploy apps using Spheron CLI - -## Installation - -### For Mac and Linux - -To install the Spheron CLI, run the following command in your terminal: - -``` -sudo npm install -g @spheron/cli -``` - -### For Windows - -To install the Spheron CLI, open your terminal in administrator mode and run the following command: - -``` -npm install -g @spheron/cli -``` - -## Usage - -### `spheron init` - -The `spheron init` command allows you to initialize a new Spheron project. A `spheron.json` file is created in your current path that describes your project. It will be utilized by the `spheron publish` command. - -### Usage - -```sh -spheron init -``` - -Upon running this command, a prompter will appear that will allow you to select protocol, add project name, add path, and select framework. Here is how it will look: - -```sh -? Project name: (Code) -? Upload protocol: (Use arrow keys) - Arweave - Filecoin -❯ IPFS -``` - -### `spheron publish` - -The `spheron publish` command allows you to upload your project using the configuration that is described in the `spheron.json` file of your project. - -#### Usage - -```sh -spheron publish -``` - -:::note - - Make sure that you create a production build before running the `spheron publish` command. - -::: - -Here is an example of how the result will look: - -```sh -Spheron CLI 1.0.7 - -Publishing your dapp to IPFS 🚀 -Uploading directory build -Upload started, ID of deployment: 643fce207c3c7a0012df33a7 -⠙ Uploading to IPFS -✓ Success! Upload finished ! -Here are upload details: -Upload ID: 643fce207c3c7a0012df33a7 -Bucket ID: 643fce207c3c7a0012df33a5 -Protocol Link: https://bafybeicrjwhn6nifl7tcuhkcitquvpumj426qa7r7ppcya5skmqly5n2la.ipfs.sphn.link -Dynamic Links: https://testapp-edab50.spheron.app -``` - -> Checkout our [CLI Documentation](https://docs.spheron.network/cli/) for more info. - -## How to view and retrieve content from IPFS using Spheron - -### Dedicated IPFS gateways - -[Dedicated gateways](https://docs.spheron.network/gateways/dedicated/) are IPFS gateways specifically designed to enhance access to pinned content across the network by offering faster speeds and increased rate limits. - -Using dedicated gateways offers several benefits: - -- Improved speed -- Increased rate limits -- White-labeling gateway -- Serve content from any IPFS node - -### Create a dedicated gateway - -Follow these steps to create a dedicated gateway: - -1. Log in to Spheron and navigate to the **Gateways** section in the navbar. -2. Click **Generate** to create a new gateway. -3. Enter a name for your gateway and click **Create**. - -### How to use your gateway - -To access content through your dedicated gateway, simply follow these steps: - -1. Obtain the CID (content identifier) of the file you wish to view. -2. Append the CID to your gateway URL in the following format: - -``` -https://{gateway-name}.spheron.link/ipfs/{cid} -``` - -> Checkout our [gateway documentation](https://docs.spheron.network/gateways/dedicated/) for more information. - -## Further resources - -- Visit [our platform](https://spheron.network/) to learn more. -- Access our comprehensive [documentation](https://docs.spheron.network/) for detailed information. -- Follow us on [Twitter](https://twitter.com/SpheronFDN) for the latest updates and news. -- Join our [Community](https://community.spheron.network/) for dedicated support and assistance. +[Spheron Network](https://www.spheron.network/) is a decentralized compute provider and marketplace that offers scalable and secure +infrastructure solutions. It aims to create a decentralized GPU exchange for global AI workloads, enabling +projects from DeFi to AI to access high-quality compute solutions at lower costs compared to traditional +providers. Spheron focuses on simplicity, usability, and support to build an efficient global compute system +for the next generation of applications. + +View the [Spheron documentation](https://docs.spheron.network/) for information on how to deploy and manage +your decentralized applications using the platform. \ No newline at end of file diff --git a/docs/developers/tooling/data-indexers/decommas.md b/docs/developers/tooling/data-indexers/decommas.md deleted file mode 100644 index 4119ee6da..000000000 --- a/docs/developers/tooling/data-indexers/decommas.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: DeCommas -image: /img/socialCards/decommas.jpg ---- - -## Useful links and docs: - -Recently, DeCommas team published a tutorial on how to Implement Balances features using DeCommas API with Linea Support, check on more here: [Tutorial: Implementing Balances features using DeCommas Mission Control API with Linea Support](https://medium.com/@DeCommas/tutorial-implementing-balances-features-using-decommas-mission-control-api-with-linea-support-4c2f071e3fbb) - -Other resources are available here: - -[DeCommas API](https://build.decommas.io/) - -[API Documentation](https://childlike-draw-f65.notion.site/DeCommas-API-8a27a7894ded487b9ad5805ddc207f07) - -[API SDK](https://www.npmjs.com/package/@decommas/sdk) - -[DeCommas Twitter](https://twitter.com/decommas) - -[DeCommas Discord](https://discord.gg/DYEXjHEENu) - -[Tutorial: Building a Feature to Track UserOps using DeCommas API](https://medium.com/@DeCommas/tutorial-building-a-feature-to-track-userops-using-decommas-api-6dbe3fcc066c) - -[Tutorial: How to Use the New NFT Endpoints using DeCommas API](https://medium.com/@DeCommas/tutorial-how-to-use-the-new-nft-endpoints-using-decommas-api-7b3ca458b945?source=user_profile---------2----------------------------) - -[Tutorial: Implementing Balances features using DeCommas Mission Control API with Linea Support](https://medium.com/@DeCommas/tutorial-implementing-balances-features-using-decommas-mission-control-api-with-linea-support-4c2f071e3fbb?source=user_profile---------3----------------------------) - -[Introducing DeCommas Price Service](https://medium.com/@DeCommas/introducing-decommas-price-service-7bc1279f620f?source=user_profile---------5----------------------------) - -[Tutorial: How to Build a Top Token Holders Feature Using the DeСommas Mission Control API](https://medium.com/@DeCommas/tutorial-how-to-build-a-top-token-holders-feature-using-the-de%D1%81ommas-mission-control-api-2309c3c83ff4?source=user_profile---------6----------------------------) - -[Tutorial (Part 2): An Overview of How Users can Add Protocols Endpoint Feature to a Web3 Portfolio Tracker](https://medium.com/@DeCommas/tutorial-part-2-an-overview-of-how-users-can-add-protocols-endpoint-feature-to-a-web3-portfolio-58477abd75f3?source=user_profile---------7----------------------------) - -[Tutorial: Building Activity Feed Using DeCommas Mission Control API](https://medium.com/@DeCommas/tutorial-building-activity-feed-using-decommas-mission-control-api-3323456f81d5?source=user_profile---------8----------------------------) - -[Tutorial: Building a web3 Portfolio Tracker using Mission Control API](https://medium.com/@DeCommas/tutorial-building-a-web3-portfolio-tracker-using-mission-control-api-c53cea89ee2d?source=user_profile---------9----------------------------) - -[Tutorial for Accessing NFT Data Using Datalayer](https://medium.com/@DeCommas/tutorial-for-accessing-nft-data-using-datalayer-77fc04062426?source=user_profile---------11----------------------------) - -## DeCommas API - -DeCommas API is a speedy, scalable and cost-effective web3 API. It puts indexed blockchain available data in arms reach, making development of web3 applications such as Portfolio Trackers, Wallets, Web3 search bars and Activity feeds a breeze. DeCommas API contains: - -- Datalayer & Datalayer API: Scalable, speedy and cost-efficient indexed Blockchain, NFT and Protocol data accessible through a developer friendly API. -- Price Service API: provides a comprehensive overview of ERC-20 price calculations using on-chain data from multiple decentralized exchange pools. - -Using the DeCommas API, you’ll get access to a develop toolbox that’s: - -- Blazing fast - Accessing indexed blockchain data through the Datalayer API yields response times of under 300ms per request. -- Free to use in many scenarios - Just getting started or pushing a smaller feature? DeCommas API is, in many cases, completely free to use! -- Cost-efficient at scale - Highly competitive prices with the potential to decrease infrastructure cost by up to 40-80% (depending on the project's needs). -- Developer friendly - All of this is accessible through easy to use, flexible and well documented APIs and an SDK. - -Among our clients are prominent projects like CoinsStats, reaching 20M+ monthly API calls. -DeCommas API is currently available for the following networks: - -- Mainnet -- Linea -- Arbitrum -- Arbitrum Nova -- Avalanche -- Optimism -- BSC -- Fantom -- Gnosis -- Polygon -- Polygon zkEVM -- Base -- opBNB -- Mantle -- Scroll - -Get access to DeCommas API via [https://build.decommas.io](https://build.decommas.io). More info on pricing is available at [https://build.decommas.io/pricing](https://build.decommas.io/pricing) - -## DeCommas Price Service - -Along with DeCommas API, we have the Price Service that provides a comprehensive overview of ERC-20 price calculations using on-chain data from multiple decentralized exchange pools. - -### The Price Service API currently provides data from the following networks: -- Mainnet -- Polygon -- Linea (will be rolled out in the future) - -### Price Service Endpoints: -- [Get Price](https://docs.decommas.io/501f5a3b49d444f1964f265697d8068b) - -## Getting access to DeCommas API - -Gaining access to DeCommas API is simple: -Head to [https://build.decommas.io/](https://build.decommas.io/) - -1. Click “Get Started” -2. Enter your email address -3. Check your email and click the link to sing in -4. You are now redirected to [https://dashboard.decommas.io/](https://dashboard.decommas.io/), which contains your API keys -Make sure you’ve got your API keys ready. Copy and paste them to a spot where you can easily find them, but keep them safe too. - -### Setting up DeCommas API in your environment - -You can set up the DeCommas API in your environment using either of these two methods: one is via a raw HTTPS request, and the other is using a special toolkit if you’re into JavaScript. - -If you choose the first option, the call will appear as follows: - -``` -https://datalayer.decommas.net/datalayer/api/v1/tokens/{address}?api-key={YOUR-API-KEY} -``` - -But if you’re more of a JavaScript whiz, we’ve got a kit for you called the DeCommas SDK. You can grab it from here: [https://github.com/DeCommas/decommas-sdk](https://github.com/DeCommas/decommas-sdk). - -Here’s how to start: -Put the DeCommas API inside your Javascript environment by typing: -```bash -npm install @decommas/sdk -``` -Once that’s done, just copy and paste the following code: - -```javascript -import { Decommas } from '@decommas/sdk'; -const decommas = new Decommas(); -const getVitalikERC20Balances = async () => { - const address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'; // any address - const tokens = await decommas.address.getTokens({ address }); - console.log(tokens); -}; -``` - -Now you’re all set to make full use of the DeCommas API! diff --git a/docs/developers/tooling/node-providers/erpc.md b/docs/developers/tooling/node-providers/erpc.md index fc184035f..f880cff5b 100644 --- a/docs/developers/tooling/node-providers/erpc.md +++ b/docs/developers/tooling/node-providers/erpc.md @@ -30,7 +30,7 @@ projects: - endpoint: evm+alchemy://xxxx-my-alchemy-api-key-xxxx ``` -See [a complete config example](https://docs.erpc.cloud/config/example) for inspiration. +View [the complete config example](https://docs.erpc.cloud/config/example) for inspiration. 2. Use the Docker image: @@ -71,5 +71,3 @@ docker-compose up -d - password: `admin` 6. Send more requests and watch the metrics being collected and visualized in Grafana. - -![eRPC Grafana Dashboard](https://docs.erpc.cloud/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmonitoring-example-erpc.2cb040a1.png&w=3840&q=75) diff --git a/docs/developers/tooling/oracles/pyth.md b/docs/developers/tooling/oracles/pyth.md index 676d314de..38d98a16d 100644 --- a/docs/developers/tooling/oracles/pyth.md +++ b/docs/developers/tooling/oracles/pyth.md @@ -73,8 +73,8 @@ includes an example of both the on- and off-chain code necessary to integrate wi ### Examples -See [here](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/examples) -for example applications. +View [the example applications](https://github.com/pyth-network/pyth-examples/tree/main/price_feeds) +in the Pyth repository. ### Networks diff --git a/docs/developers/tooling/oracles/redstone.md b/docs/developers/tooling/oracles/redstone.md index dfcff6e88..3314298d0 100644 --- a/docs/developers/tooling/oracles/redstone.md +++ b/docs/developers/tooling/oracles/redstone.md @@ -5,62 +5,17 @@ image: /img/socialCards/redstone-oracles.jpg # RedStone Oracles -RedStone offers flexible Data Feeds with <10s update time perfect for Lending, Perpetuals, Options, Derivatives, Stablecoins and other DeFi applications. The infrastructure is well battle-tested and **secures hundreds of millions of USD on mainnets**. Trusted by some of the best protocols in DeFi and supported by well-renowned Builders such as Stani Kulechov (Aave), Coinflipcanada (GMX), Jacob Blish (Lido) and many more. +RedStone provides data feeds with update times of less than 10 seconds, suitable for various DeFi applications +such as lending, perpetuals, options, derivatives, and stablecoins. The infrastructure is used on mainnets +and by several protocols in the DeFi space. -### Why a new approach to oracles is needed +:::tip +Learn more about how to integrate RedStone Oracles in the [official Redstone documentation](https://docs.redstone.finance/). +::: -- Pushing data on-chain regardless of whether it is used or not is a huge waste of resources -- Obsolete and monolithic architecture limits scalability (it's hard to list new assets or reduce latency) -- Protocols cannot fully decide on trusted sources and data update conditions -- End-users are fully dependent on relayers and could be cut off from the service +## Links -### Solution - -RedStone offers a radically different design of Oracles catering to the needs of modern DeFi protocols. - -- Data providers can avoid the requirement of continuous on-chain data delivery -- Allow end users to self-deliver signed Oracle data on-chain -- Use the decentralized Streamr network to deliver signed oracle data to the end users -- Use token incentives to motivate data providers to maintain data integrity and uninterrupted service -- Leverage the Arweave blockchain as cheap and permanent storage for archiving Oracle data and maintaining data providers' accountability - -## 💡 How it works - -### Modular design - -Putting data directly into storage is the easiest way to make information accessible to smart contracts. This approach used to work well for large update intervals and a small number of assets. However, there are more and more tokens coming to DeFi and modern derivative protocols require much lower latency boosting the maintenance costs of the simple model. - -That's why, RedStone proposes a completely new modular design where data is first put into a data availability layer and then fetched on-chain. This allows us to broadcast a large number of assets at high frequency to a cheaper layer and put it on chain only when required by the protocol. - -### 3 Ways to integrate - -Depending on the smart contract architecture and business demands, Builders can choose among 3 different models of data consumption: - -- [RedStone Core](https://docs.redstone.finance/docs/get-started/models/redstone-core), data is dynamically injected to user transactions achieving maximum gas efficiency and maintaining a great user experience as the whole process fits into a single transaction. Best for most use cases. - -- [RedStone Classic](https://docs.redstone.finance/docs/get-started/models/redstone-classic), data is pushed into on-chain storage via relayer. Dedicated to protocols designed for the traditional Oracles model, that want to have full control of the data source and update conditions. - -- [RedStone X](https://docs.redstone.finance/docs/get-started/models/redstone-x), targeting the needs of the most advanced protocols such as Perpetuals, Options and Derivatives by eliminating the front-running risk providing price feeds at the very next block after users' interactions. - -**💡 Learn more about the integration in our [Docs](https://docs.redstone.finance/)** - -## ℹ️ Key facts - -- The [modular architecture](https://docs.redstone.finance/docs/get-started/data-formatting-processing) maintains data integrity from source to smart contracts -- There are [3 different ways](https://docs.redstone.finance/docs/get-started/selecting-redstone-model) to integrate our service tailored to your needs -- We provide feeds for more than [1000 assets](https://app.redstone.finance/#/app/tokens) integrating [~50 data sources](https://app.redstone.finance/#/app/sources) -- We are present on [20+ chains](https://showroom.redstone.finance/) -- RedStone has been live on mainnets since March 2022 with no downtime. Code was audited by ABDK, Packshield and L2Beat Co-Founder. -- RedStone was a launch partner for [DeltaPrime](https://deltaprime.io/) on Avalanche and delivered data feeds not available anywhere else. Thanks to that DeltaPrime became the top 3 fastest growing dApps according to DefiLlama. - -## 📱 How to get in contact with us? → [Join our Discord!](https://docs.redstone.finance/) - ---- - -## 🌐 Links - [Twitter](https://twitter.com/redstone_defi) - [Discord](https://redstone.finance/discord) - [Website](https://redstone.finance/) - [Docs](https://docs.redstone.finance/) -- [Angel Round Announcement](https://twitter.com/redstone_defi/status/1661024722690379778) -- [Seed Round Announcement](https://twitter.com/redstone_defi/status/1564553885695373312) diff --git a/sidebars.js b/sidebars.js index 5ad1d32bf..d0bb05bff 100644 --- a/sidebars.js +++ b/sidebars.js @@ -243,15 +243,6 @@ const sidebars = { "developers/tooling/attestations/pado", ], }, - { - type: "category", - label: "Automation", - link: { - type: "doc", - id: "developers/tooling/automation/index", - }, - items: ["developers/tooling/automation/hal-stream"], - }, { type: "category", label: "Cloud infrastructure", @@ -298,7 +289,6 @@ const sidebars = { "developers/tooling/data-indexers/alchemy", "developers/tooling/data-indexers/arkham", "developers/tooling/data-indexers/covalent", - "developers/tooling/data-indexers/decommas", { type: "category", label: "DipDup",