diff --git a/client-sdk/go/modules/accounts/accounts.go b/client-sdk/go/modules/accounts/accounts.go index 0f7f66741b..98da25f7ee 100644 --- a/client-sdk/go/modules/accounts/accounts.go +++ b/client-sdk/go/modules/accounts/accounts.go @@ -12,9 +12,9 @@ import ( var ( // CommonPoolAddress is the address of the internal common pool account in the accounts module. - CommonPoolAddress = types.NewAddressForModule("accounts", []byte("common-pool")) + CommonPoolAddress = types.NewAddressForModule(ModuleName, []byte("common-pool")) // FeeAccumulatorAddress is the address of the internal fee accumulator account in the accounts module. - FeeAccumulatorAddress = types.NewAddressForModule("accounts", []byte("fee-accumulator")) + FeeAccumulatorAddress = types.NewAddressForModule(ModuleName, []byte("fee-accumulator")) ) var ( diff --git a/client-sdk/go/modules/consensusaccounts/consensus_accounts.go b/client-sdk/go/modules/consensusaccounts/consensus_accounts.go index 46c672350d..cd5ce302dd 100644 --- a/client-sdk/go/modules/consensusaccounts/consensus_accounts.go +++ b/client-sdk/go/modules/consensusaccounts/consensus_accounts.go @@ -11,6 +11,13 @@ import ( "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" ) +var ( + // PendingWithdrawalAddress is the address of the internal pending withdrawal account in the consensus_accounts module. + PendingWithdrawalAddress = types.NewAddressForModule(ModuleName, []byte("pending-withdrawal")) + // PendingDelegationAddress is the address of the internal pending delegation account in the consensus_accounts module. + PendingDelegationAddress = types.NewAddressForModule(ModuleName, []byte("pending-delegation")) +) + var ( // Callable methods. methodDeposit = types.NewMethodName("consensus.Deposit", Deposit{}) diff --git a/client-sdk/go/modules/contracts/types.go b/client-sdk/go/modules/contracts/types.go index afaeffd8e0..d43d0ec8d5 100644 --- a/client-sdk/go/modules/contracts/types.go +++ b/client-sdk/go/modules/contracts/types.go @@ -19,7 +19,7 @@ type InstanceID uint64 func (i *InstanceID) Address() types.Address { id := make([]byte, 8) binary.BigEndian.PutUint64(id, uint64(*i)) - return types.NewAddressForModule("contracts", id) + return types.NewAddressForModule(ModuleName, id) } // Policy is a generic policy that specifies who is allowed to perform an action. diff --git a/client-sdk/go/modules/rewards/types.go b/client-sdk/go/modules/rewards/types.go index 0fc1d48342..35ec1e8a7c 100644 --- a/client-sdk/go/modules/rewards/types.go +++ b/client-sdk/go/modules/rewards/types.go @@ -7,7 +7,7 @@ import ( ) // RewardPoolAddress is the address of the reward pool. -var RewardPoolAddress = types.NewAddressForModule("rewards", []byte("reward-pool")) +var RewardPoolAddress = types.NewAddressForModule(ModuleName, []byte("reward-pool")) // RewardStep is one of the time periods in the reward schedule. type RewardStep struct { @@ -27,3 +27,6 @@ type Parameters struct { ParticipationThresholdNumerator uint64 `json:"participation_threshold_numerator"` ParticipationThresholdDenominator uint64 `json:"participation_threshold_denominator"` } + +// ModuleName is the rewards module name. +const ModuleName = "rewards"