Skip to content

Commit

Permalink
hacking
Browse files Browse the repository at this point in the history
  • Loading branch information
Grant Wuerker committed Apr 11, 2023
1 parent 0e60aa2 commit f297d27
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/tests/fixtures/files/contract_abi.fe
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ contract MyContract {

pub unsafe fn __call__(mut self, ctx: Context) {
let selector: u256 = ctx.msg_sig()

if selector == 0xe5d5dfbc {
// set_foo
let mut in_buf: CalldataBuffer = CalldataBuffer::new(start: 4, end: 36)
Expand All @@ -43,6 +44,7 @@ contract MyContract {
unsafe fn contract_call() {
let mut ctx: Context = Context()
let mut my_contract: MyContractInterface = MyContractInterface(address(MyContract.create(ctx, 0)))
assert my_contract.get_foo() == 0
my_contract.set_foo(foo: 42)
assert my_contract.get_foo() == 42
}

0 comments on commit f297d27

Please sign in to comment.