Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccAddressAndPubKey ¶
func AccAddressAndPubKey() (string, cryptotypes.PubKey)
AccAddressAndPubKey returns a sample account address and public key
func AccAddressAndPubKeyEd25519 ¶ added in v0.0.8
func AccAddressAndPubKeyEd25519() (string, cryptotypes.PubKey)
AccAddressAndPubKeyEd25519 returns a sample account address and public key
func AccAddressFromConsAddress ¶ added in v0.0.8
AccAddressFromConsAddress returns an account address (with the Bech32PrefixForAccount prefix) from a given consensus address (with the Bech32PrefixForValidator prefix).
Reference: see initSDKConfig in `cmd/poktrolld/cmd`.
Use case: in the native cosmos SDK mint module, we set inflation_rate_change to 0 because Pocket Network has a custom inflation mechanism. Data availability and block validation is a small part of the network's utility, so the majority of inflation comes from the relays serviced. Therefore, the validator's (block producer's) rewards are proportional to that as well. For this reason, we need a helper function to identify the proposer address from the validator consensus address.
TODO_MAINNET: Add E2E tests to validate this works as expected.
func ConsAddress ¶ added in v0.0.6
func ConsAddress() string
ConsAddress returns a sample consensus address, which has the prefix of validators (i.e. consensus nodes) when converted to bech32.
Types ¶
This section is empty.