@@ -447,7 +447,6 @@ local function memoryPage(table_in)
447
447
print (i , table_in [table_in_size - i + 1 ], " goes to" , page [32 - i + 1 ])
448
448
page [32 - i + 1 ] = table_in [table_in_size - i + 1 ]
449
449
end
450
-
451
450
return page
452
451
end
453
452
@@ -460,34 +459,6 @@ local function eth_call(contract)
460
459
-- return {state.stack, state.memory, state.storage, state.pc}
461
460
end
462
461
463
- local function evm_call (code )
464
- -- "601e600c01"
465
- -- "605f5f5f5f"
466
- -- "66abcdef01abcdef02abcdef03abcdef04abcdef05abcdef06abcdef07abcdef0800"
467
- -- "600456005B61ffff00" -- JUMP
468
- -- "62ffaabb5000" -- POP
469
- -- "60016002600350505000" -- POP
470
- -- "60018000" -- DUP1
471
- -- "6001600260036004600560068000" -- DUP4
472
- -- "600160026003600460059100" -- SWAP3
473
- -- "60006010576001600c5700005B600100" -- JUMPI
474
- -- "60106010146010600514" -- EQ
475
- -- "600960ff12600a600a1200" -- LT
476
- -- "60 10 60 11 61 22 22 62 33 33 33 63 44 44 44 44 00" -- PUSH1
477
- -- "60 00 54 60 01 54 01" -- SLOAD, ADD
478
- -- "60 FF 60 01 52"
479
- -- "60 00 54 60 01 54 01" -- MSTORE
480
- -- local bytecode_str = "60 00 54 60 01 54 01"
481
- local bytecode_str = " 600160026003600460059100" -- SWAP3
482
-
483
- -- local bytecode_str = redis.call('GET', contract[1])
484
- local bytecode = hexStringToTable (bytecode_str )
485
- print (bytecode )
486
- local state = EVM .init (0x00 )
487
- EVM .execute (state , code )
488
- return state
489
- end
490
-
491
462
if redis then
492
463
redis .register_function (' eth_call' , eth_call )
493
464
end
0 commit comments