forked from forbole/callisto
-
Notifications
You must be signed in to change notification settings - Fork 1
/
history.go
35 lines (31 loc) · 945 Bytes
/
history.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 types
import (
"time"
sdk "github.com/cosmos/cosmos-sdk/types"
)
// AccountBalanceHistory contains the information of a given balance at a specific height
type AccountBalanceHistory struct {
Account string
Balance []sdk.Coin
Delegations []sdk.Coin
Redelegations []sdk.Coin
Unbonding []sdk.Coin
Commission []sdk.DecCoin
Reward []sdk.DecCoin
Timestamp time.Time
}
// NewAccountBalanceHistory allows to build a new AccountBalanceHistory instance
func NewAccountBalanceHistory(
account string, balance, delegations, redelegations, unbonding []sdk.Coin, commission, reward []sdk.DecCoin, timestamp time.Time,
) AccountBalanceHistory {
return AccountBalanceHistory{
Account: account,
Balance: balance,
Delegations: delegations,
Redelegations: redelegations,
Unbonding: unbonding,
Commission: commission,
Reward: reward,
Timestamp: timestamp,
}
}