Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Implement ORIGIN opcode & gadget instances

* Fix rebase errors

* Update ORIGIN opcode impl and it's testing

* Update ORIGIN opcode gadget implementation & tests

* Update Origin gadget testcase to newest standard

* Remove useless bytecode `#start` tag in origin tests

Co-authored-by: CPerezz <[email protected]>
  • Loading branch information
ChihChengLiang and CPerezz authored Apr 5, 2022
1 parent d554260 commit 12e21ff
Show file tree
Hide file tree
Showing 6 changed files with 309 additions and 48 deletions.
109 changes: 62 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion bus-mapping/src/evm/opcodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ mod gasprice;
mod mload;
mod mstore;
mod number;
mod origin;
mod selfbalance;
mod sload;
mod stackonlyop;
Expand All @@ -43,6 +44,7 @@ use extcodehash::Extcodehash;
use gasprice::GasPrice;
use mload::Mload;
use mstore::Mstore;
use origin::Origin;
use selfbalance::Selfbalance;
use sload::Sload;
use stackonlyop::StackOnlyOpcode;
Expand Down Expand Up @@ -107,7 +109,7 @@ fn fn_gen_associated_ops(opcode_id: &OpcodeId) -> FnGenAssociatedOps {
// OpcodeId::SHA3 => {},
// OpcodeId::ADDRESS => {},
// OpcodeId::BALANCE => {},
// OpcodeId::ORIGIN => {},
OpcodeId::ORIGIN => Origin::gen_associated_ops,
OpcodeId::CALLER => Caller::gen_associated_ops,
OpcodeId::CALLVALUE => Callvalue::gen_associated_ops,
OpcodeId::CALLDATASIZE => Calldatasize::gen_associated_ops,
Expand Down
Loading

0 comments on commit 12e21ff

Please sign in to comment.