mirror of https://github.com/status-im/evmc.git
EXTCODEHASH support in instructions lib
This commit is contained in:
parent
2e25d34c11
commit
14b585922b
|
@ -70,6 +70,7 @@ enum evmc_opcode
|
|||
OP_EXTCODECOPY = 0x3c,
|
||||
OP_RETURNDATASIZE = 0x3d,
|
||||
OP_RETURNDATACOPY = 0x3e,
|
||||
OP_EXTCODEHASH = 0x3f,
|
||||
|
||||
OP_BLOCKHASH = 0x40,
|
||||
OP_COINBASE = 0x41,
|
||||
|
|
|
@ -69,7 +69,7 @@ static const char* constantinople_names[256] = {
|
|||
/* 0x3c */ "EXTCODECOPY",
|
||||
/* 0x3d */ "RETURNDATASIZE",
|
||||
/* 0x3e */ "RETURNDATACOPY",
|
||||
/* 0x3f */ NULL,
|
||||
/* 0x3f */ "EXTCODEHASH",
|
||||
/* 0x40 */ "BLOCKHASH",
|
||||
/* 0x41 */ "COINBASE",
|
||||
/* 0x42 */ "TIMESTAMP",
|
||||
|
|
|
@ -101,6 +101,13 @@ TEST(instructions, constantinople_hard_fork)
|
|||
EXPECT_EQ(b[OP_CREATE2].gas_cost, -1);
|
||||
EXPECT_EQ(cn[OP_CREATE2], std::string{"CREATE2"});
|
||||
EXPECT_EQ(bn[OP_CREATE2], nullptr);
|
||||
|
||||
EXPECT_EQ(c[OP_EXTCODEHASH].gas_cost, 400);
|
||||
EXPECT_EQ(c[OP_EXTCODEHASH].num_stack_arguments, 1);
|
||||
EXPECT_EQ(c[OP_EXTCODEHASH].num_stack_returned_items, 1);
|
||||
EXPECT_EQ(b[OP_EXTCODEHASH].gas_cost, -1);
|
||||
EXPECT_EQ(cn[OP_EXTCODEHASH], std::string{"EXTCODEHASH"});
|
||||
EXPECT_EQ(bn[OP_EXTCODEHASH], nullptr);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue