Skip to content

Commit

Permalink
Make methods list a map (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
geoff-vball authored Sep 20, 2022
1 parent 01911bc commit d683559
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion builtin/v8/account/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *address.Address) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *abi.EmptyValue) *address.Address), // PubkeyAddress
}
2 changes: 1 addition & 1 deletion builtin/v8/cron/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *ConstructorParams) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *abi.EmptyValue) *abi.EmptyValue), // EpochTick
}
2 changes: 1 addition & 1 deletion builtin/v8/init/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *ConstructorParams) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *ExecParams) *ExecReturn), // Exec
}
2 changes: 1 addition & 1 deletion builtin/v8/market/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *abi.EmptyValue) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *address.Address) *abi.EmptyValue), // AddBalance
3: *new(func(interface{}, *WithdrawBalanceParams) *abi.TokenAmount), // WithdrawBalance
Expand Down
2 changes: 1 addition & 1 deletion builtin/v8/miner/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/filecoin-project/go-state-types/builtin/v8/power"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *power.MinerConstructorParams) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *abi.EmptyValue) *GetControlAddressesReturn), // ControlAddresses
3: *new(func(interface{}, *ChangeWorkerAddressParams) *abi.EmptyValue), // ChangeWorkerAddress
Expand Down
2 changes: 1 addition & 1 deletion builtin/v8/multisig/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *ConstructorParams) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *ProposeParams) *ProposeReturn), // Propose
3: *new(func(interface{}, *TxnIDParams) *ApproveReturn), // Approve
Expand Down
2 changes: 1 addition & 1 deletion builtin/v8/paych/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *ConstructorParams) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *UpdateChannelStateParams) *abi.EmptyValue), // UpdateChannelState
3: *new(func(interface{}, *abi.EmptyValue) *abi.EmptyValue), // Settle
Expand Down
2 changes: 1 addition & 1 deletion builtin/v8/power/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/filecoin-project/go-state-types/proof"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *abi.EmptyValue) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *CreateMinerParams) *CreateMinerReturn), // CreateMiner
3: *new(func(interface{}, *UpdateClaimedPowerParams) *abi.EmptyValue), // UpdateClaimedPower
Expand Down
2 changes: 1 addition & 1 deletion builtin/v8/reward/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *abi.StoragePower) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *AwardBlockRewardParams) *abi.EmptyValue), // AwardBlockReward
3: *new(func(interface{}, *abi.EmptyValue) *ThisEpochRewardReturn), // ThisEpochReward
Expand Down
2 changes: 1 addition & 1 deletion builtin/v8/system/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *abi.EmptyValue) *abi.EmptyValue), // Constructor
}
2 changes: 1 addition & 1 deletion builtin/v8/verifreg/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *address.Address) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *AddVerifierParams) *abi.EmptyValue), // AddVerifier
3: *new(func(interface{}, *address.Address) *abi.EmptyValue), // RemoveVerifier
Expand Down
2 changes: 1 addition & 1 deletion builtin/v9/account/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *address.Address) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *abi.EmptyValue) *address.Address), // PubkeyAddress
3: *new(func(interface{}, *AuthenticateMessageParams) *abi.EmptyValue), // AuthenticateMessage
Expand Down
2 changes: 1 addition & 1 deletion builtin/v9/cron/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *ConstructorParams) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *abi.EmptyValue) *abi.EmptyValue), // EpochTick
}
2 changes: 1 addition & 1 deletion builtin/v9/init/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *ConstructorParams) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *ExecParams) *ExecReturn), // Exec
}
2 changes: 1 addition & 1 deletion builtin/v9/market/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *abi.EmptyValue) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *address.Address) *abi.EmptyValue), // AddBalance
3: *new(func(interface{}, *WithdrawBalanceParams) *abi.TokenAmount), // WithdrawBalance
Expand Down
2 changes: 1 addition & 1 deletion builtin/v9/miner/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/filecoin-project/go-state-types/builtin/v9/power"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *power.MinerConstructorParams) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *abi.EmptyValue) *GetControlAddressesReturn), // ControlAddresses
3: *new(func(interface{}, *ChangeWorkerAddressParams) *abi.EmptyValue), // ChangeWorkerAddress
Expand Down
2 changes: 1 addition & 1 deletion builtin/v9/multisig/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *ConstructorParams) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *ProposeParams) *ProposeReturn), // Propose
3: *new(func(interface{}, *TxnIDParams) *ApproveReturn), // Approve
Expand Down
2 changes: 1 addition & 1 deletion builtin/v9/paych/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *ConstructorParams) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *UpdateChannelStateParams) *abi.EmptyValue), // UpdateChannelState
3: *new(func(interface{}, *abi.EmptyValue) *abi.EmptyValue), // Settle
Expand Down
2 changes: 1 addition & 1 deletion builtin/v9/power/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/filecoin-project/go-state-types/proof"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *abi.EmptyValue) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *CreateMinerParams) *CreateMinerReturn), // CreateMiner
3: *new(func(interface{}, *UpdateClaimedPowerParams) *abi.EmptyValue), // UpdateClaimedPower
Expand Down
2 changes: 1 addition & 1 deletion builtin/v9/reward/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *abi.StoragePower) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *AwardBlockRewardParams) *abi.EmptyValue), // AwardBlockReward
3: *new(func(interface{}, *abi.EmptyValue) *ThisEpochRewardReturn), // ThisEpochReward
Expand Down
2 changes: 1 addition & 1 deletion builtin/v9/system/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *abi.EmptyValue) *abi.EmptyValue), // Constructor
}
2 changes: 1 addition & 1 deletion builtin/v9/verifreg/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)

var Methods = []interface{}{
var Methods = map[uint64]interface{}{
1: *new(func(interface{}, *address.Address) *abi.EmptyValue), // Constructor
2: *new(func(interface{}, *AddVerifierParams) *abi.EmptyValue), // AddVerifier
3: *new(func(interface{}, *address.Address) *abi.EmptyValue), // RemoveVerifier
Expand Down

0 comments on commit d683559

Please sign in to comment.