Skip to content

Commit 3e3ac2d

Browse files
committed
chore(core/types): code restructure to accomodate future libevm changes
- Sort alphabetically libevm imports in `imports.go` - Move `state_account.go` libevm imports to `imports.go` See original PR ava-labs/coreth#819
1 parent d4559c3 commit 3e3ac2d

File tree

2 files changed

+27
-69
lines changed

2 files changed

+27
-69
lines changed

core/types/imports.go

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,25 @@ import (
1111
// So we list them all here to avoid having many individual files.
1212
type (
1313
AccessList = ethtypes.AccessList
14-
AccessTuple = ethtypes.AccessTuple
1514
AccessListTx = ethtypes.AccessListTx
15+
AccessTuple = ethtypes.AccessTuple
16+
BlobTx = ethtypes.BlobTx
17+
BlobTxSidecar = ethtypes.BlobTxSidecar
1618
Bloom = ethtypes.Bloom
19+
DynamicFeeTx = ethtypes.DynamicFeeTx
20+
FrontierSigner = ethtypes.FrontierSigner
21+
HomesteadSigner = ethtypes.HomesteadSigner
22+
LegacyTx = ethtypes.LegacyTx
1723
Receipt = ethtypes.Receipt
18-
Receipts = ethtypes.Receipts
1924
ReceiptForStorage = ethtypes.ReceiptForStorage
20-
LegacyTx = ethtypes.LegacyTx
21-
DynamicFeeTx = ethtypes.DynamicFeeTx
22-
BlobTx = ethtypes.BlobTx
23-
BlobTxSidecar = ethtypes.BlobTxSidecar
25+
Receipts = ethtypes.Receipts
2426
Signer = ethtypes.Signer
25-
HomesteadSigner = ethtypes.HomesteadSigner
26-
FrontierSigner = ethtypes.FrontierSigner
27-
28-
Transaction = ethtypes.Transaction
29-
Transactions = ethtypes.Transactions
30-
TxByNonce = ethtypes.TxByNonce
31-
TxData = ethtypes.TxData
27+
SlimAccount = ethtypes.SlimAccount
28+
StateAccount = ethtypes.StateAccount
29+
Transaction = ethtypes.Transaction
30+
Transactions = ethtypes.Transactions
31+
TxByNonce = ethtypes.TxByNonce
32+
TxData = ethtypes.TxData
3233
)
3334

3435
// The following constants are used directly as their upstream definitions.
@@ -39,39 +40,41 @@ const (
3940
ReceiptStatusSuccessful = ethtypes.ReceiptStatusSuccessful
4041

4142
// Transaction types.
42-
LegacyTxType = ethtypes.LegacyTxType
4343
AccessListTxType = ethtypes.AccessListTxType
44-
DynamicFeeTxType = ethtypes.DynamicFeeTxType
4544
BlobTxType = ethtypes.BlobTxType
45+
DynamicFeeTxType = ethtypes.DynamicFeeTxType
46+
LegacyTxType = ethtypes.LegacyTxType
4647
)
4748

4849
// The following functions are used directly as their upstream definitions.
4950
var (
5051
BloomLookup = ethtypes.BloomLookup
5152
BytesToBloom = ethtypes.BytesToBloom
5253
CreateBloom = ethtypes.CreateBloom
53-
NewReceipt = ethtypes.NewReceipt
54+
FullAccount = ethtypes.FullAccount
55+
FullAccountRLP = ethtypes.FullAccountRLP
5456
NewContractCreation = ethtypes.NewContractCreation
57+
NewReceipt = ethtypes.NewReceipt
5558
NewTransaction = ethtypes.NewTransaction
59+
SlimAccountRLP = ethtypes.SlimAccountRLP
5660

5761
// Signers
58-
NewEIP155Signer = ethtypes.NewEIP155Signer
59-
NewEIP2930Signer = ethtypes.NewEIP2930Signer
60-
NewLondonSigner = ethtypes.NewLondonSigner
61-
NewCancunSigner = ethtypes.NewCancunSigner
62-
MakeSigner = ethtypes.MakeSigner
6362
LatestSigner = ethtypes.LatestSigner
6463
LatestSignerForChainID = ethtypes.LatestSignerForChainID
65-
SignTx = ethtypes.SignTx
66-
SignNewTx = ethtypes.SignNewTx
64+
MakeSigner = ethtypes.MakeSigner
6765
MustSignNewTx = ethtypes.MustSignNewTx
66+
NewEIP155Signer = ethtypes.NewEIP155Signer
67+
NewEIP2930Signer = ethtypes.NewEIP2930Signer
68+
NewLondonSigner = ethtypes.NewLondonSigner
6869
Sender = ethtypes.Sender
70+
SignNewTx = ethtypes.SignNewTx
71+
SignTx = ethtypes.SignTx
6972

7073
// Transactions
7174
NewTx = ethtypes.NewTx
7275
TxDifference = ethtypes.TxDifference
7376

7477
// Errors
75-
ErrTxTypeNotSupported = ethtypes.ErrTxTypeNotSupported
7678
ErrGasFeeCapTooLow = ethtypes.ErrGasFeeCapTooLow
79+
ErrTxTypeNotSupported = ethtypes.ErrTxTypeNotSupported
7780
)

core/types/state_account.go

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)