Skip to content

Commit

Permalink
core/types: create libevm.go containing extras registration moved fro…
Browse files Browse the repository at this point in the history
…m state_account.go
  • Loading branch information
qdm12 committed Feb 14, 2025
1 parent fe5a6cb commit 514bcdb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
14 changes: 14 additions & 0 deletions core/types/libevm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// (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"
)

var extras = ethtypes.RegisterExtras[
ethtypes.NOOPHeaderHooks, *ethtypes.NOOPHeaderHooks,
ethtypes.NOOPBlockBodyHooks, *ethtypes.NOOPBlockBodyHooks,
isMultiCoin,
]()
9 changes: 1 addition & 8 deletions core/types/state_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,7 @@ import (

type isMultiCoin bool

var (
extras = ethtypes.RegisterExtras[
ethtypes.NOOPHeaderHooks, *ethtypes.NOOPHeaderHooks,
ethtypes.NOOPBlockBodyHooks, *ethtypes.NOOPBlockBodyHooks,
isMultiCoin,
]()
IsMultiCoinPayloads = extras.StateAccount
)
var IsMultiCoinPayloads = extras.StateAccount

func IsMultiCoin(s ethtypes.StateOrSlimAccount) bool {
return bool(extras.StateAccount.Get(s))
Expand Down

0 comments on commit 514bcdb

Please sign in to comment.