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 10, 2025
1 parent 40e6aad commit 85fea0f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 10 additions & 0 deletions core/types/libevm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// (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, isMultiCoin]()
5 changes: 1 addition & 4 deletions core/types/state_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ import (

type isMultiCoin bool

var (
extras = ethtypes.RegisterExtras[ethtypes.NOOPHeaderHooks, *ethtypes.NOOPHeaderHooks, 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 85fea0f

Please sign in to comment.