2019-07-12 23:52:25 +00:00
|
|
|
package actors
|
2019-07-05 14:29:17 +00:00
|
|
|
|
|
|
|
import (
|
2019-12-19 20:13:17 +00:00
|
|
|
"github.com/filecoin-project/go-address"
|
2020-02-11 20:48:03 +00:00
|
|
|
"github.com/filecoin-project/specs-actors/actors/builtin"
|
2019-07-05 14:29:17 +00:00
|
|
|
|
|
|
|
"github.com/ipfs/go-cid"
|
|
|
|
)
|
|
|
|
|
2020-02-11 20:48:03 +00:00
|
|
|
var AccountCodeCid = builtin.AccountActorCodeID
|
|
|
|
var CronCodeCid = builtin.CronActorCodeID
|
|
|
|
var StoragePowerCodeCid = builtin.StoragePowerActorCodeID
|
|
|
|
var StorageMarketCodeCid = builtin.StorageMarketActorCodeID
|
|
|
|
var StorageMinerCodeCid = builtin.StorageMinerActorCodeID
|
|
|
|
var MultisigCodeCid = builtin.MultisigActorCodeID
|
|
|
|
var InitCodeCid = builtin.InitActorCodeID
|
|
|
|
var PaymentChannelCodeCid = builtin.PaymentChannelActorCodeID
|
2019-07-05 14:29:17 +00:00
|
|
|
|
2020-01-23 19:03:01 +00:00
|
|
|
var SystemAddress = mustIDAddress(0)
|
|
|
|
var InitAddress = mustIDAddress(1)
|
|
|
|
var RewardActor = mustIDAddress(2)
|
|
|
|
var CronAddress = mustIDAddress(3)
|
|
|
|
var StoragePowerAddress = mustIDAddress(4)
|
|
|
|
var StorageMarketAddress = mustIDAddress(5)
|
|
|
|
|
|
|
|
var NetworkAddress = mustIDAddress(17) // TODO: needs to be removed in favor of reward actor
|
|
|
|
|
2019-09-12 04:12:35 +00:00
|
|
|
var BurntFundsAddress = mustIDAddress(99)
|
2019-07-05 14:29:17 +00:00
|
|
|
|
|
|
|
func mustIDAddress(i uint64) address.Address {
|
|
|
|
a, err := address.NewIDAddress(i)
|
|
|
|
if err != nil {
|
2019-11-16 23:41:14 +00:00
|
|
|
panic(err) // ok
|
2019-07-05 14:29:17 +00:00
|
|
|
}
|
|
|
|
return a
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2020-01-31 23:51:15 +00:00
|
|
|
BuiltInActors = map[cid.Cid]bool{
|
|
|
|
StorageMarketCodeCid: true,
|
|
|
|
StoragePowerCodeCid: true,
|
|
|
|
StorageMinerCodeCid: true,
|
|
|
|
AccountCodeCid: true,
|
|
|
|
InitCodeCid: true,
|
|
|
|
MultisigCodeCid: true,
|
|
|
|
PaymentChannelCodeCid: true,
|
|
|
|
}
|
2019-07-05 14:29:17 +00:00
|
|
|
}
|