github.com/ava-labs/avalanchego@v1.11.11/vms/example/xsvm/tx/transfer.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package tx
     5  
     6  import "github.com/ava-labs/avalanchego/ids"
     7  
     8  var _ Unsigned = (*Transfer)(nil)
     9  
    10  type Transfer struct {
    11  	// ChainID provides cross chain replay protection
    12  	ChainID ids.ID `serialize:"true" json:"chainID"`
    13  	// Nonce provides internal chain replay protection
    14  	Nonce   uint64      `serialize:"true" json:"nonce"`
    15  	MaxFee  uint64      `serialize:"true" json:"maxFee"`
    16  	AssetID ids.ID      `serialize:"true" json:"assetID"`
    17  	Amount  uint64      `serialize:"true" json:"amount"`
    18  	To      ids.ShortID `serialize:"true" json:"to"`
    19  }
    20  
    21  func (t *Transfer) Visit(v Visitor) error {
    22  	return v.Transfer(t)
    23  }