Boolean stack implementation #18

Open
navelbuffle wants to merge 17 commits from boolean-stack into offchain-start
Showing only changes of commit 2e214f95d3 - Show all commits
+4 -4
View File
@@ -28,7 +28,7 @@ contract Push3IntAdapterTest is Test {
* (like a NOOP). * (like a NOOP).
*/ */
function test_run1In1Out_noop() public view { function test_run1In1Out_noop() public view {
bytes memory code = hex"03000100"; bytes memory code = hex"04000100";
int256 inputVal = 123; int256 inputVal = 123;
int256 result = adapter.run1In1Out(code, inputVal); int256 result = adapter.run1In1Out(code, inputVal);
@@ -41,7 +41,7 @@ contract Push3IntAdapterTest is Test {
* @notice Test run2In1Out. We'll push 5, 7, do an op that leaves 12. * @notice Test run2In1Out. We'll push 5, 7, do an op that leaves 12.
*/ */
function test_run2In1Out_plus() public view { function test_run2In1Out_plus() public view {
bytes memory code = hex"03000101"; bytes memory code = hex"04000105";
int256 in1 = 5; int256 in1 = 5;
int256 in2 = 7; int256 in2 = 7;
@@ -55,7 +55,7 @@ contract Push3IntAdapterTest is Test {
* For now, we do a placeholder code. * For now, we do a placeholder code.
*/ */
function test_run1In2Out() public view { function test_run1In2Out() public view {
bytes memory code = hex"0300050200000003"; bytes memory code = hex"0400050200000003";
int256 inVal = 42; int256 inVal = 42;
(int256 top, int256 secondTop) = adapter.run1In2Out(code, inVal); (int256 top, int256 secondTop) = adapter.run1In2Out(code, inVal);
@@ -70,7 +70,7 @@ contract Push3IntAdapterTest is Test {
*/ */
function test_run0InNOut() public view { function test_run0InNOut() public view {
bytes memory code = hex"03000A02000000030200000005"; bytes memory code = hex"04000A02000000030200000005";
int256[] memory stackResult = adapter.run0InNOut(code); int256[] memory stackResult = adapter.run0InNOut(code);