Skip to content
87 changes: 0 additions & 87 deletions core/types/account.go

This file was deleted.

73 changes: 0 additions & 73 deletions core/types/gen_account.go

This file was deleted.

66 changes: 0 additions & 66 deletions core/types/hashes.go

This file was deleted.

7 changes: 7 additions & 0 deletions core/types/hashes_ext.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// (c) 2025, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package types

// EmptyExtDataHash is the known hash of empty extdata bytes.
var EmptyExtDataHash = rlpHash([]byte(nil))
15 changes: 14 additions & 1 deletion core/types/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
)

// The following types are used directly as their upstream definitions.
// So we list them all here to avoid having many individual files.
type (
AccessList = ethtypes.AccessList
AccessListTx = ethtypes.AccessListTx
AccessTuple = ethtypes.AccessTuple
Account = ethtypes.Account
BlobTx = ethtypes.BlobTx
BlobTxSidecar = ethtypes.BlobTxSidecar
Block = ethtypes.Block
Expand All @@ -21,9 +21,11 @@ type (
Bloom = ethtypes.Bloom
Body = ethtypes.Body
DynamicFeeTx = ethtypes.DynamicFeeTx
GenesisAlloc = ethtypes.GenesisAlloc
Header = ethtypes.Header
HomesteadSigner = ethtypes.HomesteadSigner
LegacyTx = ethtypes.LegacyTx
Log = ethtypes.Log
Receipt = ethtypes.Receipt
ReceiptForStorage = ethtypes.ReceiptForStorage
Receipts = ethtypes.Receipts
Expand All @@ -50,6 +52,16 @@ const (
LegacyTxType = ethtypes.LegacyTxType
)

// The following variables are used directly as their upstream definitions.
var (
EmptyRootHash = ethtypes.EmptyRootHash
EmptyUncleHash = ethtypes.EmptyUncleHash
EmptyCodeHash = ethtypes.EmptyCodeHash
EmptyTxsHash = ethtypes.EmptyTxsHash
EmptyReceiptsHash = ethtypes.EmptyReceiptsHash
EmptyVerkleHash = ethtypes.EmptyVerkleHash
)

// The following functions are used directly as their upstream definitions.
var (
BloomLookup = ethtypes.BloomLookup
Expand All @@ -67,6 +79,7 @@ var (
NewReceipt = ethtypes.NewReceipt
NewTransaction = ethtypes.NewTransaction
SlimAccountRLP = ethtypes.SlimAccountRLP
TrieRootHash = ethtypes.TrieRootHash

// Signers
LatestSigner = ethtypes.LatestSigner
Expand Down
42 changes: 0 additions & 42 deletions core/types/log.go

This file was deleted.

12 changes: 12 additions & 0 deletions core/types/log_ext.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// (c) 2019-2025, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package types

// FlattenLogs converts a nested array of logs to a single array of logs.
func FlattenLogs(list [][]*Log) []*Log {
var flat []*Log
for _, logs := range list {
flat = append(flat, logs...)
}
return flat
}
39 changes: 0 additions & 39 deletions core/types/state_account.go

This file was deleted.

16 changes: 16 additions & 0 deletions core/types/state_account_ext.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// (c) 2025, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package types

import (
ethtypes "github.com/ava-labs/libevm/core/types"
)

type isMultiCoin bool

var IsMultiCoinPayloads = extras.StateAccount

func IsMultiCoin(s ethtypes.StateOrSlimAccount) bool {
return bool(IsMultiCoinPayloads.Get(s))
}
Loading