-
Notifications
You must be signed in to change notification settings - Fork 9
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
fix(cat-gateway): Fix endpoints cardano/assets
and cardano/registrations/cip36
endpoints
#1986
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
…ake_pk_from_vote_key.rs Co-authored-by: bkioshn <[email protected]>
Co-authored-by: bkioshn <[email protected]>
…valid.rs Co-authored-by: bkioshn <[email protected]>
Co-authored-by: bkioshn <[email protected]>
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.
The CIP36 implementation looks good, might need others to take a look at the assets part
@@ -1,9 +1,13 @@ | |||
SELECT problem_report, | |||
SELECT nonce, |
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.
Minor issue about consistency: The file name is missing s
or registration
, should be get_invalid_registrations_w_stake_pk.cql
so it is consistent with get_registrations_w_stake_pk
include_str!("../cql/get_registrations_w_stake_addr.cql"); | ||
/// Get registrations from stake public key query. | ||
const GET_REGISTRATIONS_FROM_STAKE_PK_QUERY: &str = | ||
include_str!("../cql/get_registrations_w_stake_pk.cql"); | ||
|
||
/// Get registration | ||
#[derive(SerializeRow)] | ||
pub(crate) struct GetRegistrationParams { | ||
/// Stake address. |
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.
Typo
/// Stake address. | |
/// Stake public key. |
|
||
let mut invalid_registrations_iter = GetInvalidRegistrationQuery::execute( | ||
/// Get registrations given a stake address, it can be time specific based on asat param, | ||
/// or the latest registration returned if no asat given. |
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 should be all registration returned? Since it is doing <= slotno
Maybe can add "The first one is the latest one"
/// Production Stake Address Identifier | ||
pub(crate) const STAKE_PROD: &str = "stake"; | ||
/// Test Stake Address Identifier | ||
pub(crate) const STAKE_TEST: &str = "stake_test"; | ||
/// Bech32 Match Pattern | ||
const BECH32: &str = "[a,c-h,j-n,p-z,0,2-9]"; | ||
/// Length of the encoded address (for type 0 - 3). |
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.
Avoiding confusion
/// Length of the encoded address that have 2 parts (for Shelley address type 0 - 3).
const ENCODED_TWO_PART_ADDR_LEN: usize = 98;
/// Length of the encoded address that have 1 part (for Shelley address type 6 - 7, and stake address).
const ENCODED_ONE_PART_ADDR_LEN: usize = 53;
Description