Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arajasek committed Sep 9, 2022
1 parent 89821b1 commit 2f7b004
Show file tree
Hide file tree
Showing 13 changed files with 238 additions and 116 deletions.
7 changes: 4 additions & 3 deletions api/cbor_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

140 changes: 140 additions & 0 deletions chain/actors/builtin/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,27 @@ import (

actorstypes "github.com/filecoin-project/go-state-types/actors"
account8 "github.com/filecoin-project/go-state-types/builtin/v8/account"
cron8 "github.com/filecoin-project/go-state-types/builtin/v8/cron"
_init8 "github.com/filecoin-project/go-state-types/builtin/v8/init"
market8 "github.com/filecoin-project/go-state-types/builtin/v8/market"
miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner"
multisig8 "github.com/filecoin-project/go-state-types/builtin/v8/multisig"
paych8 "github.com/filecoin-project/go-state-types/builtin/v8/paych"
power8 "github.com/filecoin-project/go-state-types/builtin/v8/power"
reward8 "github.com/filecoin-project/go-state-types/builtin/v8/reward"
system8 "github.com/filecoin-project/go-state-types/builtin/v8/system"
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"
_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"
multisig9 "github.com/filecoin-project/go-state-types/builtin/v9/multisig"
paych9 "github.com/filecoin-project/go-state-types/builtin/v9/paych"
power9 "github.com/filecoin-project/go-state-types/builtin/v9/power"
reward9 "github.com/filecoin-project/go-state-types/builtin/v9/reward"
system9 "github.com/filecoin-project/go-state-types/builtin/v9/system"
verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/cbor"
rtt "github.com/filecoin-project/go-state-types/rt"

Expand Down Expand Up @@ -54,6 +74,66 @@ func MakeRegistry(av actorstypes.Version) []rtt.VMActor {
methods: account8.Methods,
state: new(account8.State),
})
case actors.CronKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: cron8.Methods,
state: new(cron8.State),
})
case actors.InitKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: _init8.Methods,
state: new(_init8.State),
})
case actors.MarketKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: market8.Methods,
state: new(market8.State),
})
case actors.MinerKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: miner8.Methods,
state: new(miner8.State),
})
case actors.MultisigKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: multisig8.Methods,
state: new(multisig8.State),
})
case actors.PaychKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: paych8.Methods,
state: new(paych8.State),
})
case actors.PowerKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: power8.Methods,
state: new(power8.State),
})
case actors.RewardKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: reward8.Methods,
state: new(reward8.State),
})
case actors.SystemKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: system8.Methods,
state: new(system8.State),
})
case actors.VerifregKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: verifreg8.Methods,
state: new(verifreg8.State),
})
}
}

Expand All @@ -66,6 +146,66 @@ func MakeRegistry(av actorstypes.Version) []rtt.VMActor {
methods: account9.Methods,
state: new(account9.State),
})
case actors.CronKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: cron9.Methods,
state: new(cron9.State),
})
case actors.InitKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: _init9.Methods,
state: new(_init9.State),
})
case actors.MarketKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: market9.Methods,
state: new(market9.State),
})
case actors.MinerKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: miner9.Methods,
state: new(miner9.State),
})
case actors.MultisigKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: multisig9.Methods,
state: new(multisig9.State),
})
case actors.PaychKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: paych9.Methods,
state: new(paych9.State),
})
case actors.PowerKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: power9.Methods,
state: new(power9.State),
})
case actors.RewardKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: reward9.Methods,
state: new(reward9.State),
})
case actors.SystemKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: system9.Methods,
state: new(system9.State),
})
case actors.VerifregKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: verifreg9.Methods,
state: new(verifreg9.State),
})
}
}

Expand Down
70 changes: 70 additions & 0 deletions chain/actors/builtin/registry.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ import (
{{range .versions}}
{{if (ge . 8)}}
account{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/account"
cron{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/cron"
_init{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/init"
multisig{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/multisig"
miner{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/miner"
market{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/market"
reward{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/reward"
paych{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/paych"
power{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/power"
system{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/system"
verifreg{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/verifreg"
{{end}}
{{end}}
"github.com/filecoin-project/go-state-types/cbor"
Expand Down Expand Up @@ -56,6 +66,66 @@ func MakeRegistry(av actorstypes.Version) []rtt.VMActor {
methods: account{{.}}.Methods,
state: new(account{{.}}.State),
})
case actors.CronKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: cron{{.}}.Methods,
state: new(cron{{.}}.State),
})
case actors.InitKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: _init{{.}}.Methods,
state: new(_init{{.}}.State),
})
case actors.MarketKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: market{{.}}.Methods,
state: new(market{{.}}.State),
})
case actors.MinerKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: miner{{.}}.Methods,
state: new(miner{{.}}.State),
})
case actors.MultisigKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: multisig{{.}}.Methods,
state: new(multisig{{.}}.State),
})
case actors.PaychKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: paych{{.}}.Methods,
state: new(paych{{.}}.State),
})
case actors.PowerKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: power{{.}}.Methods,
state: new(power{{.}}.State),
})
case actors.RewardKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: reward{{.}}.Methods,
state: new(reward{{.}}.State),
})
case actors.SystemKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: system{{.}}.Methods,
state: new(system{{.}}.State),
})
case actors.VerifregKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: verifreg{{.}}.Methods,
state: new(verifreg{{.}}.State),
})
}
}
{{end}}
Expand Down
3 changes: 2 additions & 1 deletion chain/exchange/cbor_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2f7b004

Please sign in to comment.