Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading contracts nav #7095

Merged
merged 2 commits into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions redirects.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 3 additions & 1 deletion src/data/developer-docs-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +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/
- id: docs-nav-smart-contract-security
to: /developers/docs/smart-contracts/security/
description: docs-nav-smart-contract-security-description
Expand Down
1 change: 1 addition & 0 deletions src/intl/en/page-developers-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down