Skip to content

Commit

Permalink
add create_tx
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Apr 13, 2023
1 parent 3c051f6 commit 04fd5d8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/unittests/state_transition_create_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ TEST_F(state_transition, create2_factory)
expect.post[create_address].code = bytes{0xFE};
}

TEST_F(state_transition, create_tx)
{
static constexpr auto create_address = 0x8ef300b6a6a0b41e4f5d717074d9fd5c605c7285_address;

const auto initcode = mstore8(0, push(0xFE)) + ret(0, 1);

tx.to = std::nullopt;
tx.data = initcode;

expect.post[create_address].code = bytes{0xFE};
}

TEST_F(state_transition, eof_invalid_initcode)
{
// TODO: Correction of this address is not verified.
Expand Down

0 comments on commit 04fd5d8

Please sign in to comment.