Skip to content
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

Feat/ldg 668 implement unstake claim tokens new pol #42

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/contract.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ static const uint8_t STAKEKIT_UNSTAKE_CLAIM_TOKENS_NEW_SELECTOR[SELECTOR_SIZE] =
0x7f,
0xdd,
0xc2};
static const uint8_t STAKEKIT_UNSTAKE_CLAIM_TOKENS_NEW_POL_SELECTOR[SELECTOR_SIZE] = {0x87,
0x59,
0xc2,
0x34};
static const uint8_t STAKEKIT_AVALANCHE_SUBMIT_SELECTOR[SELECTOR_SIZE] = {0x5b, 0xcb, 0x2f, 0xc6};
static const uint8_t STAKEKIT_AVALANCHE_REQUEST_UNLOCK_SELECTOR[SELECTOR_SIZE] = {0xc9,
0xd2,
Expand Down Expand Up @@ -151,6 +155,7 @@ const uint8_t *const STAKEKIT_SELECTORS[NUM_STAKEKIT_SELECTORS] = {
STAKEKIT_WITHDRAW_REWARDS_SELECTOR,
STAKEKIT_WITHDRAW_REWARDS_POL_SELECTOR,
STAKEKIT_UNSTAKE_CLAIM_TOKENS_NEW_SELECTOR,
STAKEKIT_UNSTAKE_CLAIM_TOKENS_NEW_POL_SELECTOR,
STAKEKIT_AVALANCHE_SUBMIT_SELECTOR,
STAKEKIT_AVALANCHE_REQUEST_UNLOCK_SELECTOR,
STAKEKIT_AVALANCHE_REDEEM_1_SELECTOR,
Expand Down
1 change: 1 addition & 0 deletions src/handle_init_contract.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ void handle_init_contract(ethPluginInitContract_t *msg) {
context->next_param = AMOUNT_RECEIVED;
break;
case UNSTAKE_CLAIM_TOKENS_NEW:
case UNSTAKE_CLAIM_TOKENS_NEW_POL:
context->next_param = UNBOUND_NONCE;
break;
case LIDO_REQUEST_WITHDRAWALS:
Expand Down
1 change: 1 addition & 0 deletions src/handle_provide_parameter.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ void handle_provide_parameter(ethPluginProvideParameter_t *msg) {
context->skip = 1;
break;
case UNSTAKE_CLAIM_TOKENS_NEW:
case UNSTAKE_CLAIM_TOKENS_NEW_POL:
// Save the Unbound nonce boolean to the context.
if (!U2BE_from_parameter(msg->parameter, &(context->unbound_nonce))) {
msg->result = ETH_PLUGIN_RESULT_ERROR;
Expand Down
3 changes: 3 additions & 0 deletions src/handle_query_contract_id.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ void handle_query_contract_id(ethQueryContractID_t *msg) {
case UNSTAKE_CLAIM_TOKENS_NEW:
strlcpy(msg->version, "Unstake Claim Tokens New", msg->versionLength);
break;
case UNSTAKE_CLAIM_TOKENS_NEW_POL:
strlcpy(msg->version, "Unstake Claim Tokens New POL", msg->versionLength);
break;
case AVALANCHE_REQUEST_UNLOCK:
strlcpy(msg->version, "Request Unlock", msg->versionLength);
break;
Expand Down
2 changes: 2 additions & 0 deletions src/handle_query_contract_ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ static bool set_smart_contract_ui(ethQueryContractUI_t *msg, plugin_parameters_t
static bool set_unbound_nonce_ui(ethQueryContractUI_t *msg, plugin_parameters_t *context) {
switch (context->selectorIndex) {
case UNSTAKE_CLAIM_TOKENS_NEW:
case UNSTAKE_CLAIM_TOKENS_NEW_POL:
strlcpy(msg->title, "Unbound Nonce", msg->titleLength);
break;
default:
Expand Down Expand Up @@ -717,6 +718,7 @@ static screens_t get_screen(ethQueryContractUI_t *msg,
case REVOKE_ACTIVE:
return get_screen_vote_revoke(msg, context);
case UNSTAKE_CLAIM_TOKENS_NEW:
case UNSTAKE_CLAIM_TOKENS_NEW_POL:
return get_screen_unstake_claim(msg, context);
case ANGLE_WITHDRAW:
return get_screen_angle_withdraw(msg, context);
Expand Down
3 changes: 2 additions & 1 deletion src/stakekit_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#define PLUGIN_NAME "StakeKit"

#define NUM_STAKEKIT_SELECTORS 60u
#define NUM_STAKEKIT_SELECTORS 61u

#define TICKER_LEN 30u

Expand Down Expand Up @@ -74,6 +74,7 @@ typedef enum {
WITHDRAW_REWARDS,
WITHDRAW_REWARDS_POL,
UNSTAKE_CLAIM_TOKENS_NEW,
UNSTAKE_CLAIM_TOKENS_NEW_POL,
AVALANCHE_SUBMIT,
AVALANCHE_REQUEST_UNLOCK,
AVALANCHE_REDEEM_1,
Expand Down
Loading
Loading