github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/x/auth/exported/exported.go (about)

     1  package exported
     2  
     3  import (
     4  	sdk "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types"
     5  )
     6  
     7  // Account is an interface used to store coins at a given address within state.
     8  // It presumes a notion of sequence numbers for replay protection,
     9  // a notion of account numbers for replay protection for previously pruned accounts,
    10  // and a pubkey for authentication purposes.
    11  //
    12  // Many complex conditions can be used in the concrete struct which implements Account.
    13  type Account = sdk.Account
    14  type ModuleAccount = sdk.ModuleAccount
    15  
    16  // GenesisAccounts defines a slice of GenesisAccount objects
    17  type GenesisAccounts []GenesisAccount
    18  
    19  // Contains returns true if the given address exists in a slice of GenesisAccount
    20  // objects.
    21  func (ga GenesisAccounts) Contains(addr sdk.Address) bool {
    22  	for _, acc := range ga {
    23  		if acc.GetAddress().Equals(addr) {
    24  			return true
    25  		}
    26  	}
    27  
    28  	return false
    29  }
    30  
    31  // GenesisAccount defines a genesis account that embeds an Account with validation capabilities.
    32  type GenesisAccount interface {
    33  	Account
    34  	Validate() error
    35  }