|
|
|
@ -11,10 +11,10 @@ contract TestFFI { |
|
|
|
|
|
|
|
|
|
function foo(int x) external { |
|
|
|
|
string[] memory inputs = new string[](3); |
|
|
|
|
inputs[0] = "echo"; |
|
|
|
|
inputs[1] = "-n"; |
|
|
|
|
inputs[0] = "python3"; |
|
|
|
|
inputs[1] = "-c"; |
|
|
|
|
// ABI encoded "gm", as a string |
|
|
|
|
inputs[2] = "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002676d000000000000000000000000000000000000000000000000000000000000"; |
|
|
|
|
inputs[2] = "print('0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002676d000000000000000000000000000000000000000000000000000000000000', end='')"; |
|
|
|
|
|
|
|
|
|
bytes memory res = Hevm(HEVM_ADDRESS).ffi(inputs); |
|
|
|
|
|
|
|
|
|