Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 2 additions & 17 deletions tests/ported_static/stArgsZeroOneBalance/test_addmod_non_const.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
Transaction,
)
from execution_testing.forks import Fork
from execution_testing.specs.static_state.expect_section import (
resolve_expect_post,
)
from execution_testing.vm import Op

REFERENCE_SPEC_GIT_PATH = "N/A"
Expand Down Expand Up @@ -84,20 +81,8 @@ def test_addmod_non_const(
address=Address(0x92D2FC80312ACD8C37857696D2224AF18CE6F966), # noqa: E501
)

expect_entries_: list[dict] = [
{
"indexes": {"data": -1, "gas": -1, "value": 0},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
{
"indexes": {"data": -1, "gas": -1, "value": 1},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
]

post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork)
post = {target: Account(storage={0: 0})}
_exc = None

tx_data = [
Bytes(""),
Expand Down
21 changes: 5 additions & 16 deletions tests/ported_static/stArgsZeroOneBalance/test_and_non_const.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
Transaction,
)
from execution_testing.forks import Fork
from execution_testing.specs.static_state.expect_section import (
resolve_expect_post,
)
from execution_testing.vm import Op

REFERENCE_SPEC_GIT_PATH = "N/A"
Expand Down Expand Up @@ -83,20 +80,12 @@ def test_and_non_const(
address=Address(0x4C26357E0D164B702BCEB18690FC742EE1D36913), # noqa: E501
)

expect_entries_: list[dict] = [
{
"indexes": {"data": -1, "gas": -1, "value": 0},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
{
"indexes": {"data": -1, "gas": -1, "value": 1},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 1})},
},
expect_posts: list[dict] = [
{target: Account(storage={0: 0})},
{target: Account(storage={0: 1})},
]

post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork)
post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]]
_exc = None

tx_data = [
Bytes(""),
Expand Down
19 changes: 2 additions & 17 deletions tests/ported_static/stArgsZeroOneBalance/test_balance_non_const.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
Transaction,
)
from execution_testing.forks import Fork
from execution_testing.specs.static_state.expect_section import (
resolve_expect_post,
)
from execution_testing.vm import Op

REFERENCE_SPEC_GIT_PATH = "N/A"
Expand Down Expand Up @@ -84,20 +81,8 @@ def test_balance_non_const(
address=Address(0xEE6A324B2ECE5EACDF881ABFDCC62B5361D0FB50), # noqa: E501
)

expect_entries_: list[dict] = [
{
"indexes": {"data": -1, "gas": -1, "value": 0},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
{
"indexes": {"data": -1, "gas": -1, "value": 1},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
]

post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork)
post = {target: Account(storage={0: 0})}
_exc = None

tx_data = [
Bytes(""),
Expand Down
19 changes: 2 additions & 17 deletions tests/ported_static/stArgsZeroOneBalance/test_byte_non_const.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
Transaction,
)
from execution_testing.forks import Fork
from execution_testing.specs.static_state.expect_section import (
resolve_expect_post,
)
from execution_testing.vm import Op

REFERENCE_SPEC_GIT_PATH = "N/A"
Expand Down Expand Up @@ -83,20 +80,8 @@ def test_byte_non_const(
address=Address(0x86D606901085BA78C64D2E0B16831E6AFD89DE2D), # noqa: E501
)

expect_entries_: list[dict] = [
{
"indexes": {"data": -1, "gas": -1, "value": 0},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
{
"indexes": {"data": -1, "gas": -1, "value": 1},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
]

post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork)
post = {target: Account(storage={0: 0})}
_exc = None

tx_data = [
Bytes(""),
Expand Down
21 changes: 5 additions & 16 deletions tests/ported_static/stArgsZeroOneBalance/test_call_non_const.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
Transaction,
)
from execution_testing.forks import Fork
from execution_testing.specs.static_state.expect_section import (
resolve_expect_post,
)
from execution_testing.vm import Op

REFERENCE_SPEC_GIT_PATH = "N/A"
Expand Down Expand Up @@ -102,20 +99,12 @@ def test_call_non_const(
address=Address(0x7D7E1645AF7DF916DA558F0695E9DEDD23B1215E), # noqa: E501
)

expect_entries_: list[dict] = [
{
"indexes": {"data": -1, "gas": -1, "value": 0},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 1})},
},
{
"indexes": {"data": -1, "gas": -1, "value": 1},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
expect_posts: list[dict] = [
{target: Account(storage={0: 1})},
{target: Account(storage={0: 0})},
]

post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork)
post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]]
_exc = None

tx_data = [
Bytes(""),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
Transaction,
)
from execution_testing.forks import Fork
from execution_testing.specs.static_state.expect_section import (
resolve_expect_post,
)
from execution_testing.vm import Op

REFERENCE_SPEC_GIT_PATH = "N/A"
Expand Down Expand Up @@ -102,20 +99,12 @@ def test_callcode_non_const(
address=Address(0x443A994E18105C3EA686D3931729A1AC3D8FDD93), # noqa: E501
)

expect_entries_: list[dict] = [
{
"indexes": {"data": -1, "gas": -1, "value": 0},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 1})},
},
{
"indexes": {"data": -1, "gas": -1, "value": 1},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
expect_posts: list[dict] = [
{target: Account(storage={0: 1})},
{target: Account(storage={0: 0})},
]

post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork)
post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]]
_exc = None

tx_data = [
Bytes(""),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
Transaction,
)
from execution_testing.forks import Fork
from execution_testing.specs.static_state.expect_section import (
resolve_expect_post,
)
from execution_testing.vm import Op

REFERENCE_SPEC_GIT_PATH = "N/A"
Expand Down Expand Up @@ -99,20 +96,8 @@ def test_calldatacopy_non_const(
address=Address(0x444C2681920E1105C9104FB32249DDBB41CBA4A0), # noqa: E501
)

expect_entries_: list[dict] = [
{
"indexes": {"data": -1, "gas": -1, "value": 0},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
{
"indexes": {"data": -1, "gas": -1, "value": 1},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
]

post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork)
post = {target: Account(storage={0: 0})}
_exc = None

tx_data = [
Bytes(""),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
Transaction,
)
from execution_testing.forks import Fork
from execution_testing.specs.static_state.expect_section import (
resolve_expect_post,
)
from execution_testing.vm import Op

REFERENCE_SPEC_GIT_PATH = "N/A"
Expand Down Expand Up @@ -100,42 +97,27 @@ def test_calldataload_non_const(
address=Address(0x148F97630D3668441F1A33A5E509F268B64F998F), # noqa: E501
)

expect_entries_: list[dict] = [
{
"indexes": {"data": 1, "gas": -1, "value": 0},
"network": [">=Cancun"],
"result": {
target: Account(
storage={
0: 0x1122334400000000000000000000000000000000000000000000000000000000, # noqa: E501
},
),
},
},
{
"indexes": {"data": 0, "gas": -1, "value": 0},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
expect_posts: list[dict] = [
{
"indexes": {"data": 1, "gas": -1, "value": 1},
"network": [">=Cancun"],
"result": {
target: Account(
storage={
0: 0x2233440000000000000000000000000000000000000000000000000000000000, # noqa: E501
},
),
},
target: Account(
storage={
0: 0x1122334400000000000000000000000000000000000000000000000000000000, # noqa: E501
},
),
},
{target: Account(storage={0: 0})},
{
"indexes": {"data": 0, "gas": -1, "value": 1},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
target: Account(
storage={
0: 0x2233440000000000000000000000000000000000000000000000000000000000, # noqa: E501
},
),
},
]

post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork)
post = expect_posts[
{(0, 0, 0): 1, (0, 0, 1): 1, (1, 0, 0): 0, (1, 0, 1): 2}[d, g, v]
]
_exc = None

tx_data = [
Bytes(""),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
Transaction,
)
from execution_testing.forks import Fork
from execution_testing.specs.static_state.expect_section import (
resolve_expect_post,
)
from execution_testing.vm import Op

REFERENCE_SPEC_GIT_PATH = "N/A"
Expand Down Expand Up @@ -87,20 +84,8 @@ def test_codecopy_non_const(
address=Address(0xEDD4D7CDACB700CA3E28F8DDBCFB6AAC31F64925), # noqa: E501
)

expect_entries_: list[dict] = [
{
"indexes": {"data": -1, "gas": -1, "value": 0},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
{
"indexes": {"data": -1, "gas": -1, "value": 1},
"network": [">=Cancun"],
"result": {target: Account(storage={0: 0})},
},
]

post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork)
post = {target: Account(storage={0: 0})}
_exc = None

tx_data = [
Bytes(""),
Expand Down
35 changes: 7 additions & 28 deletions tests/ported_static/stArgsZeroOneBalance/test_create_non_const.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
compute_create_address,
)
from execution_testing.forks import Fork
from execution_testing.specs.static_state.expect_section import (
resolve_expect_post,
)
from execution_testing.vm import Op

REFERENCE_SPEC_GIT_PATH = "N/A"
Expand Down Expand Up @@ -92,32 +89,14 @@ def test_create_non_const(
address=Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87), # noqa: E501
)

expect_entries_: list[dict] = [
{
"indexes": {"data": -1, "gas": -1, "value": 0},
"network": [">=Cancun"],
"result": {
contract_0: Account(
storage={
0: compute_create_address(address=contract_0, nonce=0),
},
),
},
},
{
"indexes": {"data": -1, "gas": -1, "value": 1},
"network": [">=Cancun"],
"result": {
contract_0: Account(
storage={
0: compute_create_address(address=contract_0, nonce=0),
},
),
post = {
contract_0: Account(
storage={
0: compute_create_address(address=contract_0, nonce=0),
},
},
]

post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork)
),
}
_exc = None

tx_data = [
Bytes(""),
Expand Down
Loading
Loading