-
Notifications
You must be signed in to change notification settings - Fork 75
Cleanup smart contracts/cookbook/EVM smart contracts #1243
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
base: staging/product-ia
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements formatting and storytelling improvements across the Smart Contracts Cookbook documentation, specifically targeting EVM smart contract deployment guides. The changes focus on improving consistency, clarity, and user experience.
Key Changes:
- Renamed files from generic names (remix.md, hardhat.md) to more descriptive names (nft-remix.md, erc20-hardhat.md, etc.)
- Moved inline code snippets to reusable snippet files for better maintainability
- Updated image paths to match new file structure
- Improved instructional voice and clarity throughout documentation
Reviewed Changes
Copilot reviewed 29 out of 38 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| smart-contracts/cookbook/smart-contracts/deploy-nft/nft-remix.md | Renamed from remix.md; updated with snippet references and corrected image paths |
| smart-contracts/cookbook/smart-contracts/deploy-nft/nft-hardhat.md | New file replacing hardhat.md with improved structure and snippet references |
| smart-contracts/cookbook/smart-contracts/deploy-nft/hardhat.md | Deleted old file as part of rename |
| smart-contracts/cookbook/smart-contracts/deploy-nft/.nav.yml | Updated navigation references to match renamed files |
| smart-contracts/cookbook/smart-contracts/deploy-erc20/erc20-remix.md | Renamed and streamlined with improved voice, removed verbose explanations |
| smart-contracts/cookbook/smart-contracts/deploy-erc20/erc20-hardhat.md | Updated with snippet references and improved instructional flow |
| smart-contracts/cookbook/smart-contracts/deploy-erc20/.nav.yml | Updated navigation references |
| smart-contracts/cookbook/smart-contracts/deploy-basic/remix.md | Deleted old file |
| smart-contracts/cookbook/smart-contracts/deploy-basic/hardhat.md | Deleted old file |
| smart-contracts/cookbook/smart-contracts/deploy-basic/basic-remix.md | New file with improved structure and consistency |
| smart-contracts/cookbook/smart-contracts/deploy-basic/basic-hardhat.md | New file with snippet references and improved flow |
| smart-contracts/cookbook/smart-contracts/deploy-basic/.nav.yml | Updated navigation references |
| smart-contracts/cookbook/smart-contracts/.nav.yml | Updated section titles for consistency |
| smart-contracts/cookbook/index.md | Simplified title |
| smart-contracts/cookbook/eth-dapps/uniswap-v2.md | Fixed voice consistency |
| smart-contracts/cookbook/dapps/zero-to-hero.md | Fixed voice consistency |
| smart-contracts/cookbook/.nav.yml | Removed TODO comment |
| .snippets/code/smart-contracts/cookbook/smart-contracts/deploy-erc721-nft/* | Added snippet files for NFT contracts and configurations |
| .snippets/code/smart-contracts/cookbook/smart-contracts/deploy-erc20-token/* | Added snippet files for ERC-20 outputs |
| .snippets/code/smart-contracts/cookbook/smart-contracts/deploy-basic-contract/* | Added snippet files for basic contracts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - Basic understanding of Solidity programming and fungible tokens. | ||
| - An EVM-compatible wallet [connected to Polkadot Hub](/smart-contracts/integrations/wallets){target=\_blank}. This example utilizes [MetaMask](https://metamask.io/){target=\_blank}. | ||
| - A funded account with tokens for transaction fees. This example will deploy the contract to the Polkadot TestNet, so you'll [need some TestNet tokens](/smart-contracts/faucet/#get-test-tokens){target=\_blank} from the [Polkadot Faucet](https://faucet.polkadot.io/?parachain=1111){target=\_blank}. | ||
| - A basic understanding of [Solidity](https://www.soliditylang.org/){target=\_blank} programming and [ERC-20](https://ethereum.org/developers/docs/standards/tokens/erc-20/) fungible tokens. |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing target attribute in the ERC-20 link. The link should have {target=\_blank} to match the style used elsewhere in the documentation.
| Ensure your contract is open in the Remix IDE Editor, and use the following steps to compile: | ||
|
|
||
| 1. Select the **Solidity Compiler** plugin from the left panel. | ||
| 2. Select the **Compile MyToken.sol** button. |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The compilation step references "Compile MyToken.sol" but should reference "Compile Storage.sol" to match the actual contract being compiled in this guide.
| 2. Select the **Compile MyToken.sol** button. | |
| 2. Select the **Compile Storage.sol** button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a valid suggestion image and prior text mentions we'll be working with the Storage.sol contract
|  | ||
|
|
||
| 3. Now, paste the following ERC-20 contract code into the editor: | ||
| 3. Now, paste the following ERC-20 contract code into `myToken.sol`: |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "myToken.sol" should be "MyToken.sol" to match the file name capitalization used elsewhere in the guide (line 30).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid suggestion
| - Basic understanding of Solidity programming and fungible tokens. | ||
| - Node.js v22.13.1 or later. | ||
| - A funded account with tokens for transaction fees. This example will deploy the contract to the Polkadot TestNet, so you'll [need some TestNet tokens](/smart-contracts/faucet/#get-test-tokens){target=\_blank} from the [Polkadot Faucet](https://faucet.polkadot.io/?parachain=1111){target=\_blank}. | ||
| - A basic understanding of [Solidity](https://www.soliditylang.org/){target=\_blank} programming and [ERC-20](https://ethereum.org/developers/docs/standards/tokens/erc-20/) fungible tokens. |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing target attribute in the ERC-20 link. The link should have {target=\_blank} to match the style used elsewhere in the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid suggestion
| @@ -1,5 +1,5 @@ | |||
| title: Deploy an ERC-20 | |||
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Inconsistent capitalization in title. "Deploy an ERC-20" in the title doesn't match the updated pattern of other titles like "Deploy ERC-20 Using Hardhat" and "Deploy ERC-20 Using Remix IDE". Consider updating to "Deploy ERC-20 Token" or similar for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated style guide suggestions (1-4 of 4)
|
|
||
| <div class="grid cards" markdown> | ||
|
|
||
| - <span class="badge guide">Guide</span> __Verify Your Contract__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue: Missing period at the end of the list item.
| - <span class="badge guide">Guide</span> __Verify Your Contract__ | |
| - <span class="badge guide">Guide</span> __Verify Your Contract__. |
|
|
||
| [:octicons-arrow-right-24: Get Started](/smart-contracts/dev-environments/hardhat/verify-a-contract/) | ||
|
|
||
| - <span class="badge guide">Guide</span> __Deploy an ERC-20__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue: Missing period at the end of the list item.
| - <span class="badge guide">Guide</span> __Deploy an ERC-20__ | |
| - <span class="badge guide">Guide</span> __Deploy an ERC-20__. |
|
|
||
| [:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-erc20/erc20-hardhat/) | ||
|
|
||
| - <span class="badge guide">Guide</span> __Deploy an NFT__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue: Missing period at the end of the list item.
| - <span class="badge guide">Guide</span> __Deploy an NFT__ | |
| - <span class="badge guide">Guide</span> __Deploy an NFT__. |
| - 'Deploy Basic Contract': deploy-basic | ||
| - 'Deploy ERC-20 Token': deploy-erc20 | ||
| - 'Deploy ERC-721 NFT': deploy-nft |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use the “verb + article + object” pattern in many other pages (e.g., “Create a DApp,” “Get Tokens From the Faucet”), so switching to titles like “Deploy Basic Contract” is a bit of an inconsistent change. So I think we should switch it back in this case
|
|
||
| ## Compile the Contract | ||
|
|
||
| Ensure your contract is open in the Remix IDE Editor, and use the following steps to compile: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Ensure your contract is open in the Remix IDE Editor, and use the following steps to compile: | |
| Ensure your contract is open in the Remix IDE editor, and use the following steps to compile: |
| Ensure your contract is open in the Remix IDE Editor, and use the following steps to compile: | ||
|
|
||
| 1. Select the **Solidity Compiler** plugin from the left panel. | ||
| 2. Select the **Compile MyToken.sol** button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a valid suggestion image and prior text mentions we'll be working with the Storage.sol contract
|
|
||
| The interface will load with a default workspace containing sample contracts. In this interface, you can access a file explorer, edit your code, interact with various development plugins, and use a terminal. By default, you will see the `contracts` folder with the `Storage.sol` file, which will be used as the example contract throughout this guide. | ||
|
|
||
|  |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file path is off, should be
/images/smart-contracts/cookbook/smart-contracts/deploy-basic/basic-remix/basic-remix-01.webp
| - <span class="badge guide">Guide</span> __Verify Your Contract__ | ||
|
|
||
| --- | ||
|
|
||
| Now that you've deployed a basic contract, learn how to verify it with Remix. | ||
|
|
||
| [:octicons-arrow-right-24: Get Started](/smart-contracts/dev-environments/remix/verify-a-contract/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed, we won't have this guide for launch.
| --- | ||
| Walk through deploying a fully-functional ERC-20 to the Polkadot Hub using Hardhat. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Walk through deploying a fully-functional ERC-20 to the Polkadot Hub using Hardhat. | |
| Walk through deploying a fully-functional ERC-20 to Polkadot Hub using Hardhat. |
| Navigate to [Remix](https://remix.ethereum.org/){target=\_blank} in your web browser. | ||
|
|
||
| The interface will load with a default workspace containing sample contracts. In this interface, you can access a file explorer, edit your code, interact with various plugins for development, and use a terminal. | ||
| The interface will load with a default workspace containing sample contracts. In this interface, you can access a file explorer, edit your code, interact with various development plugins, and use a terminal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closest I could get to it, but can you please compare the prereqs section with the ERC-20 Remix guide and make sure they look the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, there are some inconsistencies with this Access Remix section. We have it for the Deploy a Basic Contract Remix guide (but it has an image there and not here), and we don't have it for the Deploy an ERC-20 Remix guide
| ``` | ||
|  | ||
|  |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're indenting this here even though the image is for both steps then the next section we're not indenting it. Should just be consistent
| 2. Click **Compile MyNFT.sol** or press `Ctrl+S`. | ||
|  | ||
|  |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the other guides we mention the green check mark to notify users that it's been successfully compiled, let's add that here too please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're also missing some of the explanations we have on the ERC-20 guide. So can you please review and make sure we're being consistent? All of the sections on this page seem just very brief compared to the ERC-20 guide
| Your deployed contract will appear in the **Deployed Contracts** section, ready for interaction. | ||
| Congratulations! You've successfully deployed an ERC-721 NFT contract to the Polkadot Hub TestNet using Remix IDE. Consider the following resources to build upon your progress. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closest I could get to it, but can you pls remove Verify Your Contract card from the Where to Go Next section? Also fix "the Polkadot Hub" in the Deploy an ERC-20 card to remove "the"?
📝 Description
Formatting and storytelling oriented pass through the Smart Contracts > Cookbook > EVM Smart Contracts > Deploy (Basic Contract/ERC-20 Token/ERC-721 NFT) pages focused on:
🔍 Review Preference
Choose one:
🤖 AI-Ready Docs
If content changed, regenerate AI files:
python3 scripts/generate_llms.py✅ Checklist