Fix ffi test by using python instead of echo

Some echo implementations don't support `-n` unfortunately.
pull/943/head
Emilio López 2 years ago
parent 48d90cb2f0
commit b74eb17ca5
  1. 6
      tests/solidity/cheat/ffi.sol

@ -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);

Loading…
Cancel
Save