-
Notifications
You must be signed in to change notification settings - Fork 992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pos] Add epoch argument to vp::pos::rewards #4196
base: main
Are you sure you want to change the base?
Changes from all commits
d94ec05
abcdefa
e1cf919
a6257eb
bd78cba
1f5dd5a
7937b91
cb29c9d
3c47541
8cb563f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Allow querying PoS rewards at a specified epoch | ||
([\#4196](https://github.com/anoma/namada/pull/4196)) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,6 +101,8 @@ pub trait NamadaTypes: Clone + std::fmt::Debug { | |
type MaspIndexerAddress: Clone + std::fmt::Debug; | ||
/// Represents a block height | ||
type BlockHeight: Clone + std::fmt::Debug; | ||
/// Represents an epoch | ||
type Epoch: Clone + std::fmt::Debug; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this addition is not needed - you can refer to the concrete |
||
} | ||
|
||
/// The concrete types being used in Namada SDK | ||
|
@@ -128,6 +130,7 @@ impl NamadaTypes for SdkTypes { | |
type Data = Vec<u8>; | ||
type DatedSpendingKey = DatedSpendingKey; | ||
type DatedViewingKey = DatedViewingKey; | ||
type Epoch = namada_core::chain::Epoch; | ||
type EthereumAddress = (); | ||
type Keypair = namada_core::key::common::SecretKey; | ||
type MaspIndexerAddress = String; | ||
|
@@ -2545,6 +2548,8 @@ pub struct QueryRewards<C: NamadaTypes = SdkTypes> { | |
pub source: Option<C::Address>, | ||
/// Address of the validator | ||
pub validator: C::Address, | ||
/// Epoch in which to find rewards | ||
pub epoch: Option<C::Epoch>, | ||
} | ||
|
||
/// Query PoS delegations | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be needed - the symbols used are re-exported from
namada_token