From 27acd51698b52b83ac98e6f6299faeceff626e44 Mon Sep 17 00:00:00 2001 From: Sam Richards Date: Sat, 16 Jul 2022 14:17:17 -0700 Subject: [PATCH 1/2] Add upgrading smart contract page to docs nav --- src/data/developer-docs-links.yaml | 2 ++ src/intl/en/page-developers-docs.json | 1 + 2 files changed, 3 insertions(+) diff --git a/src/data/developer-docs-links.yaml b/src/data/developer-docs-links.yaml index ef0b1ca025b..ff28932d771 100644 --- a/src/data/developer-docs-links.yaml +++ b/src/data/developer-docs-links.yaml @@ -99,6 +99,8 @@ to: /developers/docs/smart-contracts/deploying/ - id: docs-nav-verifying-smart-contracts to: /developers/docs/smart-contracts/source-code-verification/ + - id: docs-nav-upgrading-smart-contracts + to: /developers/docs/smart-contracts/upgrading-smart-contracts/ - id: docs-nav-smart-contract-security to: /developers/docs/smart-contracts/security/ description: docs-nav-smart-contract-security-description diff --git a/src/intl/en/page-developers-docs.json b/src/intl/en/page-developers-docs.json index bee7e56cb55..36a0322e497 100644 --- a/src/intl/en/page-developers-docs.json +++ b/src/intl/en/page-developers-docs.json @@ -100,6 +100,7 @@ "docs-nav-token-standards": "Token standards", "docs-nav-transactions": "Transactions", "docs-nav-transactions-description": "Transfers and other actions that cause Ethereum's state to change", + "docs-nav-upgrading-smart-contracts": "Upgrading smart contracts", "docs-nav-verifying-smart-contracts": "Verifying smart contracts", "docs-nav-web2-vs-web3": "Web2 vs Web3", "docs-nav-web2-vs-web3-description": "The fundamental differences that blockchain-based applications provide", From 28da7c428be7152135a4594c5508cd8e7c35d71d Mon Sep 17 00:00:00 2001 From: Sam Richards Date: Sat, 16 Jul 2022 14:20:41 -0700 Subject: [PATCH 2/2] Update contract page URLs to match convention --- redirects.json | 8 ++++++++ .../index.md | 0 .../index.md | 2 +- .../source-code-verification.png | Bin src/data/developer-docs-links.yaml | 4 ++-- 5 files changed, 11 insertions(+), 3 deletions(-) rename src/content/developers/docs/smart-contracts/{upgrading-smart-contracts => upgrading}/index.md (100%) rename src/content/developers/docs/smart-contracts/{source-code-verification => verifying}/index.md (99%) rename src/content/developers/docs/smart-contracts/{source-code-verification => verifying}/source-code-verification.png (100%) diff --git a/redirects.json b/redirects.json index 294ffec2098..09c65ee3256 100644 --- a/redirects.json +++ b/redirects.json @@ -362,5 +362,13 @@ { "fromPath": "/*/contributing/translation-program/content-versions/", "toPath": "/:splat/contributing/translation-program/content-buckets/" + }, + { + "fromPath": "/*/developers/docs/smart-contracts/source-code-verification/", + "toPath": "/:splat/developers/docs/smart-contracts/verifying/" + }, + { + "fromPath": "/*/developers/docs/smart-contracts/upgrading-smart-contracts/", + "toPath": "/:splat/developers/docs/smart-contracts/upgrading/" } ] diff --git a/src/content/developers/docs/smart-contracts/upgrading-smart-contracts/index.md b/src/content/developers/docs/smart-contracts/upgrading/index.md similarity index 100% rename from src/content/developers/docs/smart-contracts/upgrading-smart-contracts/index.md rename to src/content/developers/docs/smart-contracts/upgrading/index.md diff --git a/src/content/developers/docs/smart-contracts/source-code-verification/index.md b/src/content/developers/docs/smart-contracts/verifying/index.md similarity index 99% rename from src/content/developers/docs/smart-contracts/source-code-verification/index.md rename to src/content/developers/docs/smart-contracts/verifying/index.md index 2e8bb652d37..2bb7816f2ac 100644 --- a/src/content/developers/docs/smart-contracts/source-code-verification/index.md +++ b/src/content/developers/docs/smart-contracts/verifying/index.md @@ -19,7 +19,7 @@ Smart contract verification enables investigating what a contract does through t ### What is full verification? {#full-verification} -There are some parts of the source code that do not affect the compiled bytecode such as comments or variable names. That means two source codes with different variable names and different comments would both be able to verify the same contract. With that, a malicous actor can add deceiving comments or give misleading variable names inside the source code and get the contract verified with a source code different than the original source code. +There are some parts of the source code that do not affect the compiled bytecode such as comments or variable names. That means two source codes with different variable names and different comments would both be able to verify the same contract. With that, a malicous actor can add deceiving comments or give misleading variable names inside the source code and get the contract verified with a source code different than the original source code. It is possible to avoid this by appending extra data to the bytecode to serve as a _cryptographical guarantee_ for the exactness of the source code, and as a _fingerprint_ of the compilation information. The necessary information is found in the [Solidity's contract metadata](https://docs.soliditylang.org/en/v0.8.15/metadata.html), and the hash of this file is appended to the bytecode of a contract. You can see it in action in the [metadata playground](https://playground.sourcify.dev) diff --git a/src/content/developers/docs/smart-contracts/source-code-verification/source-code-verification.png b/src/content/developers/docs/smart-contracts/verifying/source-code-verification.png similarity index 100% rename from src/content/developers/docs/smart-contracts/source-code-verification/source-code-verification.png rename to src/content/developers/docs/smart-contracts/verifying/source-code-verification.png diff --git a/src/data/developer-docs-links.yaml b/src/data/developer-docs-links.yaml index ff28932d771..090d7a0ce13 100644 --- a/src/data/developer-docs-links.yaml +++ b/src/data/developer-docs-links.yaml @@ -98,9 +98,9 @@ - id: docs-nav-deploying-smart-contracts to: /developers/docs/smart-contracts/deploying/ - id: docs-nav-verifying-smart-contracts - to: /developers/docs/smart-contracts/source-code-verification/ + to: /developers/docs/smart-contracts/verifying/ - id: docs-nav-upgrading-smart-contracts - to: /developers/docs/smart-contracts/upgrading-smart-contracts/ + to: /developers/docs/smart-contracts/upgrading/ - id: docs-nav-smart-contract-security to: /developers/docs/smart-contracts/security/ description: docs-nav-smart-contract-security-description