From 9d4a51b9f9175901acfa0f4148ba73af3ef50186 Mon Sep 17 00:00:00 2001 From: bgravenorst Date: Thu, 23 Jan 2025 10:04:43 +1000 Subject: [PATCH 1/7] Add DIN information. Signed-off-by: bgravenorst --- services/index.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/services/index.md b/services/index.md index a3f41816e93..68258c97bc3 100644 --- a/services/index.md +++ b/services/index.md @@ -23,15 +23,21 @@ include: - **Broad access to major networks** - Infura supports the major networks, allowing you to take advantage of Ethereum's smart contracts, IPFS's distributed file system, or high performing layer 2 networks. -- **Failover support for APIs** - Currently available on select networks for customers on Growth or Custom plans; if an Infura API - endpoint becomes unavailable for any reason, requests can be forwarded to a partner to fulfill the request. - This ensures that your application remains up and running, providing uninterrupted service to your users. -- **Archive data querying** - [Access historical state data](concepts/archive-data.md) at any given - block height. This is an invaluable feature for those who need to perform deep analyses of past transactions, contract - states, or balances. With this feature, developers can build applications that are not only data-rich but also comprehensive. +- [**Decentralized Infrastructure Network (DIN) support**](https://www.infura.io/solutions/decentralized-infrastructure-service) + DIN works alongside Infura to provide the following: + - **Failover support for APIs** - Currently available on select networks for customers on Growth or Custom plans; if an Infura API + endpoint becomes unavailable for any reason, requests can be forwarded to a DIN partner to fulfill the request. + This ensures that your application remains running, providing uninterrupted service to your users. + - **Expanded network access** - Infura can extend its network offerings by leveraging DIN to access networks that it does not + natively support. + - **Expanded method support** - This includes access to debug or trace methods not natively + supported by Infura. For these particular types of calls, Infura utilizes DIN to provide user access. + - **Archive data querying** - [Access historical state data](concepts/archive-data.md) at any given + block height. This is an invaluable feature for those who need to perform deep analyses of past transactions, contract + states, or balances. With this feature, developers can build applications that are not only data-rich but also comprehensive. + Infura can leverage DIN to provide access to archive data that may not be natively supported. - **Expansion APIs** - - [Access Infura's multichain Gas API](reference/gas-api/api-reference/index.md). Use the Gas API used by the MetaMask wallet to analyze and - optimize gas costs on EIP-1559 compatible chains. + [Access Infura's multichain Gas API](reference/gas-api/api-reference/index.md). Use the Gas API used by the MetaMask wallet to analyze and optimize gas costs on EIP-1559 compatible chains. From a0d6b3e06045d39b1aa38405ed7c2673516d1505 Mon Sep 17 00:00:00 2001 From: Andy Bridges Date: Tue, 21 Jan 2025 11:35:44 +0000 Subject: [PATCH 2/7] Add dashboard team to codeowners (#1824) --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ed9adc2aa65..b053ce520a2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,7 +2,7 @@ # so the listed codeowners apply only if there is no later match. # Default owner for all other files -* @MetaMask/activation @MetaMask/tech-writers +* @MetaMask/dashboard @MetaMask/tech-writers # All other Markdown files *.md @MetaMask/tech-writers From 22a3087b4375776ad0368efffab3a91408317721 Mon Sep 17 00:00:00 2001 From: Bilog WEB3 <155262265+Bilogweb3@users.noreply.github.com> Date: Tue, 21 Jan 2025 20:38:22 +0100 Subject: [PATCH 3/7] Update quickstart.md (#1828) --- services/reference/ipfs/quickstart.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/reference/ipfs/quickstart.md b/services/reference/ipfs/quickstart.md index 0ea00ca814a..ab8b0ccd8f2 100644 --- a/services/reference/ipfs/quickstart.md +++ b/services/reference/ipfs/quickstart.md @@ -102,7 +102,7 @@ files = { response1 = requests.post(endpoint + "/api/v0/add", files=files, auth=(projectId, projectSecret)) print(response1) hash = response1.text.split(",")[1].split(":")[1].replace('"','') -print(hash +print(hash) ### READ FILE WITH HASH ### params = { @@ -141,7 +141,7 @@ import { create } from "kubo-rpc-client" const projectId = ""; const projectSecret = ""; -const auth +const auth = "Basic " + Buffer.from(projectId + ":" + projectSecret).toString("base64"); const client = create({ From c4d6ec5d954f373426170e086dbc694ad1dedaa3 Mon Sep 17 00:00:00 2001 From: planetBoy <140164174+Guayaba221@users.noreply.github.com> Date: Wed, 22 Jan 2025 21:00:17 +0100 Subject: [PATCH 4/7] Update quickstart.md (#1831) --- services/reference/blast/quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/reference/blast/quickstart.md b/services/reference/blast/quickstart.md index 557b2ba6ef8..314128715ca 100644 --- a/services/reference/blast/quickstart.md +++ b/services/reference/blast/quickstart.md @@ -1,5 +1,5 @@ --- -description: Celo quickstart guide. +description: Blast quickstart guide. sidebar_position: 2 --- From 2b24f23c94f3bd137f855d53087d00dde3f32dea Mon Sep 17 00:00:00 2001 From: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> Date: Thu, 23 Jan 2025 06:28:37 +1000 Subject: [PATCH 5/7] Add state overrides for `linea_estimateGas`. (#1809) * Add state overrides. Signed-off-by: bgravenorst * Update dag_import.md (#1810) * Update pricing (#1800) * Update endpoints.md (#1812) * chore: correct (#1813) * Update credit-usage.md * Update avoid-rate-limiting.md * Add tech-writers as default codeowners (#1815) * Remove duplication of result descriptions in API reference (#1781) * Remove duplication of result descriptions in API reference * remove empty div --------- Co-authored-by: Andy Bridges * Fix syntax errors in Starknet transaction documentation (#1811) * Update send-starknet-transactions.md * Update wallet/how-to/use-non-evm-networks/starknet/send-starknet-transactions.md --------- Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> * Fix typographical errors (#1820) * fix typos * fix typo * fix typo * fix typos * Fix typos in documentation (#1821) * Update sdk-js-options.md * Update create-api.md * chore(deps): bump @mdx-js/react from 3.0.1 to 3.1.0 (#1695) Bumps [@mdx-js/react](https://github.com/mdx-js/mdx/tree/HEAD/packages/react) from 3.0.1 to 3.1.0. - [Release notes](https://github.com/mdx-js/mdx/releases) - [Changelog](https://github.com/mdx-js/mdx/blob/main/changelog.md) - [Commits](https://github.com/mdx-js/mdx/commits/3.1.0/packages/react) --- updated-dependencies: - dependency-name: "@mdx-js/react" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> * chore(deps): bump the npm_and_yarn group across 1 directory with 3 updates (#1763) Bumps the npm_and_yarn group with 3 updates in the / directory: [elliptic](https://github.com/indutny/elliptic), [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) and [mermaid](https://github.com/mermaid-js/mermaid). Updates `elliptic` from 6.5.7 to 6.6.1 - [Commits](https://github.com/indutny/elliptic/compare/v6.5.7...v6.6.1) Updates `http-proxy-middleware` from 2.0.6 to 2.0.7 - [Release notes](https://github.com/chimurai/http-proxy-middleware/releases) - [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.7/CHANGELOG.md) - [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.6...v2.0.7) Updates `mermaid` from 10.9.1 to 10.9.3 - [Release notes](https://github.com/mermaid-js/mermaid/releases) - [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md) - [Commits](https://github.com/mermaid-js/mermaid/compare/v10.9.1...v10.9.3) --- updated-dependencies: - dependency-name: elliptic dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: http-proxy-middleware dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: mermaid dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> * chore(deps): bump @rjsf/validator-ajv8 from 5.21.1 to 5.24.1 (#1802) Bumps [@rjsf/validator-ajv8](https://github.com/rjsf-team/react-jsonschema-form) from 5.21.1 to 5.24.1. - [Release notes](https://github.com/rjsf-team/react-jsonschema-form/releases) - [Changelog](https://github.com/rjsf-team/react-jsonschema-form/blob/main/CHANGELOG.md) - [Commits](https://github.com/rjsf-team/react-jsonschema-form/compare/5.21.1...5.24.1) --- updated-dependencies: - dependency-name: "@rjsf/validator-ajv8" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> * chore(deps): bump @rjsf/core from 5.22.1 to 5.24.1 (#1803) Bumps [@rjsf/core](https://github.com/rjsf-team/react-jsonschema-form) from 5.22.1 to 5.24.1. - [Release notes](https://github.com/rjsf-team/react-jsonschema-form/releases) - [Changelog](https://github.com/rjsf-team/react-jsonschema-form/blob/main/CHANGELOG.md) - [Commits](https://github.com/rjsf-team/react-jsonschema-form/compare/5.22.1...5.24.1) --- updated-dependencies: - dependency-name: "@rjsf/core" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> * chore(deps-dev): bump eslint from 8.57.1 to 9.18.0 (#1804) Bumps [eslint](https://github.com/eslint/eslint) from 8.57.1 to 9.18.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.57.1...v9.18.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> * chore(deps): bump @metamask/profile-sync-controller from 0.9.8 to 4.1.0 (#1816) Bumps [@metamask/profile-sync-controller](https://github.com/MetaMask/core) from 0.9.8 to 4.1.0. - [Release notes](https://github.com/MetaMask/core/releases) - [Changelog](https://github.com/MetaMask/core/blob/main/docs/reviewing-release-prs.md) - [Commits](https://github.com/MetaMask/core/compare/@metamask/profile-sync-controller@0.9.8...@metamask/profile-sync-controller@4.1.0) --- updated-dependencies: - dependency-name: "@metamask/profile-sync-controller" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> * chore(deps): bump the npm_and_yarn group across 1 directory with 4 updates (#1823) Bumps the npm_and_yarn group with 3 updates in the / directory: [express](https://github.com/expressjs/express), [katex](https://github.com/KaTeX/KaTeX) and [serve-handler](https://github.com/vercel/serve-handler). Updates `express` from 4.21.1 to 4.21.2 - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md) - [Commits](https://github.com/expressjs/express/compare/4.21.1...4.21.2) Updates `path-to-regexp` from 0.1.10 to 0.1.12 - [Release notes](https://github.com/pillarjs/path-to-regexp/releases) - [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md) - [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.10...v0.1.12) Updates `katex` from 0.16.11 to 0.16.21 - [Release notes](https://github.com/KaTeX/KaTeX/releases) - [Changelog](https://github.com/KaTeX/KaTeX/blob/main/CHANGELOG.md) - [Commits](https://github.com/KaTeX/KaTeX/compare/v0.16.11...v0.16.21) Updates `serve-handler` from 6.1.5 to 6.1.6 - [Release notes](https://github.com/vercel/serve-handler/releases) - [Commits](https://github.com/vercel/serve-handler/compare/6.1.5...6.1.6) --- updated-dependencies: - dependency-name: express dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: path-to-regexp dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: katex dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: serve-handler dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update quickstart.md (#1826) * Update example. Signed-off-by: bgravenorst * Update services/reference/linea/json-rpc-methods/linea_estimategas.mdx Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> * Update services/reference/linea/json-rpc-methods/linea_estimategas.mdx Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> --------- Signed-off-by: bgravenorst Signed-off-by: dependabot[bot] Co-authored-by: Woolfgm <160153877+Dahka2321@users.noreply.github.com> Co-authored-by: Andy Bridges Co-authored-by: futreall <86553580+futreall@users.noreply.github.com> Co-authored-by: Skylar Ray <137945430+sky-coderay@users.noreply.github.com> Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> Co-authored-by: CrazyFrog Co-authored-by: Ocenka Co-authored-by: Huberto <161350311+HubertIGL@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Fallengirl <155266340+Fallengirl@users.noreply.github.com> --- .../json-rpc-methods/linea_estimategas.mdx | 52 ++++++++++++++++--- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/services/reference/linea/json-rpc-methods/linea_estimategas.mdx b/services/reference/linea/json-rpc-methods/linea_estimategas.mdx index 9be5f11e650..47fd1ebaf18 100644 --- a/services/reference/linea/json-rpc-methods/linea_estimategas.mdx +++ b/services/reference/linea/json-rpc-methods/linea_estimategas.mdx @@ -30,7 +30,7 @@ We recommend using `linea_estimateGas` for more accurate results. ## Parameters -- `TRANSACTION CALL OBJECT` _\[required]_ +- `call`: _\[required]_ Transaction call object: - `from`: _\[optional]_ 20 bytes - The address the transaction is sent from. - `to`: _\[optional]_ 20 bytes - The address the transaction is directed to. - `gas`: _\[optional]_ Hexadecimal value of the gas provided for the transaction execution. `linea_estimateGas` consumes @@ -41,11 +41,12 @@ We recommend 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). -- `blockParameter`: (string) [_optional_] A hexadecimal block number, or one of the tags `latest`, `earliest`, `pending` or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - :::warning - `safe` isn't supported. Use `finalized` instead. - Learn more about [Linea's layer 2 finalization](https://docs.linea.build/developers/guides/finalized-block). - ::: +- `stateOverride`: _\[optional]_ Object that contains the address-to-state mapping to [override state values](#override-state-values). + Each entry specifies a state that will be temporarily overridden before executing the call: + - `balance`: _\[optional]_ Hexadecimal value of the temporary account balance for the call execution. + - `nonce`: _\[optional]_ Hexadecimal value of the temporary nonce for the call execution. + - `code` : _\[optional]_ Bytecode to inject into the account. + - `stateDiff`: `key:value` pairs to override individual slots in the account storage. ## Returns @@ -95,3 +96,42 @@ Replace `` with an API key from your [MetaMask Developer dashboard ``` + +## Override state values + +You can override an account with temporary state values before making the call. This allows you to +make temporary state changes without affecting the actual blockchain state. + +The following example estimates the cost for transferring an ERC-20 token for an account which does not +have the required assets onchain. + +The example sets a custom ETH balance for the sender (to cover gas costs) and modifies the account's +balance within the ERC-20 contract's storage for the duration of the call. + +```json +curl https://linea-mainnet.infura.io/v3/ \ +-X POST \ +-H "Content-Type: application/json" \ +-d '{ + "jsonrpc":"2.0", + "method":"linea_estimateGas", + "params":[ + { + "from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", + "to":"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f", + "data":"0xa9059cbb000000000000000000000000627306090abaB3A6e1400e9345bC60c78a8BEf570000000000000000000000000000000000000000000000001bc16d674ec80000" + }, + { + "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73": { + "balance": "0x16345785d8a0000" + }, + "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f": { + "stateDiff": { + "0x2d206e5210c119b1cbed144f517f1f1dfd586eed26793a233e6afc261f4cf97f":"0x0000000000000000000000000000000000000000000000001bc16d674ec80000" + } + } + } + ], + "id":53 +}' +``` \ No newline at end of file From b18f8dcb2e569cc637af0a6c8a6badc854fee1ac Mon Sep 17 00:00:00 2001 From: bgravenorst Date: Thu, 23 Jan 2025 10:15:25 +1000 Subject: [PATCH 6/7] Fix typo. Signed-off-by: bgravenorst --- services/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/index.md b/services/index.md index 68258c97bc3..336a7d1153f 100644 --- a/services/index.md +++ b/services/index.md @@ -28,7 +28,7 @@ include: - **Failover support for APIs** - Currently available on select networks for customers on Growth or Custom plans; if an Infura API endpoint becomes unavailable for any reason, requests can be forwarded to a DIN partner to fulfill the request. This ensures that your application remains running, providing uninterrupted service to your users. - - **Expanded network access** - Infura can extend its network offerings by leveraging DIN to access networks that it does not + - **Expanded network access** - Infura can extend its network offerings by leveraging DIN to access networks that it doesn't natively support. - **Expanded method support** - This includes access to debug or trace methods not natively supported by Infura. For these particular types of calls, Infura utilizes DIN to provide user access. From ae1a11d10036ee3581d47dacdebc7f03c56dc782 Mon Sep 17 00:00:00 2001 From: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> Date: Thu, 23 Jan 2025 13:17:08 +1000 Subject: [PATCH 7/7] Apply suggestions from code review Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> --- services/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/index.md b/services/index.md index 336a7d1153f..e3c41b290c3 100644 --- a/services/index.md +++ b/services/index.md @@ -23,7 +23,7 @@ include: - **Broad access to major networks** - Infura supports the major networks, allowing you to take advantage of Ethereum's smart contracts, IPFS's distributed file system, or high performing layer 2 networks. -- [**Decentralized Infrastructure Network (DIN) support**](https://www.infura.io/solutions/decentralized-infrastructure-service) +- [**Decentralized Infrastructure Network (DIN) support**](https://www.infura.io/solutions/decentralized-infrastructure-service) - DIN works alongside Infura to provide the following: - **Failover support for APIs** - Currently available on select networks for customers on Growth or Custom plans; if an Infura API endpoint becomes unavailable for any reason, requests can be forwarded to a DIN partner to fulfill the request. @@ -31,9 +31,9 @@ include: - **Expanded network access** - Infura can extend its network offerings by leveraging DIN to access networks that it doesn't natively support. - **Expanded method support** - This includes access to debug or trace methods not natively - supported by Infura. For these particular types of calls, Infura utilizes DIN to provide user access. + supported by Infura. For these types of calls, Infura leverages DIN to provide user access. - **Archive data querying** - [Access historical state data](concepts/archive-data.md) at any given - block height. This is an invaluable feature for those who need to perform deep analyses of past transactions, contract + block height. This is essential for performing deep analyses of past transactions, contract states, or balances. With this feature, developers can build applications that are not only data-rich but also comprehensive. Infura can leverage DIN to provide access to archive data that may not be natively supported. - **Expansion APIs** -