lotus/genesis/types.go

58 lines
911 B
Go
Raw Normal View History

2019-11-25 04:45:13 +00:00
package genesis
2019-11-28 22:50:58 +00:00
import (
2020-02-12 00:58:55 +00:00
"encoding/json"
"github.com/filecoin-project/go-address"
2020-02-08 02:18:32 +00:00
"github.com/filecoin-project/specs-actors/actors/abi"
2020-02-11 20:48:03 +00:00
"github.com/filecoin-project/specs-actors/actors/builtin/market"
2020-02-12 00:58:55 +00:00
)
2020-02-08 02:18:32 +00:00
2020-02-12 00:58:55 +00:00
type ActorType string
const (
TAccount ActorType = "account"
TMultisig ActorType = "multisig"
2019-11-28 22:50:58 +00:00
)
2019-11-25 04:45:13 +00:00
type PreSeal struct {
CommR [32]byte
CommD [32]byte
2020-02-08 02:18:32 +00:00
SectorID abi.SectorNumber
2020-02-11 20:48:03 +00:00
Deal market.DealProposal
2019-11-25 04:45:13 +00:00
}
2020-02-12 00:58:55 +00:00
type Miner struct {
2019-11-28 22:50:58 +00:00
Owner address.Address
Worker address.Address
2020-02-11 20:48:03 +00:00
MarketBalance abi.TokenAmount
PowerBalance abi.TokenAmount
2020-02-08 02:18:32 +00:00
SectorSize abi.SectorSize
2019-11-28 22:50:58 +00:00
Sectors []*PreSeal
2020-02-12 00:58:55 +00:00
}
type AccountMeta struct {
Owner address.Address // bls / secpk
}
type MultisigMeta struct {
// TODO
}
type Actor struct {
Type ActorType
Balance abi.TokenAmount
Meta json.RawMessage
}
type Template struct {
Accounts []Actor
Miners []Miner
2019-11-28 22:50:58 +00:00
2020-02-12 00:58:55 +00:00
NetworkName string
Timestamp uint64
2019-11-25 04:45:13 +00:00
}