Skip to content

Conversation

@smiasojed
Copy link
Collaborator

@smiasojed smiasojed commented Oct 20, 2025

Related to: #294
Flags combination for the forge test command

Flag combination Compiler Runtime backend Target
(default) solc REVM Standard Foundry EVM test
--resolc resolc, solc pallet-revive (PVM) Run PolkaVM backend on pallet-revive
--resolc --polkadot resolc, solc pallet-revive (PVM) Run PolkaVM backend on pallet-revive
--polkadot (without resolc) resolc, solc pallet-revive (EVM) Run EVM backend on pallet-revive

TODO in next PRs:

  1. migrate EVM bytecode and set immutables
  2. Add vm cheatcodes, probably we should modify also flags

@smiasojed smiasojed marked this pull request as ready for review October 23, 2025 12:38
pub enum Item {
Data(Vec<u8>),
Array(Vec<Item>),
Array(Vec<Self>),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are this change needed, they don't seem related to the PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is reported by clippy

prj.update_config(|config| config.evm_version = EvmVersion::Cancun);

let res = cmd.args(["test", "--resolc", "-vvv", "--resolc-startup"]).assert();
let res = cmd.args(["test", "--resolc", "-vvv", "--polkadot"]).assert();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we also run all of our revive tests with revive evm now ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I will add them, when I have bytecode migration in place - I need to add functionality in pallet-revive

@alexggh
Copy link

alexggh commented Oct 24, 2025

This part needs updating as well:

revive_strategy::with_externalities(backend, f)
, otherwise --polkadot doesn't work well with forge test.

@alexggh
Copy link

alexggh commented Oct 24, 2025

Ran this with the tests from #334 and can confirm they are passing with REVM as the backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants