From 818c87f5ddc4278501725d1917784450970986f3 Mon Sep 17 00:00:00 2001 From: Mario Vega Date: Thu, 10 Oct 2024 20:11:56 +0000 Subject: [PATCH] fix(tools): Allow `Bytes` in `Initcode` --- src/ethereum_test_tools/code/generators.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ethereum_test_tools/code/generators.py b/src/ethereum_test_tools/code/generators.py index df23d375ec..19431e3557 100644 --- a/src/ethereum_test_tools/code/generators.py +++ b/src/ethereum_test_tools/code/generators.py @@ -5,6 +5,7 @@ from dataclasses import dataclass from typing import List, SupportsBytes +from ethereum_test_base_types import Bytes from ethereum_test_types import ceiling_division from ethereum_test_vm import Bytecode, EVMCodeType from ethereum_test_vm import Opcodes as Op @@ -27,7 +28,7 @@ class Initcode(Bytecode): costs. """ - deploy_code: SupportsBytes + deploy_code: SupportsBytes | Bytes """ Bytecode to be deployed by the initcode. """ @@ -44,7 +45,7 @@ class Initcode(Bytecode): def __new__( cls, *, - deploy_code: SupportsBytes = Bytecode(), + deploy_code: SupportsBytes | Bytes = Bytecode(), initcode_length: int | None = None, initcode_prefix: Bytecode = Bytecode(), initcode_prefix_execution_gas: int = 0,