github.com/filecoin-project/specs-actors/v4@v4.0.2/actors/builtin/cron/cron_state.go (about) 1 package cron 2 3 import ( 4 addr "github.com/filecoin-project/go-address" 5 "github.com/filecoin-project/go-state-types/abi" 6 7 "github.com/filecoin-project/specs-actors/v4/actors/builtin" 8 ) 9 10 type State struct { 11 Entries []Entry 12 } 13 14 type Entry struct { 15 Receiver addr.Address // The actor to call (must be an ID-address) 16 MethodNum abi.MethodNum // The method number to call (must accept empty parameters) 17 } 18 19 func ConstructState(entries []Entry) *State { 20 return &State{Entries: entries} 21 } 22 23 // The default entries to install in the cron actor's state at genesis. 24 func BuiltInEntries() []Entry { 25 return []Entry{ 26 { 27 Receiver: builtin.StoragePowerActorAddr, 28 MethodNum: builtin.MethodsPower.OnEpochTickEnd, 29 }, 30 { 31 Receiver: builtin.StorageMarketActorAddr, 32 MethodNum: builtin.MethodsMarket.CronTick, 33 }, 34 } 35 }