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