Add datacap actor to registry.go

This commit is contained in:
Geoff Stuart 2022-10-12 11:44:59 -04:00
parent 80eae53c59
commit 6daf3c097f
4 changed files with 20 additions and 3 deletions

View File

@ -17,6 +17,7 @@ import (
verifreg8 "github.com/filecoin-project/go-state-types/builtin/v8/verifreg"
account9 "github.com/filecoin-project/go-state-types/builtin/v9/account"
cron9 "github.com/filecoin-project/go-state-types/builtin/v9/cron"
datacap9 "github.com/filecoin-project/go-state-types/builtin/v9/datacap"
_init9 "github.com/filecoin-project/go-state-types/builtin/v9/init"
market9 "github.com/filecoin-project/go-state-types/builtin/v9/market"
miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner"
@ -150,6 +151,7 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry {
methods: verifreg8.Methods,
state: new(verifreg8.State),
})
}
}
@ -222,6 +224,12 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry {
methods: verifreg9.Methods,
state: new(verifreg9.State),
})
case actors.DatacapKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: datacap9.Methods,
state: new(datacap9.State),
})
}
}

View File

@ -17,6 +17,9 @@ import (
system{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/system"
verifreg{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/verifreg"
{{end}}
{{if (ge . 9)}}
datacap{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/datacap"
{{end}}
{{end}}
"github.com/filecoin-project/go-state-types/cbor"
rtt "github.com/filecoin-project/go-state-types/rt"
@ -142,6 +145,12 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry {
methods: verifreg{{.}}.Methods,
state: new(verifreg{{.}}.State),
})
{{if (ge . 9)}}case actors.DatacapKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: datacap{{.}}.Methods,
state: new(datacap{{.}}.State),
}){{end}}
}
}
{{end}}

2
go.mod
View File

@ -42,7 +42,7 @@ require (
github.com/filecoin-project/go-legs v0.4.4
github.com/filecoin-project/go-padreader v0.0.1
github.com/filecoin-project/go-paramfetch v0.0.4
github.com/filecoin-project/go-state-types v0.9.0-rc2
github.com/filecoin-project/go-state-types v0.9.0-rc2.0.20221012181308-18973e7a46fc
github.com/filecoin-project/go-statemachine v1.0.2
github.com/filecoin-project/go-statestore v0.2.0
github.com/filecoin-project/go-storedcounter v0.1.0

4
go.sum
View File

@ -343,8 +343,8 @@ github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psS
github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
github.com/filecoin-project/go-state-types v0.9.0-rc2 h1:HtSxHUEwAtpnhV/77/ugnUt9lwvTTcQ7PRV+5iTAcUw=
github.com/filecoin-project/go-state-types v0.9.0-rc2/go.mod h1:+HCZifUV+e8TlQkgll22Ucuiq8OrVJkK+4Kh4u75iiw=
github.com/filecoin-project/go-state-types v0.9.0-rc2.0.20221012181308-18973e7a46fc h1:IpOrqNeYQMqBgLIHi1JUKILXkOIfg+hKJoO5P0HfP4c=
github.com/filecoin-project/go-state-types v0.9.0-rc2.0.20221012181308-18973e7a46fc/go.mod h1:+HCZifUV+e8TlQkgll22Ucuiq8OrVJkK+4Kh4u75iiw=
github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig=
github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc=
github.com/filecoin-project/go-statemachine v1.0.2/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54=