Skip to content

Commit

Permalink
evm: Set up compiler version
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-riley committed Oct 25, 2024
1 parent c0e5298 commit ccb1b48
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 6 deletions.
3 changes: 3 additions & 0 deletions evm/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ docs/

# Code coverage
lcov.info

# Flattened source
flattened
8 changes: 8 additions & 0 deletions evm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ evm$ RPC_URL= MNEMONIC= OUR_CHAIN_ID= EVM_CHAIN_ID= ADMIN= ROUTER= WORMHOLE= CON

Note that the deploy script uses `create2` to generate a deterministic contract address.

### Generating Flattened Source

If you need to generate flattened source to be used for contract verification, you can use the following command. The results will be in `evm/flattened`.

```shell
evm$ ./sh/flatten.sh
```

### Configuring Peer Transceivers

To configure a peer Wormhole Transceiver for a given chain, you can use the following command.
Expand Down
6 changes: 6 additions & 0 deletions evm/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ src = "src"
out = "out"
libs = ["lib"]

solc_version = "0.8.24"
evm_version = "paris"
optimizer = true
optimizer_runs = 200
via_ir = false

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
2 changes: 1 addition & 1 deletion evm/script/DeployWormholeTransceiver.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
pragma solidity ^0.8.19;

import {WormholeTransceiver, wormholeTransceiverVersionString} from "../src/WormholeTransceiver.sol";
import "forge-std/Script.sol";
Expand Down
2 changes: 1 addition & 1 deletion evm/script/ReceiveMsg.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
pragma solidity ^0.8.19;

import {WormholeTransceiver} from "../src/WormholeTransceiver.sol";
import "forge-std/Script.sol";
Expand Down
2 changes: 1 addition & 1 deletion evm/script/SetPeer.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
pragma solidity ^0.8.19;

import {WormholeTransceiver} from "../src/WormholeTransceiver.sol";
import "forge-std/Script.sol";
Expand Down
9 changes: 9 additions & 0 deletions evm/sh/flatten.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
rm -rf flattened
mkdir flattened
for fileName in \
src/WormholeTransceiver.sol
do
echo $fileName
flattened=flattened/`basename $fileName`
forge flatten --output $flattened $fileName
done
2 changes: 1 addition & 1 deletion evm/src/WormholeTransceiver.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache 2
pragma solidity ^0.8.13;
pragma solidity ^0.8.19;

import "example-gmp-router/interfaces/IRouterTransceiver.sol";

Expand Down
2 changes: 1 addition & 1 deletion evm/src/interfaces/IWormholeTransceiver.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache 2
pragma solidity ^0.8.13;
pragma solidity ^0.8.19;

import "example-gmp-router/interfaces/ITransceiver.sol";

Expand Down
2 changes: 1 addition & 1 deletion evm/src/libraries/TransceiverHelpers.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache 2
pragma solidity ^0.8.13;
pragma solidity ^0.8.19;

/// @notice A fork has occurred.
/// @dev Selector: 0x77d879fb
Expand Down

0 comments on commit ccb1b48

Please sign in to comment.