Skip to content

Commit 82b9d12

Browse files
committed
fix: llms
1 parent 69c897c commit 82b9d12

File tree

7 files changed

+444
-454
lines changed

7 files changed

+444
-454
lines changed

.ai/categories/smart-contracts.md

Lines changed: 166 additions & 169 deletions
Large diffs are not rendered by default.

.ai/categories/tooling.md

Lines changed: 164 additions & 167 deletions
Large diffs are not rendered by default.

.ai/pages/smart-contracts-for-eth-devs-migration.md renamed to .ai/pages/smart-contracts-for-eth-devs-.migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Migration FAQs and Considerations
33
description: Learn how to migrate your existing Ethereum contracts to the Polkadot Hub using REVM and PolkaVM by following these considerations.
44
categories: Smart Contracts
5-
url: https://docs.polkadot.com/smart-contracts/for-eth-devs/migration/
5+
url: https://docs.polkadot.com/smart-contracts/for-eth-devs/.migration/
66
---
77

88
# Migration FAQs and Considerations

.ai/pages/smart-contracts-libraries-web3-js.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ Add the Solidity compiler so you can generate standard EVM bytecode:
7373
npm install --save-dev solc
7474
```
7575

76-
!!! tip
77-
The sample scripts use ECMAScript modules. Add `"type": "module"` to your `package.json` (or rename the files to `.mjs`) so that `node` can run the `import` statements.
78-
7976
## Set Up the Web3 Provider
8077

8178
The provider configuration is the foundation of any Web3.js application. It serves as a bridge between your application and the blockchain, allowing you to query blockchain data and interact with smart contracts.
@@ -132,7 +129,7 @@ With the provider set up, you can start querying the blockchain. For instance, t
132129
const PROVIDER_RPC = {
133130
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io',
134131
chainId: 420420422,
135-
name: 'polkadot-hub-testnet',
132+
name: 'polkadotTestNet',
136133
};
137134

138135
const main = async () => {
@@ -395,7 +392,7 @@ You can create a `deploy.js` script in the `scripts` directory of your project t
395392
const providerConfig = {
396393
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', // TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready
397394
chainId: 420420422,
398-
name: 'polkadot-hub-testnet',
395+
name: 'polkadotTestNet',
399396
};
400397

401398
const privateKey = 'INSERT_PRIVATE_KEY';
@@ -503,7 +500,7 @@ You can create a `deploy.js` script in the `scripts` directory of your project t
503500
const providerConfig = {
504501
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', // TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready
505502
chainId: 420420422,
506-
name: 'polkadot-hub-testnet',
503+
name: 'polkadotTestNet',
507504
};
508505

509506
const privateKey = 'INSERT_PRIVATE_KEY';
@@ -523,7 +520,7 @@ After running this script, your contract will be deployed to Polkadot Hub, and i
523520

524521
## Interact with the Contract
525522

526-
Once the contract is deployed, you can interact with it by calling its functions. For example, to set a number, read it and then modify that number by its double, you can create a file named `updateStorage.js` in the `scripts` directory of your project and add the following code:
523+
Once the contract is deployed, you can interact with it by calling its functions. For example, to read the current stored value and then update it to a new value, you can create a file named `updateStorage.js` in the `scripts` directory of your project and add the following code:
527524

528525
```js title="scripts/updateStorage.js"
529526
const { readFileSync } = require('fs');
@@ -593,7 +590,7 @@ updateStorage(config)
593590
.catch((error) => console.error('Update error'));
594591
```
595592

596-
Ensure you replace the `INSERT_MNEMONIC`, `INSERT_CONTRACT_ADDRESS`, and `INSERT_ADDRESS_TO_CHECK` placeholders with actual values. Also, ensure the contract ABI file (`Storage.json`) is correctly referenced. The script prints the balance for `ADDRESS_TO_CHECK` before it writes and doubles the stored value, so pick any account you want to monitor.
593+
Ensure you replace the `INSERT_PRIVATE_KEY` and `INSERT_CONTRACT_ADDRESS` placeholders with actual values. Also, ensure the contract ABI file (`Storage.json`) is correctly referenced. The script reads the current stored value, sets it to 1, and then displays the updated value.
597594

598595
To interact with the contract, run:
599596

.ai/site-index.json

Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -4326,6 +4326,87 @@
43264326
"hash": "sha256:c609bc98cba5efa2d2a808548cf93ad9d0a06455b35a8fd9f534daf52824f506",
43274327
"token_estimator": "heuristic-v1"
43284328
},
4329+
{
4330+
"id": "smart-contracts-for-eth-devs-.migration",
4331+
"title": "Migration FAQs and Considerations",
4332+
"slug": "smart-contracts-for-eth-devs-.migration",
4333+
"categories": [
4334+
"Smart Contracts"
4335+
],
4336+
"raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-for-eth-devs-.migration.md",
4337+
"html_url": "https://docs.polkadot.com/smart-contracts/for-eth-devs/.migration/",
4338+
"preview": "This guide helps Ethereum developers migrate their smart contracts to Polkadot Hub. Most contracts work without modifications on the REVM backend, while the PolkaVM backend offers enhanced performance with minimal adaptation for standard patterns.",
4339+
"outline": [
4340+
{
4341+
"depth": 2,
4342+
"title": "Introduction",
4343+
"anchor": "introduction"
4344+
},
4345+
{
4346+
"depth": 2,
4347+
"title": "Migration Considerations",
4348+
"anchor": "migration-considerations"
4349+
},
4350+
{
4351+
"depth": 2,
4352+
"title": "Migration Checklist",
4353+
"anchor": "migration-checklist"
4354+
},
4355+
{
4356+
"depth": 2,
4357+
"title": "Migration FAQs",
4358+
"anchor": "migration-faqs"
4359+
},
4360+
{
4361+
"depth": 3,
4362+
"title": "Which backend should I choose?",
4363+
"anchor": "which-backend-should-i-choose"
4364+
},
4365+
{
4366+
"depth": 3,
4367+
"title": "Do I need to rewrite my Solidity code?",
4368+
"anchor": "do-i-need-to-rewrite-my-solidity-code"
4369+
},
4370+
{
4371+
"depth": 3,
4372+
"title": "What about factory contracts?",
4373+
"anchor": "what-about-factory-contracts"
4374+
},
4375+
{
4376+
"depth": 3,
4377+
"title": "How do gas costs compare?",
4378+
"anchor": "how-do-gas-costs-compare"
4379+
},
4380+
{
4381+
"depth": 3,
4382+
"title": "Which Solidity features are not supported?",
4383+
"anchor": "which-solidity-features-are-not-supported"
4384+
},
4385+
{
4386+
"depth": 3,
4387+
"title": "How do I handle the existential deposit?",
4388+
"anchor": "how-do-i-handle-the-existential-deposit"
4389+
},
4390+
{
4391+
"depth": 3,
4392+
"title": "Can I use my existing development tools?",
4393+
"anchor": "can-i-use-my-existing-development-tools"
4394+
},
4395+
{
4396+
"depth": 2,
4397+
"title": "Conclusion",
4398+
"anchor": "conclusion"
4399+
}
4400+
],
4401+
"stats": {
4402+
"chars": 6067,
4403+
"words": 777,
4404+
"headings": 12,
4405+
"estimated_token_count_total": 1275
4406+
},
4407+
"hash": "sha256:d6cbd026bd22d3362fffe6bdab0ce3d1688482b6d1eec26368b46fd03eb82a5f",
4408+
"token_estimator": "heuristic-v1"
4409+
},
43294410
{
43304411
"id": "smart-contracts-for-eth-devs-accounts",
43314412
"title": "Accounts in Asset Hub Smart Contracts",
@@ -4846,87 +4927,6 @@
48464927
"hash": "sha256:da1669344010a793a5296c9397b2d5a85240ff6fbe37b885bce0139298364423",
48474928
"token_estimator": "heuristic-v1"
48484929
},
4849-
{
4850-
"id": "smart-contracts-for-eth-devs-migration",
4851-
"title": "Migration FAQs and Considerations",
4852-
"slug": "smart-contracts-for-eth-devs-migration",
4853-
"categories": [
4854-
"Smart Contracts"
4855-
],
4856-
"raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-for-eth-devs-migration.md",
4857-
"html_url": "https://docs.polkadot.com/smart-contracts/for-eth-devs/migration/",
4858-
"preview": "This guide helps Ethereum developers migrate their smart contracts to Polkadot Hub. Most contracts work without modifications on the REVM backend, while the PolkaVM backend offers enhanced performance with minimal adaptation for standard patterns.",
4859-
"outline": [
4860-
{
4861-
"depth": 2,
4862-
"title": "Introduction",
4863-
"anchor": "introduction"
4864-
},
4865-
{
4866-
"depth": 2,
4867-
"title": "Migration Considerations",
4868-
"anchor": "migration-considerations"
4869-
},
4870-
{
4871-
"depth": 2,
4872-
"title": "Migration Checklist",
4873-
"anchor": "migration-checklist"
4874-
},
4875-
{
4876-
"depth": 2,
4877-
"title": "Migration FAQs",
4878-
"anchor": "migration-faqs"
4879-
},
4880-
{
4881-
"depth": 3,
4882-
"title": "Which backend should I choose?",
4883-
"anchor": "which-backend-should-i-choose"
4884-
},
4885-
{
4886-
"depth": 3,
4887-
"title": "Do I need to rewrite my Solidity code?",
4888-
"anchor": "do-i-need-to-rewrite-my-solidity-code"
4889-
},
4890-
{
4891-
"depth": 3,
4892-
"title": "What about factory contracts?",
4893-
"anchor": "what-about-factory-contracts"
4894-
},
4895-
{
4896-
"depth": 3,
4897-
"title": "How do gas costs compare?",
4898-
"anchor": "how-do-gas-costs-compare"
4899-
},
4900-
{
4901-
"depth": 3,
4902-
"title": "Which Solidity features are not supported?",
4903-
"anchor": "which-solidity-features-are-not-supported"
4904-
},
4905-
{
4906-
"depth": 3,
4907-
"title": "How do I handle the existential deposit?",
4908-
"anchor": "how-do-i-handle-the-existential-deposit"
4909-
},
4910-
{
4911-
"depth": 3,
4912-
"title": "Can I use my existing development tools?",
4913-
"anchor": "can-i-use-my-existing-development-tools"
4914-
},
4915-
{
4916-
"depth": 2,
4917-
"title": "Conclusion",
4918-
"anchor": "conclusion"
4919-
}
4920-
],
4921-
"stats": {
4922-
"chars": 6067,
4923-
"words": 777,
4924-
"headings": 12,
4925-
"estimated_token_count_total": 1275
4926-
},
4927-
"hash": "sha256:d6cbd026bd22d3362fffe6bdab0ce3d1688482b6d1eec26368b46fd03eb82a5f",
4928-
"token_estimator": "heuristic-v1"
4929-
},
49304930
{
49314931
"id": "smart-contracts-get-started",
49324932
"title": "Get Started with Smart Contracts",
@@ -5401,12 +5401,12 @@
54015401
}
54025402
],
54035403
"stats": {
5404-
"chars": 20325,
5405-
"words": 2290,
5404+
"chars": 20056,
5405+
"words": 2249,
54065406
"headings": 12,
5407-
"estimated_token_count_total": 4600
5407+
"estimated_token_count_total": 4523
54085408
},
5409-
"hash": "sha256:7cf1e07d1b8ef4e7b893398976907159a932f23f708d4e1d7ac1d09b80881787",
5409+
"hash": "sha256:ac33422a87258d65a70e63f388279cc2afa4a1e3eec9c1b1aff52ac1ebf9e1a8",
54105410
"token_estimator": "heuristic-v1"
54115411
},
54125412
{

0 commit comments

Comments
 (0)