Get hello_sol.so
anchor init hello --solidityanchor build
hello_sol.sol
@program_id("F1ipperKF9EfD821ZbbYjS319LXYiBmjhzkkf5a26rC")contract hello_sol { bool private value = true; @payer(payer) constructor(address payer) { print("Hello, World!"); } /// A message that can be called on instantiated contracts. /// This one flips the value of the stored `bool` from `true` /// to `false` and vice versa. function flip() public { value = !value; } /// Simply returns the current value of our `bool`. function get() public view returns (bool) { return value; }}
Construct input
The input is the encoding of the function flip
5B3vFwFHgDL
Run in rbpf
./rbpf/cli/target/debug/rbpf_cli -u jit --mem 9999999999 --input ./solidity/sol/input --elf ./solidity/sol/hello_sol.so --trace
mem: [53, 66, 51, 118, 70, 119, 70, 72, 103, 68, 76]Result: Err(AccessViolation(Load, 17179869200, 1, "input"))Instruction Count: 46Trace: