Skip to content

Commit 3d80d48

Browse files
authored
Update evm.lua
1 parent d13183c commit 3d80d48

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

evm.lua

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,6 @@ local function memoryPage(table_in)
447447
print(i, table_in[table_in_size - i + 1], "goes to", page[32 - i + 1])
448448
page[32 - i + 1] = table_in[table_in_size - i + 1]
449449
end
450-
451450
return page
452451
end
453452

@@ -460,34 +459,6 @@ local function eth_call(contract)
460459
-- return {state.stack, state.memory, state.storage, state.pc}
461460
end
462461

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-
491462
if redis then
492463
redis.register_function('eth_call', eth_call)
493464
end

0 commit comments

Comments
 (0)