Skip to content

Commit

Permalink
client-sdk: Add missing pending-withdrawal and pending-delegations
Browse files Browse the repository at this point in the history
  • Loading branch information
matevz committed Jan 26, 2024
1 parent ec0437d commit 3060c61
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client-sdk/go/modules/accounts/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
7 changes: 7 additions & 0 deletions client-sdk/go/modules/consensusaccounts/consensus_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{})
Expand Down
2 changes: 1 addition & 1 deletion client-sdk/go/modules/contracts/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 4 additions & 1 deletion client-sdk/go/modules/rewards/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"

0 comments on commit 3060c61

Please sign in to comment.