You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: develop/smart-contracts/libraries/web3-js.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,13 +97,13 @@ For instance, to fetch the latest block number of the chain, you can use the fol
97
97
98
98
--8<-- 'text/smart-contracts/code-size.md'
99
99
100
-
Polkadot Hub requires contracts to be compiled to [PolkaVM](/polkadot-protocol/smart-contract-basics/polkavm-design/){target=\_blank} bytecode. This is achieved using the [`revive`](https://github.com/paritytech/revive){target=\_blank} compiler. Install the [`@parity/revive`](https://github.com/paritytech/js-revive){target=\_blank} library as a development dependency:
100
+
Polkadot Hub requires contracts to be compiled to [PolkaVM](/polkadot-protocol/smart-contract-basics/polkavm-design/){target=\_blank} bytecode. This is achieved using the [`revive`](https://github.com/paritytech/revive/tree/v0.2.0/js/resolc){target=\_blank} compiler. Install the [`@parity/resolc`](https://github.com/paritytech/revive){target=\_blank} library as a development dependency:
101
101
102
102
```bash
103
-
npm install --save-dev @parity/revive
103
+
npm install --save-dev @parity/resolc
104
104
```
105
105
106
-
This guide uses `@parity/revive` version `{{ dependencies.javascript_packages.revive.version }}`.
106
+
This guide uses `@parity/resolc` version `{{ dependencies.javascript_packages.resolc.version }}`.
107
107
108
108
Here's a simple storage contract that you can use to follow the process:
Copy file name to clipboardExpand all lines: llms.txt
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -8840,13 +8840,13 @@ The `revive` compiler transforms Solidity smart contracts into [PolkaVM](/develo
8840
8840
8841
8841
### Install the Revive Library
8842
8842
8843
-
The [`@parity/revive`](https://www.npmjs.com/package/@parity/revive){target=\_blank} library will compile your Solidity code for deployment on Polkadot Hub. Run the following command in your terminal to install the library:
8843
+
The [`@parity/resolc`](https://www.npmjs.com/package/@parity/resolc){target=\_blank} library will compile your Solidity code for deployment on Polkadot Hub. Run the following command in your terminal to install the library:
8844
8844
8845
8845
```bash
8846
-
npm install --save-dev @parity/revive
8846
+
npm install --save-dev @parity/resolc
8847
8847
```
8848
8848
8849
-
This guide uses `@parity/revive` version `{{ dependencies.javascript_packages.revive.version }}`.
8849
+
This guide uses `@parity/resolc` version `{{ dependencies.javascript_packages.resolc.version }}`.
8850
8850
8851
8851
### Sample Storage Smart Contract
8852
8852
@@ -8881,7 +8881,7 @@ contract Storage {
8881
8881
To compile this contract, use the following script:
Install viem along with other necessary dependencies, including [@parity/revive](https://www.npmjs.com/package/@parity/revive){target=\_blank}, which enables to compile smart contracts to [PolkaVM](/polkadot-protocol/smart-contract-basics/polkavm-design/#polkavm){target=\_blank} bytecode:
9370
+
Install viem along with other necessary dependencies, including [@parity/resolc](https://www.npmjs.com/package/@parity/resolc){target=\_blank}, which enables to compile smart contracts to [PolkaVM](/polkadot-protocol/smart-contract-basics/polkavm-design/#polkavm){target=\_blank} bytecode:
Create a new file at `src/compile.ts` for handling contract compilation:
9599
9599
9600
9600
```typescript title="src/compile.ts"
9601
-
import { compile } from '@parity/revive';
9601
+
import { compile } from '@parity/resolc';
9602
9602
import { readFileSync, writeFileSync } from 'fs';
9603
9603
import { basename, join } from 'path';
9604
9604
@@ -10428,13 +10428,13 @@ main();
10428
10428
10429
10429
For detailed comparisons and migration guidelines, see the [EVM vs. PolkaVM](/polkadot-protocol/smart-contract-basics/evm-vs-polkavm/#current-memory-limits){target=\_blank} documentation page.
10430
10430
10431
-
Polkadot Hub requires contracts to be compiled to [PolkaVM](/polkadot-protocol/smart-contract-basics/polkavm-design/){target=\_blank} bytecode. This is achieved using the [`revive`](https://github.com/paritytech/revive){target=\_blank} compiler. Install the [`@parity/revive`](https://github.com/paritytech/js-revive){target=\_blank} library as a development dependency:
10431
+
Polkadot Hub requires contracts to be compiled to [PolkaVM](/polkadot-protocol/smart-contract-basics/polkavm-design/){target=\_blank} bytecode. This is achieved using the [`revive`](https://github.com/paritytech/revive/tree/v0.2.0/js/resolc){target=\_blank} compiler. Install the [`@parity/resolc`](https://github.com/paritytech/revive){target=\_blank} library as a development dependency:
10432
10432
10433
10433
```bash
10434
-
npm install --save-dev @parity/revive
10434
+
npm install --save-dev @parity/resolc
10435
10435
```
10436
10436
10437
-
This guide uses `@parity/revive` version `{{ dependencies.javascript_packages.revive.version }}`.
10437
+
This guide uses `@parity/resolc` version `{{ dependencies.javascript_packages.resolc.version }}`.
10438
10438
10439
10439
Here's a simple storage contract that you can use to follow the process:
10440
10440
@@ -10462,7 +10462,7 @@ contract Storage {
10462
10462
With that, you can now create a `compile.js` snippet that transforms your solidity code into PolkaVM bytecode:
0 commit comments