-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expose evm internal fns #62
feat: expose evm internal fns #62
Conversation
src/executor/mod.rs
Outdated
@@ -3,7 +3,7 @@ | |||
//! Executors are structs that hook gasometer and the EVM core together. It | |||
//! also handles the call stacks in EVM. | |||
|
|||
mod stack; | |||
pub mod stack; | |||
|
|||
pub use self::stack::{ | |||
MemoryStackState, Precompile, PrecompileOutput, StackExecutor, StackExitKind, StackState, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind to export MemoryStackAccount
here instead?
requires using our patch of the upstream evm until rust-ethereum/evm#62 is merged
}; | ||
|
||
pub use ethereum::Log; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of this. Ideally I'd like to avoid having to import ethereum
explicitly in my crate and have to manage its version & make sure it's in line with sputnik's.
requires using our patch of the upstream evm until rust-ethereum/evm#62 is merged
* feat: create cheatcode module * feat import MemoryStackState from upstream * feat(memory-stack-state-owned): modify to own the backend type requires using our patch of the upstream evm until rust-ethereum/evm#62 is merged * feat(backend): add cheatcode backend (wrapper around backends) * feat(evm): generalize Sputnik's stack executor to trait This will allow us to instantiate the Sputnik EVM executor with a cheatcode-enabled one * feat(handler): add cheatcode handler to apply cheatcodes dynamically * feat(CheatcodeHandler): first pass at implementing SputnikExecutor * feat: import upstream transact_call * fix: modify transact_call to use newly exposed handler methods * feat: import upstream call_inner * fix: modify `call_inner` to use newly exposed handler methods * feat: enable cheatcode via Solidity * chore: cargo fmt * chore: remove unused tracing and dbg macros * feat: enable roll and warp cheatcodes * chore: upgrade ethers to allow short human readable function sigs * chore: cargo fmt * feat: add helper function for instantiating cheatcode evm * feat(cli): enable cheatcodes * chore: bump deps
Bump! |
Sorry for taking so long. I'll have to add |
Sounds great to me. Thank you! |
bbb1ba1
to
8e10066
Compare
If 3rd parties want to build custom stack executors or stack states, they will need access to the datatypes defined inside this module
8e10066
to
625dccc
Compare
Let me get the no_std tests later. |
Everything else looks good. |
@sorpaas I have removed the default impl - anything else I can do to move the PR forward? |
Please fix lints. |
|
That's a mistake of mine. I'll revert it. |
* feat: create cheatcode module * feat import MemoryStackState from upstream * feat(memory-stack-state-owned): modify to own the backend type requires using our patch of the upstream evm until rust-ethereum/evm#62 is merged * feat(backend): add cheatcode backend (wrapper around backends) * feat(evm): generalize Sputnik's stack executor to trait This will allow us to instantiate the Sputnik EVM executor with a cheatcode-enabled one * feat(handler): add cheatcode handler to apply cheatcodes dynamically * feat(CheatcodeHandler): first pass at implementing SputnikExecutor * feat: import upstream transact_call * fix: modify transact_call to use newly exposed handler methods * feat: import upstream call_inner * fix: modify `call_inner` to use newly exposed handler methods * feat: enable cheatcode via Solidity * chore: cargo fmt * chore: remove unused tracing and dbg macros * feat: enable roll and warp cheatcodes * chore: upgrade ethers to allow short human readable function sigs * chore: cargo fmt * feat: add helper function for instantiating cheatcode evm * feat(cli): enable cheatcodes * chore: bump deps
* feat: create cheatcode module * feat import MemoryStackState from upstream * feat(memory-stack-state-owned): modify to own the backend type requires using our patch of the upstream evm until rust-ethereum/evm#62 is merged * feat(backend): add cheatcode backend (wrapper around backends) * feat(evm): generalize Sputnik's stack executor to trait This will allow us to instantiate the Sputnik EVM executor with a cheatcode-enabled one * feat(handler): add cheatcode handler to apply cheatcodes dynamically * feat(CheatcodeHandler): first pass at implementing SputnikExecutor * feat: import upstream transact_call * fix: modify transact_call to use newly exposed handler methods * feat: import upstream call_inner * fix: modify `call_inner` to use newly exposed handler methods * feat: enable cheatcode via Solidity * chore: cargo fmt * chore: remove unused tracing and dbg macros * feat: enable roll and warp cheatcodes * chore: upgrade ethers to allow short human readable function sigs * chore: cargo fmt * feat: add helper function for instantiating cheatcode evm * feat(cli): enable cheatcodes * chore: bump deps
If 3rd parties want to build custom stack executors or stack states, they will need access to the datatypes defined inside this module
also adds
auto_impl
to implement common traits forBox
,Arc
,&
and&mut
variants.