github.com/MetalBlockchain/metalgo@v1.11.9/vms/avm/genesis.go (about) 1 // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. 2 // See the file LICENSE for licensing terms. 3 4 package avm 5 6 import ( 7 "cmp" 8 9 "github.com/MetalBlockchain/metalgo/utils" 10 "github.com/MetalBlockchain/metalgo/vms/avm/txs" 11 ) 12 13 var _ utils.Sortable[*GenesisAsset] = (*GenesisAsset)(nil) 14 15 type Genesis struct { 16 Txs []*GenesisAsset `serialize:"true"` 17 } 18 19 type GenesisAsset struct { 20 Alias string `serialize:"true"` 21 txs.CreateAssetTx `serialize:"true"` 22 } 23 24 func (g *GenesisAsset) Compare(other *GenesisAsset) int { 25 return cmp.Compare(g.Alias, other.Alias) 26 }