-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #285 from ComposableFi/reimplement-delegate-msg-se…
…rver-func Reimplement delegate msg server func
- Loading branch information
Showing
5 changed files
with
103 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package types | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/address" | ||
) | ||
|
||
// MinterKey is the key to use for the keeper store. | ||
var ( | ||
DelegationKey = []byte{0x37} // key for a delegation | ||
) | ||
|
||
const ( | ||
// module name | ||
ModuleName = "customstaking" | ||
|
||
// StoreKey is the default store key for mint | ||
StoreKey = ModuleName | ||
|
||
// QuerierRoute is the querier route for the minting store. | ||
QuerierRoute = StoreKey | ||
|
||
// // Query endpoints supported by the minting querier | ||
// QueryParameters = "parameters" | ||
// QueryInflation = "inflation" | ||
// QueryAnnualProvisions = "annual_provisions" | ||
) | ||
|
||
var () | ||
|
||
// GetDelegationKey creates the key for delegator bond with validator | ||
// VALUE: staking/Delegation | ||
func GetDelegationKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { | ||
return append(GetDelegationsKey(delAddr), address.MustLengthPrefix(valAddr)...) | ||
} | ||
|
||
func GetDelegationsKey(delAddr sdk.AccAddress) []byte { | ||
return append(DelegationKey, address.MustLengthPrefix(delAddr)...) | ||
} |