Skip to content

Commit

Permalink
spec_id = shanghai
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege committed Aug 13, 2023
1 parent 8097a75 commit 80e1062
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
16 changes: 16 additions & 0 deletions forge/src/forge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ fn manifest_root() -> PathBuf {
}

/// Builds a non-tracing runner
#[cfg(target_os = "macos")]
fn runner_with_config(mut config: Config) -> MultiContractRunner {
config.allow_paths.push(manifest_root());

Expand All @@ -91,6 +92,21 @@ fn runner_with_config(mut config: Config) -> MultiContractRunner {
.unwrap()
}

/// Builds a non-tracing runner
#[cfg(not(target_os = "macos"))]
fn runner_with_config(mut config: Config) -> MultiContractRunner {
use foundry_evm::executor::SpecId;

config.allow_paths.push(manifest_root());

base_runner()
.with_cheats_config(CheatsConfig::new(&config, &EVM_OPTS))
.evm_spec(SpecId::SHANGHAI)
.sender(config.sender)
.build(&PROJECT.paths.root, (*COMPILED).clone(), EVM_OPTS.local_evm_env(), EVM_OPTS.clone())
.unwrap()
}

/// Builds a non-tracing runner
pub fn runner() -> MultiContractRunner {
let mut config = Config::with_root(PROJECT.root());
Expand Down
12 changes: 6 additions & 6 deletions src/EvmHost.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ abstract contract EvmHost is IIsmpHost, Context, Test {
// commitment of all outgoing requests
mapping(bytes32 => bool) private _requestCommitments;

// commitment of all outgoing responses
mapping(bytes32 => bool) private _responseCommitments;

// commitment of all incoming requests
mapping(bytes32 => bool) private _requestReceipts;

// commitment of all incoming responses
mapping(bytes32 => bool) private _responseCommitments;

// commitment of all outgoing responses
mapping(bytes32 => bool) private _responseReceipts;

// (stateMachineId => (blockHeight => StateCommitment))
Expand Down Expand Up @@ -297,7 +297,7 @@ abstract contract EvmHost is IIsmpHost, Context, Test {
IIsmpModule(origin).onGetResponse(response);

bytes32 commitment = Message.hash(response);
_responseCommitments[commitment] = true;
_responseReceipts[commitment] = true;
}

/**
Expand All @@ -310,7 +310,7 @@ abstract contract EvmHost is IIsmpHost, Context, Test {

// Delete Commitment
bytes32 commitment = Message.hash(request);
delete _responseReceipts[commitment];
delete _requestCommitments[commitment];
}

/**
Expand All @@ -324,7 +324,7 @@ abstract contract EvmHost is IIsmpHost, Context, Test {

// Delete Commitment
bytes32 commitment = Message.hash(request);
delete _responseReceipts[commitment];
delete _requestCommitments[commitment];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/beefy/BeefyV1.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.17;

import "./Codec.sol";
import "../interfaces/StateMachine.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/beefy/Codec.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
pragma solidity ^0.8.17;

import "solidity-merkle-trees/MerkleMultiProof.sol";
import "solidity-merkle-trees/trie/substrate/ScaleCodec.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/beefy/Header.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
pragma solidity ^0.8.17;

struct DigestItem {
bytes4 consensusId;
Expand Down

0 comments on commit 80e1062

Please sign in to comment.