17
17
CamelModel ,
18
18
EthereumTestRootModel ,
19
19
HexNumber ,
20
- Number ,
21
20
RLPSerializable ,
22
21
StorageKey ,
23
22
)
@@ -41,16 +40,22 @@ def composed(bal: BlockAccessList) -> BlockAccessList:
41
40
class BalNonceChange (CamelModel , RLPSerializable ):
42
41
"""Represents a nonce change in the block access list."""
43
42
44
- tx_index : Number = Field (..., description = "Transaction index where the change occurred" )
45
- post_nonce : Number = Field (..., description = "Nonce value after the transaction" )
43
+ tx_index : HexNumber = Field (
44
+ HexNumber (1 ),
45
+ description = "Transaction index where the change occurred" ,
46
+ )
47
+ post_nonce : HexNumber = Field (..., description = "Nonce value after the transaction" )
46
48
47
49
rlp_fields : ClassVar [List [str ]] = ["tx_index" , "post_nonce" ]
48
50
49
51
50
52
class BalBalanceChange (CamelModel , RLPSerializable ):
51
53
"""Represents a balance change in the block access list."""
52
54
53
- tx_index : Number = Field (..., description = "Transaction index where the change occurred" )
55
+ tx_index : HexNumber = Field (
56
+ HexNumber (1 ),
57
+ description = "Transaction index where the change occurred" ,
58
+ )
54
59
post_balance : HexNumber = Field (..., description = "Balance after the transaction" )
55
60
56
61
rlp_fields : ClassVar [List [str ]] = ["tx_index" , "post_balance" ]
@@ -59,7 +64,10 @@ class BalBalanceChange(CamelModel, RLPSerializable):
59
64
class BalCodeChange (CamelModel , RLPSerializable ):
60
65
"""Represents a code change in the block access list."""
61
66
62
- tx_index : Number = Field (..., description = "Transaction index where the change occurred" )
67
+ tx_index : HexNumber = Field (
68
+ HexNumber (1 ),
69
+ description = "Transaction index where the change occurred" ,
70
+ )
63
71
new_code : Bytes = Field (..., description = "New code bytes" )
64
72
65
73
rlp_fields : ClassVar [List [str ]] = ["tx_index" , "new_code" ]
@@ -68,7 +76,10 @@ class BalCodeChange(CamelModel, RLPSerializable):
68
76
class BalStorageChange (CamelModel , RLPSerializable ):
69
77
"""Represents a change to a specific storage slot."""
70
78
71
- tx_index : Number = Field (..., description = "Transaction index where the change occurred" )
79
+ tx_index : HexNumber = Field (
80
+ HexNumber (1 ),
81
+ description = "Transaction index where the change occurred" ,
82
+ )
72
83
post_value : StorageKey = Field (..., description = "Value after the transaction" )
73
84
74
85
rlp_fields : ClassVar [List [str ]] = ["tx_index" , "post_value" ]
0 commit comments