Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ npx hardhat run scripts/fassets/getLotSize.ts --network coston2
You should see the following output:

```bash
Compiled 1 Solidity file successfully (evm target: shanghai).
Compiled 1 Solidity file successfully (evm target: cancun).
Deploying FAssetsSettings...
FAssetsSettings deployed to: 0x40deEaA76224Ca9439D4e1c86F827Be829b89D9E
Lot size: 20000000n
Expand Down
2 changes: 1 addition & 1 deletion docs/fdc/2-getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ The response consists of several key components:

:::warning

Don't forget to set the EVM version to `shanghai` in Remix before compiling the contract.
Don't forget to set the EVM version to `cancun` in Remix before compiling the contract.

:::

Expand Down
4 changes: 2 additions & 2 deletions docs/ftso/1-getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ If you have not already configured your MetaMask wallet to support Flare Testnet
:::

{/* prettier-ignore */}
1. <Remix feedName="FtsoV2FeedConsumer.sol">Open contract in Remix</Remix>
1. <Remix fileName="FtsoV2FeedConsumer.sol">Open contract in Remix</Remix>

2. Click on `FtsoV2FeedConsumer.sol` in the file explorer to open the contract in the editor.

2. On the left side of Remix, click the **Solidity Compiler** tab to view the compiler settings.

<img src={OpenSolidityCompiler} style={{ width: 300 }} />

3. Expand the **Advanced Configurations** section and make sure the **EVM Version** is set to `shanghai`.
3. Expand the **Advanced Configurations** section and make sure the **EVM Version** is set to `cancun`.

<img src={SetEvmVersion} style={{ width: 300 }} />

Expand Down
8 changes: 4 additions & 4 deletions docs/ftso/guides/build-first-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ This guide is for developers who want to build an FTSOv2 application using eithe
{FtsoV2FeedConsumerFoundry}
</CodeBlock>

2. Set EVM version to `shanghai` in `foundry.toml`:
2. Set EVM version to `cancun` in `foundry.toml`:

```toml title="foundry.toml"
[profile.default]
...
evm_version = "shanghai"
evm_version = "cancun"
```

3. To ensure everything is set up correctly, compile the contract by running:
Expand All @@ -180,14 +180,14 @@ This guide is for developers who want to build an FTSOv2 application using eithe
{FtsoV2ConsumerHardhat}
</CodeBlock>

2. Set EVM version to `shanghai` in `hardhat.config.ts`:
2. Set EVM version to `cancun` in `hardhat.config.ts`:

```typescript
module.exports = {
solidity: {
version: "0.8.27",
settings: {
evmVersion: "shanghai",
evmVersion: "cancun",
optimizer: {
enabled: true,
runs: 200,
Expand Down
14 changes: 7 additions & 7 deletions docs/ftso/guides/change-quote-feed.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,33 +51,33 @@ contract FtsoV2ChangeQuoteFeed {

:::

:::warning[Set EVM Version to shanghai]
:::warning[Set EVM Version to Cancun]

- **Using Remix:** Set EVM version to `shanghai` in the **Advanced Configurations** section of the **Solidity Compiler** tab:
- **Using Remix:** Set EVM version to `cancun` in the **Advanced Configurations** section of the **Solidity Compiler** tab:

{" "}

<img src={SetEvmVersionRemix} style={{ width: 300 }} />

- **Using Hardhat or Foundry:** Set EVM version to `shanghai` in [hardhat.config.ts](https://github.com/flare-foundation/flare-hardhat-starter/blob/master/hardhat.config.ts#L34) or [foundry.toml](https://github.com/flare-foundation/flare-foundry-starter/blob/master/foundry.toml).
- **Using Hardhat or Foundry:** Set EVM version to `cancun` in [hardhat.config.ts](https://github.com/flare-foundation/flare-hardhat-starter/blob/master/hardhat.config.ts#L34) or [foundry.toml](https://github.com/flare-foundation/flare-foundry-starter/blob/master/foundry.toml).

- **Using Standard Solidity JSON:** Set `evmVersion` to `shanghai`:
- **Using Standard Solidity JSON:** Set `evmVersion` to `cancun`:

```json
{
"settings": {
"optimizer": {
/* ... */
},
"evmVersion": "shanghai"
"evmVersion": "cancun"
}
}
```

- **Using `solc` CLI:** Set `--evm-version` to `shanghai`:
- **Using `solc` CLI:** Set `--evm-version` to `cancun`:

```bash
solc --evm-version shanghai <args>
solc --evm-version cancun <args>
```

:::
2 changes: 1 addition & 1 deletion docs/network/0-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ Discover suitable options for your needs on the [Flare Wallets](https://flare.ne

- **RPC-API:** [Ethereum RPC API](https://ethereum.org/developers/docs/apis/json-rpc/)

- **Supported opcodes:** Supports all EVM [opcodes](https://www.evm.codes/?fork=shanghai) up to and including the Shanghai hard fork.
- **Supported opcodes:** Supports all EVM [opcodes](https://www.evm.codes/?fork=cancun) up to and including the Cancun hard fork.

## Consensus mechanism

Expand Down
2 changes: 1 addition & 1 deletion docs/network/1-getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Let's break down the `HelloWorld` contract:

<img src={OpenSolidityCompiler} style={{ width: 300 }} />

4. Expand the **Advanced Configurations** section and make sure the **EVM Version** is set to `shanghai`.
4. Expand the **Advanced Configurations** section and make sure the **EVM Version** is set to `cancun`.

<img src={SetEvmVersion} style={{ width: 300 }} />

Expand Down
2 changes: 1 addition & 1 deletion docs/network/guides/flare-for-go-developers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Note that the contract interface dependencies have been inlined to avoid any imp
To compile the contract, use the Solidity compiler:

```bash
solc --evm-version shanghai --abi --bin FtsoV2FeedConsumer.sol -o build
solc --evm-version cancun --abi --bin FtsoV2FeedConsumer.sol -o build
```

The compiled contract will be saved in the `build/` folder.
Expand Down
2 changes: 1 addition & 1 deletion docs/network/guides/flare-for-javascript-developers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Note that the contract interface dependencies have been inlined to avoid any imp
</details>

```bash
solc --evm-version shanghai FtsoV2FeedConsumer.sol --abi --bin -o build
solc --evm-version cancun FtsoV2FeedConsumer.sol --abi --bin -o build
```

This will generate two files `build/FtsoV2FeedConsumer.abi` and `build/FtsoV2FeedConsumer.bin` files with the contract's ABI and bytecode. Rename `FtsoV2FeedConsumer.abi` to `FtsoV2FeedConsumer.json`.
Expand Down
10 changes: 5 additions & 5 deletions docs/network/guides/secure-random-numbers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ In addition to the `randomNumber` itself, two other variables are retrieved:
- `timestamp`: The UNIX timestamp marking the end of the voting round during which data was collected from data providers to generate the specific number.
Each voting round lasts for a fixed 90-second window.

:::warning[Set EVM Version to Shanghai]
:::warning[Set EVM Version to Cancun]

- **Using Remix:** Set EVM version to `shanghai` under **Solidity Compiler** → **Advanced Configurations**.
- **Using Remix:** Set EVM version to `cancun` under **Solidity Compiler** → **Advanced Configurations**.

- **Using Hardhat or Foundry:** Set EVM version to `shanghai` in [hardhat.config.ts](https://github.com/flare-foundation/flare-hardhat-starter/blob/master/hardhat.config.ts#L34) or [foundry.toml](https://github.com/flare-foundation/flare-foundry-starter/blob/master/foundry.toml).
- **Using Standard Solidity JSON:** Set `"evmVersion": "shaghai"` in `settings`.
- **Using `solc`:** Add `--evm-version shanghai` flag to your command.
- **Using Hardhat or Foundry:** Set EVM version to `cancun` in [hardhat.config.ts](https://github.com/flare-foundation/flare-hardhat-starter/blob/master/hardhat.config.ts#L34) or [foundry.toml](https://github.com/flare-foundation/flare-foundry-starter/blob/master/foundry.toml).
- **Using Standard Solidity JSON:** Set `"evmVersion": "cancun"` in `settings`.
- **Using `solc`:** Add `--evm-version cancun` flag to your command.

:::

Expand Down
2 changes: 1 addition & 1 deletion examples/developer-hub-python/compile_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
},
"optimizer": {"enabled": True, "runs": 200},
"evmVersion": "shanghai",
"evmVersion": "cancun",
},
},
solc_version=solc_version,
Expand Down
Loading