Skip to content

Commit 9d949c2

Browse files
authored
Small fix in ethers page (#31)
1 parent 2ca25e0 commit 9d949c2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ to gather feedback during development.
1010

1111
Our solution is Ethereum-compatible: You can write your contracts in Solidity and interact with the node
1212
using Ethereum JSON RPC alongside an Ethereum wallet like MetaMask. Under the hood, we recompile the
13-
contracts from YUL (EVM assembly) to RISC-V to run them using PolkaVM instead of EVM.
13+
contracts from YUL (EVM assembly) to RISC-V to run them using [PolkaVM](https://wiki.polkadot.network/docs/learn-jam-chain#polkadot-virtual-machine-pvm) instead of EVM.
1414

1515
To keep things simple for now, you need to use our [REMIX](https://remix.polkadot.io) web frontend to compile
1616
your contracts to RISC-V and deploy them to Westend. Eventually, we will provide tools to accomplish this process locally.

docs/tutorial/3-getting-started-with-ethers.js.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,22 @@ Once compiled, you can deploy your contract, as shown below.
143143
```ts
144144
import { ContractFactory } from 'ethers'
145145
import { compile } from '@parity/revive'
146+
import { readFileSync } from 'fs'
146147

147-
// Compile the solidity contract to Polkavm bytecode.
148+
// Update the following two based on your contract. Ensure `ContractName` is same as defined in `*.sol`.
148149
const contract = './path/MyContract.sol'
149150
const contractName = 'MyContract'
151+
// Compile the solidity contract to Polkavm bytecode.
150152
const res = await compile({
151153
[contract]: {
152154
content: readFileSync(contract, 'utf8'),
153155
},
154156
})
155157

158+
// print list of contract paths and names.
159+
console.log('Contracts compiled:')
160+
console.log(Object.keys(res.contracts))
161+
156162
// Get the contract's abi and bytecode.
157163
const {
158164
abi,

0 commit comments

Comments
 (0)