Skip to content

Commit 2400916

Browse files
committed
fix: removing code size
1 parent c94b9ac commit 2400916

File tree

10 files changed

+58
-71
lines changed

10 files changed

+58
-71
lines changed

.ai/categories/smart-contracts.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3468,7 +3468,15 @@ You can create a `deploy.js` script in the root of your project to achieve this.
34683468
5. Configure and execute the deployment:
34693469

34703470
```js title="scripts/deploy.js"
3471-
3471+
const providerConfig = {
3472+
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', #TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready
3473+
chainId: 420420422,
3474+
name: 'polkadot-hub-testnet',
3475+
};
3476+
3477+
const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon';
3478+
3479+
deployContract('Storage', mnemonic, providerConfig);
34723480
```
34733481

34743482
!!! note
@@ -3659,9 +3667,9 @@ const providerConfig = {
36593667
chainId: 420420422,
36603668
};
36613669

3662-
const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon';
3670+
const mnemonic = 'INSERT_MNEMONIC'
36633671
const contractName = 'Storage';
3664-
const contractAddress = '0x83e43892a98f924706E9DB7917244897dC8b8126';
3672+
const contractAddress = 'INSERT_CONTRACT_ADDRESS'
36653673
const newNumber = 42;
36663674

36673675
interactWithStorageContract(
@@ -3673,7 +3681,7 @@ interactWithStorageContract(
36733681
);
36743682
```
36753683

3676-
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.
3684+
Ensure you replace the `INSERT_MNEMONIC` and `INSERT_CONTRACT_ADDRESS` 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.
36773685

36783686
To interact with the contract, run:
36793687

@@ -10760,8 +10768,6 @@ Page Title: Web3.js
1076010768

1076110769
# Web3.js
1076210770

10763-
!!! smartcontract "PolkaVM Preview Release"
10764-
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
1076510771
!!! warning
1076610772
Web3.js has been [sunset](https://blog.chainsafe.io/web3-js-sunset/){target=\_blank}. You can find guides on using [Ethers.js](/smart-contracts/libraries/ethers-js/){target=\_blank} and [viem](/smart-contracts/libraries/viem/){target=\_blank} in the Libraries section.
1076710773

.ai/categories/tooling.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2766,7 +2766,15 @@ You can create a `deploy.js` script in the root of your project to achieve this.
27662766
5. Configure and execute the deployment:
27672767

27682768
```js title="scripts/deploy.js"
2769-
2769+
const providerConfig = {
2770+
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', #TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready
2771+
chainId: 420420422,
2772+
name: 'polkadot-hub-testnet',
2773+
};
2774+
2775+
const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon';
2776+
2777+
deployContract('Storage', mnemonic, providerConfig);
27702778
```
27712779

27722780
!!! note
@@ -2957,9 +2965,9 @@ const providerConfig = {
29572965
chainId: 420420422,
29582966
};
29592967

2960-
const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon';
2968+
const mnemonic = 'INSERT_MNEMONIC'
29612969
const contractName = 'Storage';
2962-
const contractAddress = '0x83e43892a98f924706E9DB7917244897dC8b8126';
2970+
const contractAddress = 'INSERT_CONTRACT_ADDRESS'
29632971
const newNumber = 42;
29642972

29652973
interactWithStorageContract(
@@ -2971,7 +2979,7 @@ interactWithStorageContract(
29712979
);
29722980
```
29732981

2974-
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.
2982+
Ensure you replace the `INSERT_MNEMONIC` and `INSERT_CONTRACT_ADDRESS` 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.
29752983

29762984
To interact with the contract, run:
29772985

@@ -12855,8 +12863,6 @@ Page Title: Web3.js
1285512863

1285612864
# Web3.js
1285712865

12858-
!!! smartcontract "PolkaVM Preview Release"
12859-
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
1286012866
!!! warning
1286112867
Web3.js has been [sunset](https://blog.chainsafe.io/web3-js-sunset/){target=\_blank}. You can find guides on using [Ethers.js](/smart-contracts/libraries/ethers-js/){target=\_blank} and [viem](/smart-contracts/libraries/viem/){target=\_blank} in the Libraries section.
1286212868

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,15 @@ You can create a `deploy.js` script in the root of your project to achieve this.
401401
5. Configure and execute the deployment:
402402

403403
```js title="scripts/deploy.js"
404-
404+
const providerConfig = {
405+
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', #TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready
406+
chainId: 420420422,
407+
name: 'polkadot-hub-testnet',
408+
};
409+
410+
const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon';
411+
412+
deployContract('Storage', mnemonic, providerConfig);
405413
```
406414

407415
!!! note
@@ -592,9 +600,9 @@ const providerConfig = {
592600
chainId: 420420422,
593601
};
594602
595-
const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon';
603+
const mnemonic = 'INSERT_MNEMONIC'
596604
const contractName = 'Storage';
597-
const contractAddress = '0x83e43892a98f924706E9DB7917244897dC8b8126';
605+
const contractAddress = 'INSERT_CONTRACT_ADDRESS'
598606
const newNumber = 42;
599607
600608
interactWithStorageContract(
@@ -606,7 +614,7 @@ interactWithStorageContract(
606614
);
607615
```
608616

609-
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.
617+
Ensure you replace the `INSERT_MNEMONIC` and `INSERT_CONTRACT_ADDRESS` 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.
610618

611619
To interact with the contract, run:
612620

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ url: https://docs.polkadot.com/smart-contracts/libraries/web3-js/
77

88
# Web3.js
99

10-
!!! smartcontract "PolkaVM Preview Release"
11-
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
1210
!!! warning
1311
Web3.js has been [sunset](https://blog.chainsafe.io/web3-js-sunset/){target=\_blank}. You can find guides on using [Ethers.js](/smart-contracts/libraries/ethers-js/){target=\_blank} and [viem](/smart-contracts/libraries/viem/){target=\_blank} in the Libraries section.
1412

.ai/pages/text-smart-contracts-code-size.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.ai/site-index.json

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8541,12 +8541,12 @@
85418541
}
85428542
],
85438543
"stats": {
8544-
"chars": 21133,
8545-
"words": 2401,
8544+
"chars": 21413,
8545+
"words": 2435,
85468546
"headings": 12,
8547-
"estimated_token_count_total": 4687
8547+
"estimated_token_count_total": 4762
85488548
},
8549-
"hash": "sha256:ea39f6aab99e80c378fbf7c48030d274e13c340e23465d40d4cfb33c9f0d0f2f",
8549+
"hash": "sha256:121e52bd405e70bde9288d65557266fbaa0dbca290bdfebc67de8105d9672785",
85508550
"token_estimator": "heuristic-v1"
85518551
},
85528552
{
@@ -8723,7 +8723,7 @@
87238723
],
87248724
"raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-libraries-web3-js.md",
87258725
"html_url": "https://docs.polkadot.com/smart-contracts/libraries/web3-js/",
8726-
"preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. !!! warning Web3.js has been [sunset](https://blog.chainsafe.io/web3-js-sunset/){target=\\_blank}. You can find guides on using [Ethers.js](/smart-contracts/libraries/ethers-js/){target=\\_blank} and [viem](/smart-contracts/libraries/viem/){target=\\_blank} in the Libraries section.",
8726+
"preview": "!!! warning Web3.js has been [sunset](https://blog.chainsafe.io/web3-js-sunset/){target=\\_blank}. You can find guides on using [Ethers.js](/smart-contracts/libraries/ethers-js/){target=\\_blank} and [viem](/smart-contracts/libraries/viem/){target=\\_blank} in the Libraries section.",
87278727
"outline": [
87288728
{
87298729
"depth": 2,
@@ -8777,12 +8777,12 @@
87778777
}
87788778
],
87798779
"stats": {
8780-
"chars": 13266,
8781-
"words": 1579,
8780+
"chars": 13096,
8781+
"words": 1558,
87828782
"headings": 10,
87838783
"estimated_token_count_total": 3035
87848784
},
8785-
"hash": "sha256:f0d36333d0d3afff7f6374a61d0f6d1fb878c9ef4c4e4c24447745661dbe59d0",
8785+
"hash": "sha256:0aafc5ad18ee58314c81b5bbe98aa80bddfd9d1820eeaf674607d69819702a2b",
87868786
"token_estimator": "heuristic-v1"
87878787
},
87888788
{
@@ -9051,25 +9051,5 @@
90519051
},
90529052
"hash": "sha256:a40e3f34f70db22bfe39e40d68dc5a53a726ce47cb73b602d8605355c61ffd22",
90539053
"token_estimator": "heuristic-v1"
9054-
},
9055-
{
9056-
"id": "text-smart-contracts-code-size",
9057-
"title": "text-smart-contracts-code-size",
9058-
"slug": "text-smart-contracts-code-size",
9059-
"categories": [
9060-
"Uncategorized"
9061-
],
9062-
"raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/text-smart-contracts-code-size.md",
9063-
"html_url": "https://docs.polkadot.com/text/smart-contracts/code-size/",
9064-
"preview": "!!! info \"Mind the contract size\" Polkadot Hub enforces Ethereum's 24 KiB contract-size limit (EIP-170) for EVM deployments. Keep contracts modular, share logic through libraries, and make use of compiler optimizations so your bytecode stays within the limit.",
9065-
"outline": [],
9066-
"stats": {
9067-
"chars": 264,
9068-
"words": 40,
9069-
"headings": 0,
9070-
"estimated_token_count_total": 0
9071-
},
9072-
"hash": "sha256:e6c2ffab1e1d9d06f6e209f37e1c829abd6be41fa7c5350d7dcc858745d4e011",
9073-
"token_estimator": "heuristic-v1"
90749054
}
90759055
]

0 commit comments

Comments
 (0)