diff --git a/.clang-format b/.clang-format index b4abfa06..3207c120 100644 --- a/.clang-format +++ b/.clang-format @@ -7,7 +7,6 @@ ColumnLimit: 100 PointerAlignment: Right AlignAfterOpenBracket: Align AlignConsecutiveMacros: true -AllowAllParametersOfDeclarationOnNextLine: false SortIncludes: false SpaceAfterCStyleCast: true AllowShortCaseLabelsOnASingleLine: false @@ -18,3 +17,4 @@ AllowShortFunctionsOnASingleLine: None BinPackArguments: false BinPackParameters: false --- + diff --git a/Makefile b/Makefile index c6958144..c5dc12c3 100644 --- a/Makefile +++ b/Makefile @@ -51,11 +51,11 @@ ifeq ($(TARGET_NAME),TARGET_STAX) DEFINES += ICONBITMAP=C_stax_$(NORMAL_NAME)_64px_bitmap endif -CURVE_APP_LOAD_PARAMS = ed25519 +CURVE_APP_LOAD_PARAMS = secp256k1 PATH_APP_LOAD_PARAMS = "44'/134'" VARIANT_PARAM = COIN -VARIANT_VALUES = LSK +VARIANT_VALUES = lisk DISABLE_STANDARD_APP_FILES = 1 DISABLE_STANDARD_SNPRINTF = 1 diff --git a/PLUGIN_SPECIFICATION.md b/PLUGIN_SPECIFICATION.md index 55e9910c..b0308bd0 100644 --- a/PLUGIN_SPECIFICATION.md +++ b/PLUGIN_SPECIFICATION.md @@ -1,17 +1,28 @@ # Technical Specification + ## Smart Contracts Smart contracts covered by this plugin are: -| Network | Version | Smart Contract | Address | -| ---- | --- | ---- | --- | -| Lisk Sepolia Testnet | - | TokenClaim | `0x5c3a68B5C635Ce0DA7648C30A1B83A61C376bd87` | +| Network | Version | Smart Contract | Address | +| -------------------- | ------- | -------------- | -------------------------------------------- | +| Lisk Sepolia Testnet | - | TokenClaim | `0x3D4190b08E3E30183f5AdE3A116f2534Ee3a4f94` | +| Lisk Sepolia Testnet | - | Reward | `0xFd322B4724C497E59D48fff8f79c16b4D48837f5` | +| Lisk Mainnet | - | TokenClaim | `0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994` | +| Lisk Mainnet | - | Reward | `0xD35ca9577a9DADa7624a35EC10C2F55031f0Ab1f` | ## Functions Following functions are covered by this plugins: -|Contract | Function | Selector | Displayed Parameters | -| --- | --- | --- | --- | -|ERC1967Proxy | claimRegularAccount | `0xf6de242d`|
uint256 claimAmount
bytes senderPublicKey
address recipientAddress
| -|ERC1967Proxy | claimMultisigAccount | `0x2f559f68`|
uint256 claimAmount
bytes senderAddress
address recipientAddress
| +| Contract | Function | Selector | Displayed Parameters | +| ---------- | ------------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| TokenClaim | claimRegularAccount | `0xf6de242d` |
uint256 claimAmount
bytes senderPublicKey
address recipientAddress
| +| TokenClaim | claimMultisigAccount | `0x2f559f68` |
uint256 claimAmount
bytes senderAddress
address recipientAddress
| +| Reward | createPosition | `0xd1aaef05` |
uint256 lockAmount
uint256 lockDuration
| +| Reward | initiateFastUnlock | `0x864c8725` |
uint256[] lockIDs
| +| Reward | claimRewards | `0x5eac6239` |
uint256[] lockIDs
| +| Reward | pauseUnlocking | `0xfe042b5b` |
uint256[] lockIDs
| +| Reward | resumeUnlockingCountdown | `0x82d4ae58` |
uint256[] lockIDs
| +| Reward | increaseLockingAmount | `0xf94415ca` |
(uint256 lockID, uint256 amountIncrease)[]
| +| Reward | extendDuration | `0x2d412a71` |
(uint256 lockID, uint256 durationExtension)[]
| diff --git a/src/handle_finalize.c b/src/handle_finalize.c index b2eaca5e..588a5407 100644 --- a/src/handle_finalize.c +++ b/src/handle_finalize.c @@ -8,8 +8,24 @@ void handle_finalize(ethPluginFinalize_t *msg) { switch (context->selectorIndex) { case CLAIM_REGULAR_ACCOUNT: case CLAIM_MULTI_SIGNATURE_ACCOUNT: + case REWARD_ADD_UNUSED_REWARDS: + case REWARD_FUND_STAKING_REWARDS: msg->numScreens = 3; break; + case REWARD_CREATE_POSITION: + msg->numScreens = 2; + break; + case REWARD_INIT_FAST_UNLOCK: + case REWARD_CLAIM_REWARDS: + case REWARD_PAUSE_UNLOCKING: + case REWARD_RESUME_UNLOCKING: + case REWARD_DELETE_POSITIONS: + msg->numScreens = context->lisk.body.reward.lock_ids_len; + break; + case REWARD_INC_LOCKING_AMOUNT: + case REWARD_EXTEND_DURATION: + msg->numScreens = context->lisk.body.rewardIncLockingAmount.len * 2; + break; default: msg->result = ETH_PLUGIN_RESULT_ERROR; return; diff --git a/src/handle_init_contract.c b/src/handle_init_contract.c index 9fdc37f1..e698d38d 100644 --- a/src/handle_init_contract.c +++ b/src/handle_init_contract.c @@ -45,6 +45,20 @@ void handle_init_contract(ethPluginInitContract_t *msg) { case CLAIM_MULTI_SIGNATURE_ACCOUNT: context->next_param = PROOF; break; + case REWARD_CREATE_POSITION: + case REWARD_ADD_UNUSED_REWARDS: + case REWARD_FUND_STAKING_REWARDS: + context->next_param = AMOUNT; + break; + case REWARD_INIT_FAST_UNLOCK: + case REWARD_CLAIM_REWARDS: + case REWARD_PAUSE_UNLOCKING: + case REWARD_RESUME_UNLOCKING: + case REWARD_INC_LOCKING_AMOUNT: + case REWARD_EXTEND_DURATION: + case REWARD_DELETE_POSITIONS: + context->next_param = OFFSET; + break; // Keep this default: PRINTF("Missing selectorIndex: %d\n", context->selectorIndex); diff --git a/src/handle_provide_parameter.c b/src/handle_provide_parameter.c index 91df5c8b..789d0558 100644 --- a/src/handle_provide_parameter.c +++ b/src/handle_provide_parameter.c @@ -1,5 +1,7 @@ #include "plugin.h" +uint16_t counter = 0; + static void handle_claim_regular_account(ethPluginProvideParameter_t *msg, context_t *context) { switch (context->next_param) { case PROOF: // _proof @@ -24,6 +26,9 @@ static void handle_claim_regular_account(ethPluginProvideParameter_t *msg, conte context->next_param = ED25519_SIGNATURE; break; case ED25519_SIGNATURE: // _sig + context->next_param = UNEXPECTED_PARAMETER; + break; + case UNEXPECTED_PARAMETER: break; default: PRINTF("Param not supported: %d\n", context->next_param); @@ -59,6 +64,179 @@ static void handle_claim_multisig_account(ethPluginProvideParameter_t *msg, cont context->next_param = ED25519_SIGNATURES; break; case ED25519_SIGNATURES: // _sigs + context->next_param = UNEXPECTED_PARAMETER; + break; + case UNEXPECTED_PARAMETER: + break; + default: + PRINTF("Param not supported: %d\n", context->next_param); + msg->result = ETH_PLUGIN_RESULT_ERROR; + break; + } +} + +static void handle_reward_create_position(ethPluginProvideParameter_t *msg, context_t *context) { + switch (context->next_param) { + case AMOUNT: // amount + copy_parameter(context->lisk.body.rewardCreatePosition.lock_amount, + msg->parameter, + sizeof(context->lisk.body.rewardCreatePosition.lock_amount)); + context->next_param = DURATION; + break; + case DURATION: // lockingDuration + copy_parameter(context->lisk.body.rewardCreatePosition.lock_duration, + msg->parameter, + sizeof(context->lisk.body.rewardCreatePosition.lock_duration)); + context->next_param = UNEXPECTED_PARAMETER; + break; + case UNEXPECTED_PARAMETER: + break; + default: + PRINTF("Param not supported: %d\n", context->next_param); + msg->result = ETH_PLUGIN_RESULT_ERROR; + break; + } +} + +static void handle_lock_ids_array(ethPluginProvideParameter_t *msg, context_t *context) { + switch (context->next_param) { + case OFFSET: + context->next_param = LOCK_IDS_LEN; + break; + case LOCK_IDS_LEN: + if (!U2BE_from_parameter(msg->parameter, &context->lisk.body.reward.lock_ids_len) || + context->lisk.body.reward.lock_ids_len > 4 || + context->lisk.body.reward.lock_ids_len == 0) { + msg->result = ETH_PLUGIN_RESULT_ERROR; + } + + context->next_param = LOCK_ID; + break; + case LOCK_ID: + copy_parameter(context->lisk.body.reward.lock_id[counter].value, + msg->parameter, + INT256_LENGTH); + if (counter == context->lisk.body.reward.lock_ids_len - 1) { + counter = 0; + context->next_param = NONE; + } else { + counter++; + } + break; + case NONE: + break; + default: + PRINTF("Param not supported\n"); + msg->result = ETH_PLUGIN_RESULT_ERROR; + break; + } +} + +static void handle_increase_locking_amount(ethPluginProvideParameter_t *msg, context_t *context) { + switch (context->next_param) { + case OFFSET: + context->next_param = INCREASE_LEN; + break; + case INCREASE_LEN: + if (!U2BE_from_parameter(msg->parameter, + &context->lisk.body.rewardIncLockingAmount.len) || + context->lisk.body.rewardIncLockingAmount.len > 2 || + context->lisk.body.rewardIncLockingAmount.len == 0) { + msg->result = ETH_PLUGIN_RESULT_ERROR; + } + + context->next_param = LOCK_ID; + break; + case LOCK_ID: + copy_parameter(context->lisk.body.rewardIncLockingAmount.lock_id[counter].value, + msg->parameter, + INT256_LENGTH); + context->next_param = AMOUNT; + break; + case AMOUNT: + copy_parameter(context->lisk.body.rewardIncLockingAmount.amount[counter].value, + msg->parameter, + INT256_LENGTH); + if (context->lisk.body.rewardIncLockingAmount.len > 1 && + counter < context->lisk.body.rewardIncLockingAmount.len - 1) { + counter++; + context->next_param = LOCK_ID; + } else { + context->next_param = NONE; + } + break; + case NONE: + break; + default: + PRINTF("Param not supported\n"); + msg->result = ETH_PLUGIN_RESULT_ERROR; + break; + } +} + +static void handle_extend_duration(ethPluginProvideParameter_t *msg, context_t *context) { + switch (context->next_param) { + case OFFSET: + context->next_param = INCREASE_LEN; + break; + case INCREASE_LEN: + if (!U2BE_from_parameter(msg->parameter, + &context->lisk.body.rewardExtendDuration.len) || + context->lisk.body.rewardExtendDuration.len > 2 || + context->lisk.body.rewardExtendDuration.len == 0) { + msg->result = ETH_PLUGIN_RESULT_ERROR; + } + + context->next_param = LOCK_ID; + break; + case LOCK_ID: + copy_parameter(context->lisk.body.rewardExtendDuration.lock_id[counter].value, + msg->parameter, + INT256_LENGTH); + context->next_param = DURATION; + break; + case DURATION: + copy_parameter(context->lisk.body.rewardExtendDuration.duration[counter].value, + msg->parameter, + INT256_LENGTH); + if (context->lisk.body.rewardExtendDuration.len > 1 && + counter < context->lisk.body.rewardExtendDuration.len - 1) { + counter++; + context->next_param = LOCK_ID; + } else { + context->next_param = NONE; + } + break; + case NONE: + break; + default: + PRINTF("Param not supported\n"); + msg->result = ETH_PLUGIN_RESULT_ERROR; + break; + } +} + +static void handle_add_unused_rewards(ethPluginProvideParameter_t *msg, context_t *context) { + switch (context->next_param) { + case AMOUNT: + copy_parameter(context->lisk.body.rewardAddUnusedRewards.amount, + msg->parameter, + sizeof(context->lisk.body.rewardAddUnusedRewards.amount)); + context->next_param = DURATION; + break; + case DURATION: + copy_parameter(context->lisk.body.rewardAddUnusedRewards.duration, + msg->parameter, + sizeof(context->lisk.body.rewardAddUnusedRewards.duration)); + context->next_param = DELAY; + break; + case DELAY: + copy_parameter(context->lisk.body.rewardAddUnusedRewards.delay, + msg->parameter, + sizeof(context->lisk.body.rewardAddUnusedRewards.delay)); + context->next_param = UNEXPECTED_PARAMETER; + break; + case UNEXPECTED_PARAMETER: break; default: PRINTF("Param not supported: %d\n", context->next_param); @@ -87,6 +265,26 @@ void handle_provide_parameter(ethPluginProvideParameter_t *msg) { case CLAIM_MULTI_SIGNATURE_ACCOUNT: handle_claim_multisig_account(msg, context); break; + case REWARD_CREATE_POSITION: + handle_reward_create_position(msg, context); + break; + case REWARD_INIT_FAST_UNLOCK: + case REWARD_CLAIM_REWARDS: + case REWARD_PAUSE_UNLOCKING: + case REWARD_RESUME_UNLOCKING: + case REWARD_DELETE_POSITIONS: + handle_lock_ids_array(msg, context); + break; + case REWARD_ADD_UNUSED_REWARDS: + case REWARD_FUND_STAKING_REWARDS: + handle_add_unused_rewards(msg, context); + break; + case REWARD_INC_LOCKING_AMOUNT: + handle_increase_locking_amount(msg, context); + break; + case REWARD_EXTEND_DURATION: + handle_extend_duration(msg, context); + break; default: PRINTF("Selector Index not supported: %d\n", context->selectorIndex); msg->result = ETH_PLUGIN_RESULT_ERROR; diff --git a/src/handle_query_contract_id.c b/src/handle_query_contract_id.c index f8b38563..f7af3a21 100644 --- a/src/handle_query_contract_id.c +++ b/src/handle_query_contract_id.c @@ -14,6 +14,36 @@ void handle_query_contract_id(ethQueryContractID_t *msg) { context->selectorIndex == CLAIM_MULTI_SIGNATURE_ACCOUNT) { strlcpy(msg->version, "Claim LSK", msg->versionLength); msg->result = ETH_PLUGIN_RESULT_OK; + } else if (context->selectorIndex == REWARD_CREATE_POSITION) { + strlcpy(msg->version, "Stake Amount", msg->versionLength); + msg->result = ETH_PLUGIN_RESULT_OK; + } else if (context->selectorIndex == REWARD_INIT_FAST_UNLOCK) { + strlcpy(msg->version, "Fast Unlock", msg->versionLength); + msg->result = ETH_PLUGIN_RESULT_OK; + } else if (context->selectorIndex == REWARD_CLAIM_REWARDS) { + strlcpy(msg->version, "Claim Rewards", msg->versionLength); + msg->result = ETH_PLUGIN_RESULT_OK; + } else if (context->selectorIndex == REWARD_PAUSE_UNLOCKING) { + strlcpy(msg->version, "Pause Unlocking", msg->versionLength); + msg->result = ETH_PLUGIN_RESULT_OK; + } else if (context->selectorIndex == REWARD_RESUME_UNLOCKING) { + strlcpy(msg->version, "Resume Unlocking", msg->versionLength); + msg->result = ETH_PLUGIN_RESULT_OK; + } else if (context->selectorIndex == REWARD_INC_LOCKING_AMOUNT) { + strlcpy(msg->version, "Inc Locking Amount", msg->versionLength); + msg->result = ETH_PLUGIN_RESULT_OK; + } else if (context->selectorIndex == REWARD_EXTEND_DURATION) { + strlcpy(msg->version, "Extend Duration", msg->versionLength); + msg->result = ETH_PLUGIN_RESULT_OK; + } else if (context->selectorIndex == REWARD_DELETE_POSITIONS) { + strlcpy(msg->version, "Delete Positions", msg->versionLength); + msg->result = ETH_PLUGIN_RESULT_OK; + } else if (context->selectorIndex == REWARD_ADD_UNUSED_REWARDS) { + strlcpy(msg->version, "Add Unused Rewards", msg->versionLength); + msg->result = ETH_PLUGIN_RESULT_OK; + } else if (context->selectorIndex == REWARD_FUND_STAKING_REWARDS) { + strlcpy(msg->version, "Fund Staking Rewards", msg->versionLength); + msg->result = ETH_PLUGIN_RESULT_OK; } else { PRINTF("Selector index: %d not supported\n", context->selectorIndex); msg->result = ETH_PLUGIN_RESULT_ERROR; diff --git a/src/handle_query_contract_ui.c b/src/handle_query_contract_ui.c index 2068be56..9cb62f9b 100644 --- a/src/handle_query_contract_ui.c +++ b/src/handle_query_contract_ui.c @@ -54,6 +54,85 @@ static bool set_recipient_ui(ethQueryContractUI_t *msg, context_t *context) { chainid); } +// Set UI for "Lock Amount" screen. +static bool set_lock_amount_ui(ethQueryContractUI_t *msg, const context_t *context) { + strlcpy(msg->title, "Lock Amount", msg->titleLength); + + uint8_t decimals = 18; + const char *ticker = "LSK"; + + return amountToString(context->lisk.body.rewardCreatePosition.lock_amount, + sizeof(context->lisk.body.rewardCreatePosition.lock_amount), + decimals, + ticker, + msg->msg, + msg->msgLength); +} + +// Set UI for "Lock Duration" screen. +static bool set_lock_duration_ui(ethQueryContractUI_t *msg, context_t *context) { + strlcpy(msg->title, "Duration (in days)", msg->titleLength); + return uint256_to_decimal(context->lisk.body.rewardCreatePosition.lock_duration, + sizeof(context->lisk.body.rewardCreatePosition.lock_duration), + msg->msg, + msg->msgLength); +} + +// Set UI for "Lock IDs" screen. +static bool set_lock_ids_ui(ethQueryContractUI_t *msg, arr_uint8_t *lock) { + strlcpy(msg->title, "Lock ID", msg->titleLength); + return uint256_to_decimal(lock->value, INT256_LENGTH, msg->msg, msg->msgLength); +} + +// Set UI for "Increase Amount" screen. +static bool set_amount_ui(ethQueryContractUI_t *msg, arr_uint8_t *amount) { + strlcpy(msg->title, "Increase Amount", msg->titleLength); + + uint8_t decimals = 18; + const char *ticker = "LSK"; + + return amountToString(amount->value, INT256_LENGTH, decimals, ticker, msg->msg, msg->msgLength); +} + +// Set UI for "Extend Duration" screen. +static bool set_duration_ui(ethQueryContractUI_t *msg, arr_uint8_t *duration) { + strlcpy(msg->title, "Duration", msg->titleLength); + return uint256_to_decimal(duration->value, INT256_LENGTH, msg->msg, msg->msgLength); +} + +// Set UI for "Unused Rewards Amount" screen. +static bool set_unused_amount_ui(ethQueryContractUI_t *msg, const context_t *context) { + strlcpy(msg->title, "Amount", msg->titleLength); + + uint8_t decimals = 18; + const char *ticker = "LSK"; + + return amountToString(context->lisk.body.rewardAddUnusedRewards.amount, + sizeof(context->lisk.body.rewardAddUnusedRewards.amount), + decimals, + ticker, + msg->msg, + msg->msgLength); +} + +// Set UI for "Add Unused Duration" screen. +static bool set_unused_duration_ui(ethQueryContractUI_t *msg, context_t *context) { + strlcpy(msg->title, "Duration (in days)", msg->titleLength); + return uint256_to_decimal(context->lisk.body.rewardAddUnusedRewards.duration, + sizeof(context->lisk.body.rewardAddUnusedRewards.duration), + msg->msg, + msg->msgLength); +} + +// Set UI for "Add Unused Duration" screen. +static bool set_unused_delay_ui(ethQueryContractUI_t *msg, context_t *context) { + strlcpy(msg->title, "Delay (in days)", msg->titleLength); + return uint256_to_decimal(context->lisk.body.rewardAddUnusedRewards.delay, + sizeof(context->lisk.body.rewardAddUnusedRewards.delay), + msg->msg, + msg->msgLength); +} + void handle_query_contract_ui(ethQueryContractUI_t *msg) { context_t *context = (context_t *) msg->pluginContext; bool ret = false; @@ -97,6 +176,85 @@ void handle_query_contract_ui(ethQueryContractUI_t *msg) { PRINTF("Received an invalid screenIndex\n"); } break; + case REWARD_CREATE_POSITION: + switch (msg->screenIndex) { + case 0: + ret = set_lock_amount_ui(msg, context); + break; + case 1: + ret = set_lock_duration_ui(msg, context); + break; + default: + PRINTF("Received an invalid screenIndex\n"); + } + break; + case REWARD_ADD_UNUSED_REWARDS: + case REWARD_FUND_STAKING_REWARDS: + switch (msg->screenIndex) { + case 0: + ret = set_unused_amount_ui(msg, context); + break; + case 1: + ret = set_unused_duration_ui(msg, context); + break; + case 2: + ret = set_unused_delay_ui(msg, context); + break; + default: + PRINTF("Received an invalid screenIndex\n"); + } + break; + case REWARD_INIT_FAST_UNLOCK: + case REWARD_CLAIM_REWARDS: + case REWARD_PAUSE_UNLOCKING: + case REWARD_RESUME_UNLOCKING: + case REWARD_DELETE_POSITIONS: + if (msg->screenIndex < context->lisk.body.reward.lock_ids_len) { + ret = set_lock_ids_ui(msg, &context->lisk.body.reward.lock_id[msg->screenIndex]); + } else { + PRINTF("Received an invalid screenIndex\n"); + } + break; + case REWARD_INC_LOCKING_AMOUNT: + switch (msg->screenIndex) { + case 0: + ret = + set_lock_ids_ui(msg, &context->lisk.body.rewardIncLockingAmount.lock_id[0]); + break; + case 1: + ret = set_amount_ui(msg, &context->lisk.body.rewardIncLockingAmount.amount[0]); + break; + case 2: + ret = + set_lock_ids_ui(msg, &context->lisk.body.rewardIncLockingAmount.lock_id[1]); + break; + case 3: + ret = set_amount_ui(msg, &context->lisk.body.rewardIncLockingAmount.amount[1]); + break; + default: + PRINTF("Received an invalid screenIndex\n"); + } + break; + case REWARD_EXTEND_DURATION: + switch (msg->screenIndex) { + case 0: + ret = set_lock_ids_ui(msg, &context->lisk.body.rewardExtendDuration.lock_id[0]); + break; + case 1: + ret = + set_duration_ui(msg, &context->lisk.body.rewardExtendDuration.duration[0]); + break; + case 2: + ret = set_lock_ids_ui(msg, &context->lisk.body.rewardExtendDuration.lock_id[1]); + break; + case 3: + ret = + set_duration_ui(msg, &context->lisk.body.rewardExtendDuration.duration[1]); + break; + default: + PRINTF("Received an invalid screenIndex\n"); + } + break; default: PRINTF("Selector index: %d not supported\n", context->selectorIndex); } diff --git a/src/plugin.h b/src/plugin.h index db687e44..61ce4868 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -28,9 +28,19 @@ // A Xmacro below will create for you: // - an enum named selector_t with every NAME // - a map named SELECTORS associating each NAME with it's value -#define SELECTORS_LIST(X) \ - X(CLAIM_REGULAR_ACCOUNT, 0xf6de242d) \ - X(CLAIM_MULTI_SIGNATURE_ACCOUNT, 0x2f559f68) +#define SELECTORS_LIST(X) \ + X(CLAIM_REGULAR_ACCOUNT, 0xf6de242d) \ + X(CLAIM_MULTI_SIGNATURE_ACCOUNT, 0x2f559f68) \ + X(REWARD_CREATE_POSITION, 0xd1aaef05) \ + X(REWARD_INIT_FAST_UNLOCK, 0x864c8725) \ + X(REWARD_CLAIM_REWARDS, 0x5eac6239) \ + X(REWARD_RESUME_UNLOCKING, 0x82d4ae58) \ + X(REWARD_PAUSE_UNLOCKING, 0xfe042b5b) \ + X(REWARD_INC_LOCKING_AMOUNT, 0xf94415ca) \ + X(REWARD_EXTEND_DURATION, 0x2d412a71) \ + X(REWARD_DELETE_POSITIONS, 0x221b2b41) \ + X(REWARD_ADD_UNUSED_REWARDS, 0x315d4222) \ + X(REWARD_FUND_STAKING_REWARDS, 0xebcb3818) // Xmacro helpers to define the enum and map // Do not modify ! @@ -44,6 +54,10 @@ typedef enum selector_e { SELECTORS_LIST(TO_ENUM) SELECTOR_COUNT, } selector_t; +typedef struct { + uint8_t value[INT256_LENGTH]; +} arr_uint8_t; + // This array will be automatically expanded to map all selector_t names with the correct value. // Do not modify ! extern const uint32_t SELECTORS[SELECTOR_COUNT]; @@ -56,6 +70,7 @@ typedef enum { CLAIM_AMOUNT, RECIPIENT, UNEXPECTED_PARAMETER, + NONE, // Claim regular account parameters PUBLIC_KEY, @@ -65,6 +80,16 @@ typedef enum { MULTISIG_KEYS, LSK_ADDRESS, ED25519_SIGNATURES, + + // Reward contract parameters + AMOUNT, + DURATION, + LOCK_ID, + LOCK_IDS_LEN, + LOCK_ID_NEXT, + INCREASE_LEN, + OFFSET, + DELAY, } parameter; typedef struct { @@ -75,6 +100,31 @@ typedef struct { uint8_t public_key[PUBLIC_KEY_LENGTH]; uint8_t lsk_address[LISK_ADDRESS_LENGTH]; } claim; + + struct { + uint8_t lock_amount[INT256_LENGTH]; + uint8_t lock_duration[INT256_LENGTH]; + } rewardCreatePosition; + + struct { + uint16_t lock_ids_len; + arr_uint8_t lock_id[4]; + } reward; + struct { + arr_uint8_t lock_id[2]; + arr_uint8_t amount[2]; + uint16_t len; + } rewardIncLockingAmount; + struct { + arr_uint8_t lock_id[2]; + arr_uint8_t duration[2]; + uint16_t len; + } rewardExtendDuration; + struct { + uint8_t amount[INT256_LENGTH]; + uint8_t duration[INT256_LENGTH]; + uint8_t delay[INT256_LENGTH]; + } rewardAddUnusedRewards; } body; } lisk_t; diff --git a/tests/abis/0xD35ca9577a9DADa7624a35EC10C2F55031f0Ab1f.abi.json b/tests/abis/0xD35ca9577a9DADa7624a35EC10C2F55031f0Ab1f.abi.json new file mode 100644 index 00000000..e5b12ace --- /dev/null +++ b/tests/abis/0xD35ca9577a9DADa7624a35EC10C2F55031f0Ab1f.abi.json @@ -0,0 +1,837 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ERC1967InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "ERC1967NonPayable", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" + } + ], + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "LiskTokenContractAddressChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "LockingPositionContractAddressChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "duration", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "RewardsAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "lockID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RewardsClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "StakingContractAddressChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "OFFSET", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "REWARD_DURATION", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "REWARD_DURATION_DELAY", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADE_INTERFACE_VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "duration", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "delay", + "type": "uint16" + } + ], + "name": "addUnusedRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lockID", + "type": "uint256" + } + ], + "name": "calculateRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "lockIDs", + "type": "uint256[]" + } + ], + "name": "claimRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "duration", + "type": "uint256" + } + ], + "name": "createPosition", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "dailyRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "dailyUnlockedAmounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "lockIDs", + "type": "uint256[]" + } + ], + "name": "deletePositions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "lockID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "durationExtension", + "type": "uint256" + } + ], + "internalType": "struct L2Reward.ExtendedDuration[]", + "name": "locks", + "type": "tuple[]" + } + ], + "name": "extendDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "duration", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "delay", + "type": "uint16" + } + ], + "name": "fundStakingRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "lockID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountIncrease", + "type": "uint256" + } + ], + "internalType": "struct L2Reward.IncreasedAmount[]", + "name": "locks", + "type": "tuple[]" + } + ], + "name": "increaseLockingAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l2LiskTokenContract", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_lockingPositionContract", + "type": "address" + } + ], + "name": "initializeLockingPosition", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_stakingContract", + "type": "address" + } + ], + "name": "initializeStaking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "lockIDs", + "type": "uint256[]" + } + ], + "name": "initiateFastUnlock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "l2TokenContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "lastClaimDate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastTrsDate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lockingPositionContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "lockIDs", + "type": "uint256[]" + } + ], + "name": "pauseUnlocking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingUnlockAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "lockIDs", + "type": "uint256[]" + } + ], + "name": "resumeUnlockingCountdown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardsSurplus", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stakingContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "todayDay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAmountLocked", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "totalWeights", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/tests/abis/0x5bdcf98a3C11A1f6aA9293DB0169C2C2539526A0.abi.json b/tests/abis/0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994.abi.json similarity index 100% rename from tests/abis/0x5bdcf98a3C11A1f6aA9293DB0169C2C2539526A0.abi.json rename to tests/abis/0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994.abi.json diff --git a/tests/snapshots/nanos/test_add_unused_rewards/00000.png b/tests/snapshots/nanos/test_add_unused_rewards/00000.png new file mode 100644 index 00000000..8d84cc70 Binary files /dev/null and b/tests/snapshots/nanos/test_add_unused_rewards/00000.png differ diff --git a/tests/snapshots/nanos/test_add_unused_rewards/00001.png b/tests/snapshots/nanos/test_add_unused_rewards/00001.png new file mode 100644 index 00000000..6010f6e1 Binary files /dev/null and b/tests/snapshots/nanos/test_add_unused_rewards/00001.png differ diff --git a/tests/snapshots/nanos/test_add_unused_rewards/00002.png b/tests/snapshots/nanos/test_add_unused_rewards/00002.png new file mode 100644 index 00000000..5ce8f299 Binary files /dev/null and b/tests/snapshots/nanos/test_add_unused_rewards/00002.png differ diff --git a/tests/snapshots/nanos/test_add_unused_rewards/00003.png b/tests/snapshots/nanos/test_add_unused_rewards/00003.png new file mode 100644 index 00000000..b026553f Binary files /dev/null and b/tests/snapshots/nanos/test_add_unused_rewards/00003.png differ diff --git a/tests/snapshots/nanos/test_add_unused_rewards/00004.png b/tests/snapshots/nanos/test_add_unused_rewards/00004.png new file mode 100644 index 00000000..5cec7ef3 Binary files /dev/null and b/tests/snapshots/nanos/test_add_unused_rewards/00004.png differ diff --git a/tests/snapshots/nanos/test_add_unused_rewards/00005.png b/tests/snapshots/nanos/test_add_unused_rewards/00005.png new file mode 100644 index 00000000..96b0111e Binary files /dev/null and b/tests/snapshots/nanos/test_add_unused_rewards/00005.png differ diff --git a/tests/snapshots/nanos/test_add_unused_rewards/00006.png b/tests/snapshots/nanos/test_add_unused_rewards/00006.png new file mode 100644 index 00000000..1c9156c3 Binary files /dev/null and b/tests/snapshots/nanos/test_add_unused_rewards/00006.png differ diff --git a/tests/snapshots/nanos/test_add_unused_rewards/00007.png b/tests/snapshots/nanos/test_add_unused_rewards/00007.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/tests/snapshots/nanos/test_add_unused_rewards/00007.png differ diff --git a/tests/snapshots/nanos/test_claim_rewards/00000.png b/tests/snapshots/nanos/test_claim_rewards/00000.png new file mode 100644 index 00000000..8d84cc70 Binary files /dev/null and b/tests/snapshots/nanos/test_claim_rewards/00000.png differ diff --git a/tests/snapshots/nanos/test_claim_rewards/00001.png b/tests/snapshots/nanos/test_claim_rewards/00001.png new file mode 100644 index 00000000..1902cd12 Binary files /dev/null and b/tests/snapshots/nanos/test_claim_rewards/00001.png differ diff --git a/tests/snapshots/nanos/test_claim_rewards/00002.png b/tests/snapshots/nanos/test_claim_rewards/00002.png new file mode 100644 index 00000000..57a529e9 Binary files /dev/null and b/tests/snapshots/nanos/test_claim_rewards/00002.png differ diff --git a/tests/snapshots/nanos/test_claim_rewards/00003.png b/tests/snapshots/nanos/test_claim_rewards/00003.png new file mode 100644 index 00000000..33872b27 Binary files /dev/null and b/tests/snapshots/nanos/test_claim_rewards/00003.png differ diff --git a/tests/snapshots/nanos/test_claim_rewards/00004.png b/tests/snapshots/nanos/test_claim_rewards/00004.png new file mode 100644 index 00000000..423109ae Binary files /dev/null and b/tests/snapshots/nanos/test_claim_rewards/00004.png differ diff --git a/tests/snapshots/nanos/test_claim_rewards/00005.png b/tests/snapshots/nanos/test_claim_rewards/00005.png new file mode 100644 index 00000000..1c2eb34a Binary files /dev/null and b/tests/snapshots/nanos/test_claim_rewards/00005.png differ diff --git a/tests/snapshots/nanos/test_claim_rewards/00006.png b/tests/snapshots/nanos/test_claim_rewards/00006.png new file mode 100644 index 00000000..96b0111e Binary files /dev/null and b/tests/snapshots/nanos/test_claim_rewards/00006.png differ diff --git a/tests/snapshots/nanos/test_claim_rewards/00007.png b/tests/snapshots/nanos/test_claim_rewards/00007.png new file mode 100644 index 00000000..1c9156c3 Binary files /dev/null and b/tests/snapshots/nanos/test_claim_rewards/00007.png differ diff --git a/tests/snapshots/nanos/test_claim_rewards/00008.png b/tests/snapshots/nanos/test_claim_rewards/00008.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/tests/snapshots/nanos/test_claim_rewards/00008.png differ diff --git a/tests/snapshots/nanos/test_create_position/00000.png b/tests/snapshots/nanos/test_create_position/00000.png new file mode 100644 index 00000000..8d84cc70 Binary files /dev/null and b/tests/snapshots/nanos/test_create_position/00000.png differ diff --git a/tests/snapshots/nanos/test_create_position/00001.png b/tests/snapshots/nanos/test_create_position/00001.png new file mode 100644 index 00000000..228063e5 Binary files /dev/null and b/tests/snapshots/nanos/test_create_position/00001.png differ diff --git a/tests/snapshots/nanos/test_create_position/00002.png b/tests/snapshots/nanos/test_create_position/00002.png new file mode 100644 index 00000000..3e45e305 Binary files /dev/null and b/tests/snapshots/nanos/test_create_position/00002.png differ diff --git a/tests/snapshots/nanos/test_create_position/00003.png b/tests/snapshots/nanos/test_create_position/00003.png new file mode 100644 index 00000000..6e650f7a Binary files /dev/null and b/tests/snapshots/nanos/test_create_position/00003.png differ diff --git a/tests/snapshots/nanos/test_create_position/00004.png b/tests/snapshots/nanos/test_create_position/00004.png new file mode 100644 index 00000000..2479d3a0 Binary files /dev/null and b/tests/snapshots/nanos/test_create_position/00004.png differ diff --git a/tests/snapshots/nanos/test_create_position/00005.png b/tests/snapshots/nanos/test_create_position/00005.png new file mode 100644 index 00000000..9c2f097a Binary files /dev/null and b/tests/snapshots/nanos/test_create_position/00005.png differ diff --git a/tests/snapshots/nanos/test_create_position/00006.png b/tests/snapshots/nanos/test_create_position/00006.png new file mode 100644 index 00000000..96b0111e Binary files /dev/null and b/tests/snapshots/nanos/test_create_position/00006.png differ diff --git a/tests/snapshots/nanos/test_create_position/00007.png b/tests/snapshots/nanos/test_create_position/00007.png new file mode 100644 index 00000000..1c9156c3 Binary files /dev/null and b/tests/snapshots/nanos/test_create_position/00007.png differ diff --git a/tests/snapshots/nanos/test_create_position/00008.png b/tests/snapshots/nanos/test_create_position/00008.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/tests/snapshots/nanos/test_create_position/00008.png differ diff --git a/tests/snapshots/nanos/test_delete_positions/00000.png b/tests/snapshots/nanos/test_delete_positions/00000.png new file mode 100644 index 00000000..8d84cc70 Binary files /dev/null and b/tests/snapshots/nanos/test_delete_positions/00000.png differ diff --git a/tests/snapshots/nanos/test_delete_positions/00001.png b/tests/snapshots/nanos/test_delete_positions/00001.png new file mode 100644 index 00000000..a2404f79 Binary files /dev/null and b/tests/snapshots/nanos/test_delete_positions/00001.png differ diff --git a/tests/snapshots/nanos/test_delete_positions/00002.png b/tests/snapshots/nanos/test_delete_positions/00002.png new file mode 100644 index 00000000..cdd45ae8 Binary files /dev/null and b/tests/snapshots/nanos/test_delete_positions/00002.png differ diff --git a/tests/snapshots/nanos/test_delete_positions/00003.png b/tests/snapshots/nanos/test_delete_positions/00003.png new file mode 100644 index 00000000..d58840d0 Binary files /dev/null and b/tests/snapshots/nanos/test_delete_positions/00003.png differ diff --git a/tests/snapshots/nanos/test_delete_positions/00004.png b/tests/snapshots/nanos/test_delete_positions/00004.png new file mode 100644 index 00000000..a68676e4 Binary files /dev/null and b/tests/snapshots/nanos/test_delete_positions/00004.png differ diff --git a/tests/snapshots/nanos/test_delete_positions/00005.png b/tests/snapshots/nanos/test_delete_positions/00005.png new file mode 100644 index 00000000..b6e2260a Binary files /dev/null and b/tests/snapshots/nanos/test_delete_positions/00005.png differ diff --git a/tests/snapshots/nanos/test_delete_positions/00006.png b/tests/snapshots/nanos/test_delete_positions/00006.png new file mode 100644 index 00000000..96b0111e Binary files /dev/null and b/tests/snapshots/nanos/test_delete_positions/00006.png differ diff --git a/tests/snapshots/nanos/test_delete_positions/00007.png b/tests/snapshots/nanos/test_delete_positions/00007.png new file mode 100644 index 00000000..1c9156c3 Binary files /dev/null and b/tests/snapshots/nanos/test_delete_positions/00007.png differ diff --git a/tests/snapshots/nanos/test_delete_positions/00008.png b/tests/snapshots/nanos/test_delete_positions/00008.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/tests/snapshots/nanos/test_delete_positions/00008.png differ diff --git a/tests/snapshots/nanos/test_extend_duration/00000.png b/tests/snapshots/nanos/test_extend_duration/00000.png new file mode 100644 index 00000000..8d84cc70 Binary files /dev/null and b/tests/snapshots/nanos/test_extend_duration/00000.png differ diff --git a/tests/snapshots/nanos/test_extend_duration/00001.png b/tests/snapshots/nanos/test_extend_duration/00001.png new file mode 100644 index 00000000..4868f94e Binary files /dev/null and b/tests/snapshots/nanos/test_extend_duration/00001.png differ diff --git a/tests/snapshots/nanos/test_extend_duration/00002.png b/tests/snapshots/nanos/test_extend_duration/00002.png new file mode 100644 index 00000000..b30181cf Binary files /dev/null and b/tests/snapshots/nanos/test_extend_duration/00002.png differ diff --git a/tests/snapshots/nanos/test_extend_duration/00003.png b/tests/snapshots/nanos/test_extend_duration/00003.png new file mode 100644 index 00000000..01212b1a Binary files /dev/null and b/tests/snapshots/nanos/test_extend_duration/00003.png differ diff --git a/tests/snapshots/nanos/test_extend_duration/00004.png b/tests/snapshots/nanos/test_extend_duration/00004.png new file mode 100644 index 00000000..40d9e512 Binary files /dev/null and b/tests/snapshots/nanos/test_extend_duration/00004.png differ diff --git a/tests/snapshots/nanos/test_extend_duration/00005.png b/tests/snapshots/nanos/test_extend_duration/00005.png new file mode 100644 index 00000000..e039c8e9 Binary files /dev/null and b/tests/snapshots/nanos/test_extend_duration/00005.png differ diff --git a/tests/snapshots/nanos/test_extend_duration/00006.png b/tests/snapshots/nanos/test_extend_duration/00006.png new file mode 100644 index 00000000..96b0111e Binary files /dev/null and b/tests/snapshots/nanos/test_extend_duration/00006.png differ diff --git a/tests/snapshots/nanos/test_extend_duration/00007.png b/tests/snapshots/nanos/test_extend_duration/00007.png new file mode 100644 index 00000000..1c9156c3 Binary files /dev/null and b/tests/snapshots/nanos/test_extend_duration/00007.png differ diff --git a/tests/snapshots/nanos/test_extend_duration/00008.png b/tests/snapshots/nanos/test_extend_duration/00008.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/tests/snapshots/nanos/test_extend_duration/00008.png differ diff --git a/tests/snapshots/nanos/test_fund_staking_rewards/00000.png b/tests/snapshots/nanos/test_fund_staking_rewards/00000.png new file mode 100644 index 00000000..8d84cc70 Binary files /dev/null and b/tests/snapshots/nanos/test_fund_staking_rewards/00000.png differ diff --git a/tests/snapshots/nanos/test_fund_staking_rewards/00001.png b/tests/snapshots/nanos/test_fund_staking_rewards/00001.png new file mode 100644 index 00000000..4d97770c Binary files /dev/null and b/tests/snapshots/nanos/test_fund_staking_rewards/00001.png differ diff --git a/tests/snapshots/nanos/test_fund_staking_rewards/00002.png b/tests/snapshots/nanos/test_fund_staking_rewards/00002.png new file mode 100644 index 00000000..ca79ee3c Binary files /dev/null and b/tests/snapshots/nanos/test_fund_staking_rewards/00002.png differ diff --git a/tests/snapshots/nanos/test_fund_staking_rewards/00003.png b/tests/snapshots/nanos/test_fund_staking_rewards/00003.png new file mode 100644 index 00000000..51340883 Binary files /dev/null and b/tests/snapshots/nanos/test_fund_staking_rewards/00003.png differ diff --git a/tests/snapshots/nanos/test_fund_staking_rewards/00004.png b/tests/snapshots/nanos/test_fund_staking_rewards/00004.png new file mode 100644 index 00000000..05e807fa Binary files /dev/null and b/tests/snapshots/nanos/test_fund_staking_rewards/00004.png differ diff --git a/tests/snapshots/nanos/test_fund_staking_rewards/00005.png b/tests/snapshots/nanos/test_fund_staking_rewards/00005.png new file mode 100644 index 00000000..c4034f6d Binary files /dev/null and b/tests/snapshots/nanos/test_fund_staking_rewards/00005.png differ diff --git a/tests/snapshots/nanos/test_fund_staking_rewards/00006.png b/tests/snapshots/nanos/test_fund_staking_rewards/00006.png new file mode 100644 index 00000000..96b0111e Binary files /dev/null and b/tests/snapshots/nanos/test_fund_staking_rewards/00006.png differ diff --git a/tests/snapshots/nanos/test_fund_staking_rewards/00007.png b/tests/snapshots/nanos/test_fund_staking_rewards/00007.png new file mode 100644 index 00000000..1c9156c3 Binary files /dev/null and b/tests/snapshots/nanos/test_fund_staking_rewards/00007.png differ diff --git a/tests/snapshots/nanos/test_fund_staking_rewards/00008.png b/tests/snapshots/nanos/test_fund_staking_rewards/00008.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/tests/snapshots/nanos/test_fund_staking_rewards/00008.png differ diff --git a/tests/snapshots/nanos/test_increase_locking_amount/00000.png b/tests/snapshots/nanos/test_increase_locking_amount/00000.png new file mode 100644 index 00000000..8d84cc70 Binary files /dev/null and b/tests/snapshots/nanos/test_increase_locking_amount/00000.png differ diff --git a/tests/snapshots/nanos/test_increase_locking_amount/00001.png b/tests/snapshots/nanos/test_increase_locking_amount/00001.png new file mode 100644 index 00000000..f6161cde Binary files /dev/null and b/tests/snapshots/nanos/test_increase_locking_amount/00001.png differ diff --git a/tests/snapshots/nanos/test_increase_locking_amount/00002.png b/tests/snapshots/nanos/test_increase_locking_amount/00002.png new file mode 100644 index 00000000..b30181cf Binary files /dev/null and b/tests/snapshots/nanos/test_increase_locking_amount/00002.png differ diff --git a/tests/snapshots/nanos/test_increase_locking_amount/00003.png b/tests/snapshots/nanos/test_increase_locking_amount/00003.png new file mode 100644 index 00000000..b5e61c59 Binary files /dev/null and b/tests/snapshots/nanos/test_increase_locking_amount/00003.png differ diff --git a/tests/snapshots/nanos/test_increase_locking_amount/00004.png b/tests/snapshots/nanos/test_increase_locking_amount/00004.png new file mode 100644 index 00000000..40d9e512 Binary files /dev/null and b/tests/snapshots/nanos/test_increase_locking_amount/00004.png differ diff --git a/tests/snapshots/nanos/test_increase_locking_amount/00005.png b/tests/snapshots/nanos/test_increase_locking_amount/00005.png new file mode 100644 index 00000000..d5960b22 Binary files /dev/null and b/tests/snapshots/nanos/test_increase_locking_amount/00005.png differ diff --git a/tests/snapshots/nanos/test_increase_locking_amount/00006.png b/tests/snapshots/nanos/test_increase_locking_amount/00006.png new file mode 100644 index 00000000..96b0111e Binary files /dev/null and b/tests/snapshots/nanos/test_increase_locking_amount/00006.png differ diff --git a/tests/snapshots/nanos/test_increase_locking_amount/00007.png b/tests/snapshots/nanos/test_increase_locking_amount/00007.png new file mode 100644 index 00000000..1c9156c3 Binary files /dev/null and b/tests/snapshots/nanos/test_increase_locking_amount/00007.png differ diff --git a/tests/snapshots/nanos/test_increase_locking_amount/00008.png b/tests/snapshots/nanos/test_increase_locking_amount/00008.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/tests/snapshots/nanos/test_increase_locking_amount/00008.png differ diff --git a/tests/snapshots/nanos/test_initiate_fast_unlock/00000.png b/tests/snapshots/nanos/test_initiate_fast_unlock/00000.png new file mode 100644 index 00000000..8d84cc70 Binary files /dev/null and b/tests/snapshots/nanos/test_initiate_fast_unlock/00000.png differ diff --git a/tests/snapshots/nanos/test_initiate_fast_unlock/00001.png b/tests/snapshots/nanos/test_initiate_fast_unlock/00001.png new file mode 100644 index 00000000..c295dd11 Binary files /dev/null and b/tests/snapshots/nanos/test_initiate_fast_unlock/00001.png differ diff --git a/tests/snapshots/nanos/test_initiate_fast_unlock/00002.png b/tests/snapshots/nanos/test_initiate_fast_unlock/00002.png new file mode 100644 index 00000000..57a529e9 Binary files /dev/null and b/tests/snapshots/nanos/test_initiate_fast_unlock/00002.png differ diff --git a/tests/snapshots/nanos/test_initiate_fast_unlock/00003.png b/tests/snapshots/nanos/test_initiate_fast_unlock/00003.png new file mode 100644 index 00000000..33872b27 Binary files /dev/null and b/tests/snapshots/nanos/test_initiate_fast_unlock/00003.png differ diff --git a/tests/snapshots/nanos/test_initiate_fast_unlock/00004.png b/tests/snapshots/nanos/test_initiate_fast_unlock/00004.png new file mode 100644 index 00000000..423109ae Binary files /dev/null and b/tests/snapshots/nanos/test_initiate_fast_unlock/00004.png differ diff --git a/tests/snapshots/nanos/test_initiate_fast_unlock/00005.png b/tests/snapshots/nanos/test_initiate_fast_unlock/00005.png new file mode 100644 index 00000000..1c2eb34a Binary files /dev/null and b/tests/snapshots/nanos/test_initiate_fast_unlock/00005.png differ diff --git a/tests/snapshots/nanos/test_initiate_fast_unlock/00006.png b/tests/snapshots/nanos/test_initiate_fast_unlock/00006.png new file mode 100644 index 00000000..96b0111e Binary files /dev/null and b/tests/snapshots/nanos/test_initiate_fast_unlock/00006.png differ diff --git a/tests/snapshots/nanos/test_initiate_fast_unlock/00007.png b/tests/snapshots/nanos/test_initiate_fast_unlock/00007.png new file mode 100644 index 00000000..1c9156c3 Binary files /dev/null and b/tests/snapshots/nanos/test_initiate_fast_unlock/00007.png differ diff --git a/tests/snapshots/nanos/test_initiate_fast_unlock/00008.png b/tests/snapshots/nanos/test_initiate_fast_unlock/00008.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/tests/snapshots/nanos/test_initiate_fast_unlock/00008.png differ diff --git a/tests/snapshots/nanos/test_pause_unlocking/00000.png b/tests/snapshots/nanos/test_pause_unlocking/00000.png new file mode 100644 index 00000000..8d84cc70 Binary files /dev/null and b/tests/snapshots/nanos/test_pause_unlocking/00000.png differ diff --git a/tests/snapshots/nanos/test_pause_unlocking/00001.png b/tests/snapshots/nanos/test_pause_unlocking/00001.png new file mode 100644 index 00000000..4ece85ce Binary files /dev/null and b/tests/snapshots/nanos/test_pause_unlocking/00001.png differ diff --git a/tests/snapshots/nanos/test_pause_unlocking/00002.png b/tests/snapshots/nanos/test_pause_unlocking/00002.png new file mode 100644 index 00000000..57a529e9 Binary files /dev/null and b/tests/snapshots/nanos/test_pause_unlocking/00002.png differ diff --git a/tests/snapshots/nanos/test_pause_unlocking/00003.png b/tests/snapshots/nanos/test_pause_unlocking/00003.png new file mode 100644 index 00000000..33872b27 Binary files /dev/null and b/tests/snapshots/nanos/test_pause_unlocking/00003.png differ diff --git a/tests/snapshots/nanos/test_pause_unlocking/00004.png b/tests/snapshots/nanos/test_pause_unlocking/00004.png new file mode 100644 index 00000000..423109ae Binary files /dev/null and b/tests/snapshots/nanos/test_pause_unlocking/00004.png differ diff --git a/tests/snapshots/nanos/test_pause_unlocking/00005.png b/tests/snapshots/nanos/test_pause_unlocking/00005.png new file mode 100644 index 00000000..1c2eb34a Binary files /dev/null and b/tests/snapshots/nanos/test_pause_unlocking/00005.png differ diff --git a/tests/snapshots/nanos/test_pause_unlocking/00006.png b/tests/snapshots/nanos/test_pause_unlocking/00006.png new file mode 100644 index 00000000..96b0111e Binary files /dev/null and b/tests/snapshots/nanos/test_pause_unlocking/00006.png differ diff --git a/tests/snapshots/nanos/test_pause_unlocking/00007.png b/tests/snapshots/nanos/test_pause_unlocking/00007.png new file mode 100644 index 00000000..1c9156c3 Binary files /dev/null and b/tests/snapshots/nanos/test_pause_unlocking/00007.png differ diff --git a/tests/snapshots/nanos/test_pause_unlocking/00008.png b/tests/snapshots/nanos/test_pause_unlocking/00008.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/tests/snapshots/nanos/test_pause_unlocking/00008.png differ diff --git a/tests/snapshots/nanos/test_resume_unlocking/00000.png b/tests/snapshots/nanos/test_resume_unlocking/00000.png new file mode 100644 index 00000000..8d84cc70 Binary files /dev/null and b/tests/snapshots/nanos/test_resume_unlocking/00000.png differ diff --git a/tests/snapshots/nanos/test_resume_unlocking/00001.png b/tests/snapshots/nanos/test_resume_unlocking/00001.png new file mode 100644 index 00000000..1a28073f Binary files /dev/null and b/tests/snapshots/nanos/test_resume_unlocking/00001.png differ diff --git a/tests/snapshots/nanos/test_resume_unlocking/00002.png b/tests/snapshots/nanos/test_resume_unlocking/00002.png new file mode 100644 index 00000000..57a529e9 Binary files /dev/null and b/tests/snapshots/nanos/test_resume_unlocking/00002.png differ diff --git a/tests/snapshots/nanos/test_resume_unlocking/00003.png b/tests/snapshots/nanos/test_resume_unlocking/00003.png new file mode 100644 index 00000000..33872b27 Binary files /dev/null and b/tests/snapshots/nanos/test_resume_unlocking/00003.png differ diff --git a/tests/snapshots/nanos/test_resume_unlocking/00004.png b/tests/snapshots/nanos/test_resume_unlocking/00004.png new file mode 100644 index 00000000..423109ae Binary files /dev/null and b/tests/snapshots/nanos/test_resume_unlocking/00004.png differ diff --git a/tests/snapshots/nanos/test_resume_unlocking/00005.png b/tests/snapshots/nanos/test_resume_unlocking/00005.png new file mode 100644 index 00000000..1c2eb34a Binary files /dev/null and b/tests/snapshots/nanos/test_resume_unlocking/00005.png differ diff --git a/tests/snapshots/nanos/test_resume_unlocking/00006.png b/tests/snapshots/nanos/test_resume_unlocking/00006.png new file mode 100644 index 00000000..96b0111e Binary files /dev/null and b/tests/snapshots/nanos/test_resume_unlocking/00006.png differ diff --git a/tests/snapshots/nanos/test_resume_unlocking/00007.png b/tests/snapshots/nanos/test_resume_unlocking/00007.png new file mode 100644 index 00000000..1c9156c3 Binary files /dev/null and b/tests/snapshots/nanos/test_resume_unlocking/00007.png differ diff --git a/tests/snapshots/nanos/test_resume_unlocking/00008.png b/tests/snapshots/nanos/test_resume_unlocking/00008.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/tests/snapshots/nanos/test_resume_unlocking/00008.png differ diff --git a/tests/snapshots/nanosp/test_add_unused_rewards/00000.png b/tests/snapshots/nanosp/test_add_unused_rewards/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanosp/test_add_unused_rewards/00000.png differ diff --git a/tests/snapshots/nanosp/test_add_unused_rewards/00001.png b/tests/snapshots/nanosp/test_add_unused_rewards/00001.png new file mode 100644 index 00000000..532a7e38 Binary files /dev/null and b/tests/snapshots/nanosp/test_add_unused_rewards/00001.png differ diff --git a/tests/snapshots/nanosp/test_add_unused_rewards/00002.png b/tests/snapshots/nanosp/test_add_unused_rewards/00002.png new file mode 100644 index 00000000..5c438e94 Binary files /dev/null and b/tests/snapshots/nanosp/test_add_unused_rewards/00002.png differ diff --git a/tests/snapshots/nanosp/test_add_unused_rewards/00003.png b/tests/snapshots/nanosp/test_add_unused_rewards/00003.png new file mode 100644 index 00000000..8a184cf5 Binary files /dev/null and b/tests/snapshots/nanosp/test_add_unused_rewards/00003.png differ diff --git a/tests/snapshots/nanosp/test_add_unused_rewards/00004.png b/tests/snapshots/nanosp/test_add_unused_rewards/00004.png new file mode 100644 index 00000000..5e8a0be2 Binary files /dev/null and b/tests/snapshots/nanosp/test_add_unused_rewards/00004.png differ diff --git a/tests/snapshots/nanosp/test_add_unused_rewards/00005.png b/tests/snapshots/nanosp/test_add_unused_rewards/00005.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanosp/test_add_unused_rewards/00005.png differ diff --git a/tests/snapshots/nanosp/test_add_unused_rewards/00006.png b/tests/snapshots/nanosp/test_add_unused_rewards/00006.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanosp/test_add_unused_rewards/00006.png differ diff --git a/tests/snapshots/nanosp/test_add_unused_rewards/00007.png b/tests/snapshots/nanosp/test_add_unused_rewards/00007.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanosp/test_add_unused_rewards/00007.png differ diff --git a/tests/snapshots/nanosp/test_claim_rewards/00000.png b/tests/snapshots/nanosp/test_claim_rewards/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanosp/test_claim_rewards/00000.png differ diff --git a/tests/snapshots/nanosp/test_claim_rewards/00001.png b/tests/snapshots/nanosp/test_claim_rewards/00001.png new file mode 100644 index 00000000..29876ccf Binary files /dev/null and b/tests/snapshots/nanosp/test_claim_rewards/00001.png differ diff --git a/tests/snapshots/nanosp/test_claim_rewards/00002.png b/tests/snapshots/nanosp/test_claim_rewards/00002.png new file mode 100644 index 00000000..09793dc9 Binary files /dev/null and b/tests/snapshots/nanosp/test_claim_rewards/00002.png differ diff --git a/tests/snapshots/nanosp/test_claim_rewards/00003.png b/tests/snapshots/nanosp/test_claim_rewards/00003.png new file mode 100644 index 00000000..4fc01a79 Binary files /dev/null and b/tests/snapshots/nanosp/test_claim_rewards/00003.png differ diff --git a/tests/snapshots/nanosp/test_claim_rewards/00004.png b/tests/snapshots/nanosp/test_claim_rewards/00004.png new file mode 100644 index 00000000..4df11113 Binary files /dev/null and b/tests/snapshots/nanosp/test_claim_rewards/00004.png differ diff --git a/tests/snapshots/nanosp/test_claim_rewards/00005.png b/tests/snapshots/nanosp/test_claim_rewards/00005.png new file mode 100644 index 00000000..32a3a14c Binary files /dev/null and b/tests/snapshots/nanosp/test_claim_rewards/00005.png differ diff --git a/tests/snapshots/nanosp/test_claim_rewards/00006.png b/tests/snapshots/nanosp/test_claim_rewards/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanosp/test_claim_rewards/00006.png differ diff --git a/tests/snapshots/nanosp/test_claim_rewards/00007.png b/tests/snapshots/nanosp/test_claim_rewards/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanosp/test_claim_rewards/00007.png differ diff --git a/tests/snapshots/nanosp/test_claim_rewards/00008.png b/tests/snapshots/nanosp/test_claim_rewards/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanosp/test_claim_rewards/00008.png differ diff --git a/tests/snapshots/nanosp/test_create_position/00000.png b/tests/snapshots/nanosp/test_create_position/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanosp/test_create_position/00000.png differ diff --git a/tests/snapshots/nanosp/test_create_position/00001.png b/tests/snapshots/nanosp/test_create_position/00001.png new file mode 100644 index 00000000..46eb0d53 Binary files /dev/null and b/tests/snapshots/nanosp/test_create_position/00001.png differ diff --git a/tests/snapshots/nanosp/test_create_position/00002.png b/tests/snapshots/nanosp/test_create_position/00002.png new file mode 100644 index 00000000..2904611f Binary files /dev/null and b/tests/snapshots/nanosp/test_create_position/00002.png differ diff --git a/tests/snapshots/nanosp/test_create_position/00003.png b/tests/snapshots/nanosp/test_create_position/00003.png new file mode 100644 index 00000000..b913a720 Binary files /dev/null and b/tests/snapshots/nanosp/test_create_position/00003.png differ diff --git a/tests/snapshots/nanosp/test_create_position/00004.png b/tests/snapshots/nanosp/test_create_position/00004.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanosp/test_create_position/00004.png differ diff --git a/tests/snapshots/nanosp/test_create_position/00005.png b/tests/snapshots/nanosp/test_create_position/00005.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanosp/test_create_position/00005.png differ diff --git a/tests/snapshots/nanosp/test_create_position/00006.png b/tests/snapshots/nanosp/test_create_position/00006.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanosp/test_create_position/00006.png differ diff --git a/tests/snapshots/nanosp/test_delete_positions/00000.png b/tests/snapshots/nanosp/test_delete_positions/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanosp/test_delete_positions/00000.png differ diff --git a/tests/snapshots/nanosp/test_delete_positions/00001.png b/tests/snapshots/nanosp/test_delete_positions/00001.png new file mode 100644 index 00000000..b088a17d Binary files /dev/null and b/tests/snapshots/nanosp/test_delete_positions/00001.png differ diff --git a/tests/snapshots/nanosp/test_delete_positions/00002.png b/tests/snapshots/nanosp/test_delete_positions/00002.png new file mode 100644 index 00000000..59c085b9 Binary files /dev/null and b/tests/snapshots/nanosp/test_delete_positions/00002.png differ diff --git a/tests/snapshots/nanosp/test_delete_positions/00003.png b/tests/snapshots/nanosp/test_delete_positions/00003.png new file mode 100644 index 00000000..b8de133b Binary files /dev/null and b/tests/snapshots/nanosp/test_delete_positions/00003.png differ diff --git a/tests/snapshots/nanosp/test_delete_positions/00004.png b/tests/snapshots/nanosp/test_delete_positions/00004.png new file mode 100644 index 00000000..c17d1ae8 Binary files /dev/null and b/tests/snapshots/nanosp/test_delete_positions/00004.png differ diff --git a/tests/snapshots/nanosp/test_delete_positions/00005.png b/tests/snapshots/nanosp/test_delete_positions/00005.png new file mode 100644 index 00000000..edcd727b Binary files /dev/null and b/tests/snapshots/nanosp/test_delete_positions/00005.png differ diff --git a/tests/snapshots/nanosp/test_delete_positions/00006.png b/tests/snapshots/nanosp/test_delete_positions/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanosp/test_delete_positions/00006.png differ diff --git a/tests/snapshots/nanosp/test_delete_positions/00007.png b/tests/snapshots/nanosp/test_delete_positions/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanosp/test_delete_positions/00007.png differ diff --git a/tests/snapshots/nanosp/test_delete_positions/00008.png b/tests/snapshots/nanosp/test_delete_positions/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanosp/test_delete_positions/00008.png differ diff --git a/tests/snapshots/nanosp/test_extend_duration/00000.png b/tests/snapshots/nanosp/test_extend_duration/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanosp/test_extend_duration/00000.png differ diff --git a/tests/snapshots/nanosp/test_extend_duration/00001.png b/tests/snapshots/nanosp/test_extend_duration/00001.png new file mode 100644 index 00000000..61e0d678 Binary files /dev/null and b/tests/snapshots/nanosp/test_extend_duration/00001.png differ diff --git a/tests/snapshots/nanosp/test_extend_duration/00002.png b/tests/snapshots/nanosp/test_extend_duration/00002.png new file mode 100644 index 00000000..17211cc0 Binary files /dev/null and b/tests/snapshots/nanosp/test_extend_duration/00002.png differ diff --git a/tests/snapshots/nanosp/test_extend_duration/00003.png b/tests/snapshots/nanosp/test_extend_duration/00003.png new file mode 100644 index 00000000..6543b847 Binary files /dev/null and b/tests/snapshots/nanosp/test_extend_duration/00003.png differ diff --git a/tests/snapshots/nanosp/test_extend_duration/00004.png b/tests/snapshots/nanosp/test_extend_duration/00004.png new file mode 100644 index 00000000..aa331e43 Binary files /dev/null and b/tests/snapshots/nanosp/test_extend_duration/00004.png differ diff --git a/tests/snapshots/nanosp/test_extend_duration/00005.png b/tests/snapshots/nanosp/test_extend_duration/00005.png new file mode 100644 index 00000000..a3479e33 Binary files /dev/null and b/tests/snapshots/nanosp/test_extend_duration/00005.png differ diff --git a/tests/snapshots/nanosp/test_extend_duration/00006.png b/tests/snapshots/nanosp/test_extend_duration/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanosp/test_extend_duration/00006.png differ diff --git a/tests/snapshots/nanosp/test_extend_duration/00007.png b/tests/snapshots/nanosp/test_extend_duration/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanosp/test_extend_duration/00007.png differ diff --git a/tests/snapshots/nanosp/test_extend_duration/00008.png b/tests/snapshots/nanosp/test_extend_duration/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanosp/test_extend_duration/00008.png differ diff --git a/tests/snapshots/nanosp/test_fund_staking_rewards/00000.png b/tests/snapshots/nanosp/test_fund_staking_rewards/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanosp/test_fund_staking_rewards/00000.png differ diff --git a/tests/snapshots/nanosp/test_fund_staking_rewards/00001.png b/tests/snapshots/nanosp/test_fund_staking_rewards/00001.png new file mode 100644 index 00000000..481513cb Binary files /dev/null and b/tests/snapshots/nanosp/test_fund_staking_rewards/00001.png differ diff --git a/tests/snapshots/nanosp/test_fund_staking_rewards/00002.png b/tests/snapshots/nanosp/test_fund_staking_rewards/00002.png new file mode 100644 index 00000000..37575b85 Binary files /dev/null and b/tests/snapshots/nanosp/test_fund_staking_rewards/00002.png differ diff --git a/tests/snapshots/nanosp/test_fund_staking_rewards/00003.png b/tests/snapshots/nanosp/test_fund_staking_rewards/00003.png new file mode 100644 index 00000000..7c3b816b Binary files /dev/null and b/tests/snapshots/nanosp/test_fund_staking_rewards/00003.png differ diff --git a/tests/snapshots/nanosp/test_fund_staking_rewards/00004.png b/tests/snapshots/nanosp/test_fund_staking_rewards/00004.png new file mode 100644 index 00000000..3fe7bfe9 Binary files /dev/null and b/tests/snapshots/nanosp/test_fund_staking_rewards/00004.png differ diff --git a/tests/snapshots/nanosp/test_fund_staking_rewards/00005.png b/tests/snapshots/nanosp/test_fund_staking_rewards/00005.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanosp/test_fund_staking_rewards/00005.png differ diff --git a/tests/snapshots/nanosp/test_fund_staking_rewards/00006.png b/tests/snapshots/nanosp/test_fund_staking_rewards/00006.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanosp/test_fund_staking_rewards/00006.png differ diff --git a/tests/snapshots/nanosp/test_fund_staking_rewards/00007.png b/tests/snapshots/nanosp/test_fund_staking_rewards/00007.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanosp/test_fund_staking_rewards/00007.png differ diff --git a/tests/snapshots/nanosp/test_increase_locking_amount/00000.png b/tests/snapshots/nanosp/test_increase_locking_amount/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanosp/test_increase_locking_amount/00000.png differ diff --git a/tests/snapshots/nanosp/test_increase_locking_amount/00001.png b/tests/snapshots/nanosp/test_increase_locking_amount/00001.png new file mode 100644 index 00000000..f743a805 Binary files /dev/null and b/tests/snapshots/nanosp/test_increase_locking_amount/00001.png differ diff --git a/tests/snapshots/nanosp/test_increase_locking_amount/00002.png b/tests/snapshots/nanosp/test_increase_locking_amount/00002.png new file mode 100644 index 00000000..17211cc0 Binary files /dev/null and b/tests/snapshots/nanosp/test_increase_locking_amount/00002.png differ diff --git a/tests/snapshots/nanosp/test_increase_locking_amount/00003.png b/tests/snapshots/nanosp/test_increase_locking_amount/00003.png new file mode 100644 index 00000000..e2558068 Binary files /dev/null and b/tests/snapshots/nanosp/test_increase_locking_amount/00003.png differ diff --git a/tests/snapshots/nanosp/test_increase_locking_amount/00004.png b/tests/snapshots/nanosp/test_increase_locking_amount/00004.png new file mode 100644 index 00000000..aa331e43 Binary files /dev/null and b/tests/snapshots/nanosp/test_increase_locking_amount/00004.png differ diff --git a/tests/snapshots/nanosp/test_increase_locking_amount/00005.png b/tests/snapshots/nanosp/test_increase_locking_amount/00005.png new file mode 100644 index 00000000..bc7152d6 Binary files /dev/null and b/tests/snapshots/nanosp/test_increase_locking_amount/00005.png differ diff --git a/tests/snapshots/nanosp/test_increase_locking_amount/00006.png b/tests/snapshots/nanosp/test_increase_locking_amount/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanosp/test_increase_locking_amount/00006.png differ diff --git a/tests/snapshots/nanosp/test_increase_locking_amount/00007.png b/tests/snapshots/nanosp/test_increase_locking_amount/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanosp/test_increase_locking_amount/00007.png differ diff --git a/tests/snapshots/nanosp/test_increase_locking_amount/00008.png b/tests/snapshots/nanosp/test_increase_locking_amount/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanosp/test_increase_locking_amount/00008.png differ diff --git a/tests/snapshots/nanosp/test_initiate_fast_unlock/00000.png b/tests/snapshots/nanosp/test_initiate_fast_unlock/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanosp/test_initiate_fast_unlock/00000.png differ diff --git a/tests/snapshots/nanosp/test_initiate_fast_unlock/00001.png b/tests/snapshots/nanosp/test_initiate_fast_unlock/00001.png new file mode 100644 index 00000000..0fc651ff Binary files /dev/null and b/tests/snapshots/nanosp/test_initiate_fast_unlock/00001.png differ diff --git a/tests/snapshots/nanosp/test_initiate_fast_unlock/00002.png b/tests/snapshots/nanosp/test_initiate_fast_unlock/00002.png new file mode 100644 index 00000000..09793dc9 Binary files /dev/null and b/tests/snapshots/nanosp/test_initiate_fast_unlock/00002.png differ diff --git a/tests/snapshots/nanosp/test_initiate_fast_unlock/00003.png b/tests/snapshots/nanosp/test_initiate_fast_unlock/00003.png new file mode 100644 index 00000000..4fc01a79 Binary files /dev/null and b/tests/snapshots/nanosp/test_initiate_fast_unlock/00003.png differ diff --git a/tests/snapshots/nanosp/test_initiate_fast_unlock/00004.png b/tests/snapshots/nanosp/test_initiate_fast_unlock/00004.png new file mode 100644 index 00000000..4df11113 Binary files /dev/null and b/tests/snapshots/nanosp/test_initiate_fast_unlock/00004.png differ diff --git a/tests/snapshots/nanosp/test_initiate_fast_unlock/00005.png b/tests/snapshots/nanosp/test_initiate_fast_unlock/00005.png new file mode 100644 index 00000000..32a3a14c Binary files /dev/null and b/tests/snapshots/nanosp/test_initiate_fast_unlock/00005.png differ diff --git a/tests/snapshots/nanosp/test_initiate_fast_unlock/00006.png b/tests/snapshots/nanosp/test_initiate_fast_unlock/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanosp/test_initiate_fast_unlock/00006.png differ diff --git a/tests/snapshots/nanosp/test_initiate_fast_unlock/00007.png b/tests/snapshots/nanosp/test_initiate_fast_unlock/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanosp/test_initiate_fast_unlock/00007.png differ diff --git a/tests/snapshots/nanosp/test_initiate_fast_unlock/00008.png b/tests/snapshots/nanosp/test_initiate_fast_unlock/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanosp/test_initiate_fast_unlock/00008.png differ diff --git a/tests/snapshots/nanosp/test_pause_unlocking/00000.png b/tests/snapshots/nanosp/test_pause_unlocking/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanosp/test_pause_unlocking/00000.png differ diff --git a/tests/snapshots/nanosp/test_pause_unlocking/00001.png b/tests/snapshots/nanosp/test_pause_unlocking/00001.png new file mode 100644 index 00000000..406557af Binary files /dev/null and b/tests/snapshots/nanosp/test_pause_unlocking/00001.png differ diff --git a/tests/snapshots/nanosp/test_pause_unlocking/00002.png b/tests/snapshots/nanosp/test_pause_unlocking/00002.png new file mode 100644 index 00000000..09793dc9 Binary files /dev/null and b/tests/snapshots/nanosp/test_pause_unlocking/00002.png differ diff --git a/tests/snapshots/nanosp/test_pause_unlocking/00003.png b/tests/snapshots/nanosp/test_pause_unlocking/00003.png new file mode 100644 index 00000000..4fc01a79 Binary files /dev/null and b/tests/snapshots/nanosp/test_pause_unlocking/00003.png differ diff --git a/tests/snapshots/nanosp/test_pause_unlocking/00004.png b/tests/snapshots/nanosp/test_pause_unlocking/00004.png new file mode 100644 index 00000000..4df11113 Binary files /dev/null and b/tests/snapshots/nanosp/test_pause_unlocking/00004.png differ diff --git a/tests/snapshots/nanosp/test_pause_unlocking/00005.png b/tests/snapshots/nanosp/test_pause_unlocking/00005.png new file mode 100644 index 00000000..32a3a14c Binary files /dev/null and b/tests/snapshots/nanosp/test_pause_unlocking/00005.png differ diff --git a/tests/snapshots/nanosp/test_pause_unlocking/00006.png b/tests/snapshots/nanosp/test_pause_unlocking/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanosp/test_pause_unlocking/00006.png differ diff --git a/tests/snapshots/nanosp/test_pause_unlocking/00007.png b/tests/snapshots/nanosp/test_pause_unlocking/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanosp/test_pause_unlocking/00007.png differ diff --git a/tests/snapshots/nanosp/test_pause_unlocking/00008.png b/tests/snapshots/nanosp/test_pause_unlocking/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanosp/test_pause_unlocking/00008.png differ diff --git a/tests/snapshots/nanosp/test_resume_unlocking/00000.png b/tests/snapshots/nanosp/test_resume_unlocking/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanosp/test_resume_unlocking/00000.png differ diff --git a/tests/snapshots/nanosp/test_resume_unlocking/00001.png b/tests/snapshots/nanosp/test_resume_unlocking/00001.png new file mode 100644 index 00000000..a176905f Binary files /dev/null and b/tests/snapshots/nanosp/test_resume_unlocking/00001.png differ diff --git a/tests/snapshots/nanosp/test_resume_unlocking/00002.png b/tests/snapshots/nanosp/test_resume_unlocking/00002.png new file mode 100644 index 00000000..09793dc9 Binary files /dev/null and b/tests/snapshots/nanosp/test_resume_unlocking/00002.png differ diff --git a/tests/snapshots/nanosp/test_resume_unlocking/00003.png b/tests/snapshots/nanosp/test_resume_unlocking/00003.png new file mode 100644 index 00000000..4fc01a79 Binary files /dev/null and b/tests/snapshots/nanosp/test_resume_unlocking/00003.png differ diff --git a/tests/snapshots/nanosp/test_resume_unlocking/00004.png b/tests/snapshots/nanosp/test_resume_unlocking/00004.png new file mode 100644 index 00000000..4df11113 Binary files /dev/null and b/tests/snapshots/nanosp/test_resume_unlocking/00004.png differ diff --git a/tests/snapshots/nanosp/test_resume_unlocking/00005.png b/tests/snapshots/nanosp/test_resume_unlocking/00005.png new file mode 100644 index 00000000..32a3a14c Binary files /dev/null and b/tests/snapshots/nanosp/test_resume_unlocking/00005.png differ diff --git a/tests/snapshots/nanosp/test_resume_unlocking/00006.png b/tests/snapshots/nanosp/test_resume_unlocking/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanosp/test_resume_unlocking/00006.png differ diff --git a/tests/snapshots/nanosp/test_resume_unlocking/00007.png b/tests/snapshots/nanosp/test_resume_unlocking/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanosp/test_resume_unlocking/00007.png differ diff --git a/tests/snapshots/nanosp/test_resume_unlocking/00008.png b/tests/snapshots/nanosp/test_resume_unlocking/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanosp/test_resume_unlocking/00008.png differ diff --git a/tests/snapshots/nanox/test_add_unused_rewards/00000.png b/tests/snapshots/nanox/test_add_unused_rewards/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanox/test_add_unused_rewards/00000.png differ diff --git a/tests/snapshots/nanox/test_add_unused_rewards/00001.png b/tests/snapshots/nanox/test_add_unused_rewards/00001.png new file mode 100644 index 00000000..532a7e38 Binary files /dev/null and b/tests/snapshots/nanox/test_add_unused_rewards/00001.png differ diff --git a/tests/snapshots/nanox/test_add_unused_rewards/00002.png b/tests/snapshots/nanox/test_add_unused_rewards/00002.png new file mode 100644 index 00000000..5c438e94 Binary files /dev/null and b/tests/snapshots/nanox/test_add_unused_rewards/00002.png differ diff --git a/tests/snapshots/nanox/test_add_unused_rewards/00003.png b/tests/snapshots/nanox/test_add_unused_rewards/00003.png new file mode 100644 index 00000000..8a184cf5 Binary files /dev/null and b/tests/snapshots/nanox/test_add_unused_rewards/00003.png differ diff --git a/tests/snapshots/nanox/test_add_unused_rewards/00004.png b/tests/snapshots/nanox/test_add_unused_rewards/00004.png new file mode 100644 index 00000000..5e8a0be2 Binary files /dev/null and b/tests/snapshots/nanox/test_add_unused_rewards/00004.png differ diff --git a/tests/snapshots/nanox/test_add_unused_rewards/00005.png b/tests/snapshots/nanox/test_add_unused_rewards/00005.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanox/test_add_unused_rewards/00005.png differ diff --git a/tests/snapshots/nanox/test_add_unused_rewards/00006.png b/tests/snapshots/nanox/test_add_unused_rewards/00006.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanox/test_add_unused_rewards/00006.png differ diff --git a/tests/snapshots/nanox/test_add_unused_rewards/00007.png b/tests/snapshots/nanox/test_add_unused_rewards/00007.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanox/test_add_unused_rewards/00007.png differ diff --git a/tests/snapshots/nanox/test_claim_rewards/00000.png b/tests/snapshots/nanox/test_claim_rewards/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanox/test_claim_rewards/00000.png differ diff --git a/tests/snapshots/nanox/test_claim_rewards/00001.png b/tests/snapshots/nanox/test_claim_rewards/00001.png new file mode 100644 index 00000000..29876ccf Binary files /dev/null and b/tests/snapshots/nanox/test_claim_rewards/00001.png differ diff --git a/tests/snapshots/nanox/test_claim_rewards/00002.png b/tests/snapshots/nanox/test_claim_rewards/00002.png new file mode 100644 index 00000000..09793dc9 Binary files /dev/null and b/tests/snapshots/nanox/test_claim_rewards/00002.png differ diff --git a/tests/snapshots/nanox/test_claim_rewards/00003.png b/tests/snapshots/nanox/test_claim_rewards/00003.png new file mode 100644 index 00000000..4fc01a79 Binary files /dev/null and b/tests/snapshots/nanox/test_claim_rewards/00003.png differ diff --git a/tests/snapshots/nanox/test_claim_rewards/00004.png b/tests/snapshots/nanox/test_claim_rewards/00004.png new file mode 100644 index 00000000..4df11113 Binary files /dev/null and b/tests/snapshots/nanox/test_claim_rewards/00004.png differ diff --git a/tests/snapshots/nanox/test_claim_rewards/00005.png b/tests/snapshots/nanox/test_claim_rewards/00005.png new file mode 100644 index 00000000..32a3a14c Binary files /dev/null and b/tests/snapshots/nanox/test_claim_rewards/00005.png differ diff --git a/tests/snapshots/nanox/test_claim_rewards/00006.png b/tests/snapshots/nanox/test_claim_rewards/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanox/test_claim_rewards/00006.png differ diff --git a/tests/snapshots/nanox/test_claim_rewards/00007.png b/tests/snapshots/nanox/test_claim_rewards/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanox/test_claim_rewards/00007.png differ diff --git a/tests/snapshots/nanox/test_claim_rewards/00008.png b/tests/snapshots/nanox/test_claim_rewards/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanox/test_claim_rewards/00008.png differ diff --git a/tests/snapshots/nanox/test_create_position/00000.png b/tests/snapshots/nanox/test_create_position/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanox/test_create_position/00000.png differ diff --git a/tests/snapshots/nanox/test_create_position/00001.png b/tests/snapshots/nanox/test_create_position/00001.png new file mode 100644 index 00000000..46eb0d53 Binary files /dev/null and b/tests/snapshots/nanox/test_create_position/00001.png differ diff --git a/tests/snapshots/nanox/test_create_position/00002.png b/tests/snapshots/nanox/test_create_position/00002.png new file mode 100644 index 00000000..2904611f Binary files /dev/null and b/tests/snapshots/nanox/test_create_position/00002.png differ diff --git a/tests/snapshots/nanox/test_create_position/00003.png b/tests/snapshots/nanox/test_create_position/00003.png new file mode 100644 index 00000000..b913a720 Binary files /dev/null and b/tests/snapshots/nanox/test_create_position/00003.png differ diff --git a/tests/snapshots/nanox/test_create_position/00004.png b/tests/snapshots/nanox/test_create_position/00004.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanox/test_create_position/00004.png differ diff --git a/tests/snapshots/nanox/test_create_position/00005.png b/tests/snapshots/nanox/test_create_position/00005.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanox/test_create_position/00005.png differ diff --git a/tests/snapshots/nanox/test_create_position/00006.png b/tests/snapshots/nanox/test_create_position/00006.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanox/test_create_position/00006.png differ diff --git a/tests/snapshots/nanox/test_delete_positions/00000.png b/tests/snapshots/nanox/test_delete_positions/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanox/test_delete_positions/00000.png differ diff --git a/tests/snapshots/nanox/test_delete_positions/00001.png b/tests/snapshots/nanox/test_delete_positions/00001.png new file mode 100644 index 00000000..b088a17d Binary files /dev/null and b/tests/snapshots/nanox/test_delete_positions/00001.png differ diff --git a/tests/snapshots/nanox/test_delete_positions/00002.png b/tests/snapshots/nanox/test_delete_positions/00002.png new file mode 100644 index 00000000..59c085b9 Binary files /dev/null and b/tests/snapshots/nanox/test_delete_positions/00002.png differ diff --git a/tests/snapshots/nanox/test_delete_positions/00003.png b/tests/snapshots/nanox/test_delete_positions/00003.png new file mode 100644 index 00000000..b8de133b Binary files /dev/null and b/tests/snapshots/nanox/test_delete_positions/00003.png differ diff --git a/tests/snapshots/nanox/test_delete_positions/00004.png b/tests/snapshots/nanox/test_delete_positions/00004.png new file mode 100644 index 00000000..c17d1ae8 Binary files /dev/null and b/tests/snapshots/nanox/test_delete_positions/00004.png differ diff --git a/tests/snapshots/nanox/test_delete_positions/00005.png b/tests/snapshots/nanox/test_delete_positions/00005.png new file mode 100644 index 00000000..edcd727b Binary files /dev/null and b/tests/snapshots/nanox/test_delete_positions/00005.png differ diff --git a/tests/snapshots/nanox/test_delete_positions/00006.png b/tests/snapshots/nanox/test_delete_positions/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanox/test_delete_positions/00006.png differ diff --git a/tests/snapshots/nanox/test_delete_positions/00007.png b/tests/snapshots/nanox/test_delete_positions/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanox/test_delete_positions/00007.png differ diff --git a/tests/snapshots/nanox/test_delete_positions/00008.png b/tests/snapshots/nanox/test_delete_positions/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanox/test_delete_positions/00008.png differ diff --git a/tests/snapshots/nanox/test_extend_duration/00000.png b/tests/snapshots/nanox/test_extend_duration/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanox/test_extend_duration/00000.png differ diff --git a/tests/snapshots/nanox/test_extend_duration/00001.png b/tests/snapshots/nanox/test_extend_duration/00001.png new file mode 100644 index 00000000..61e0d678 Binary files /dev/null and b/tests/snapshots/nanox/test_extend_duration/00001.png differ diff --git a/tests/snapshots/nanox/test_extend_duration/00002.png b/tests/snapshots/nanox/test_extend_duration/00002.png new file mode 100644 index 00000000..17211cc0 Binary files /dev/null and b/tests/snapshots/nanox/test_extend_duration/00002.png differ diff --git a/tests/snapshots/nanox/test_extend_duration/00003.png b/tests/snapshots/nanox/test_extend_duration/00003.png new file mode 100644 index 00000000..6543b847 Binary files /dev/null and b/tests/snapshots/nanox/test_extend_duration/00003.png differ diff --git a/tests/snapshots/nanox/test_extend_duration/00004.png b/tests/snapshots/nanox/test_extend_duration/00004.png new file mode 100644 index 00000000..aa331e43 Binary files /dev/null and b/tests/snapshots/nanox/test_extend_duration/00004.png differ diff --git a/tests/snapshots/nanox/test_extend_duration/00005.png b/tests/snapshots/nanox/test_extend_duration/00005.png new file mode 100644 index 00000000..a3479e33 Binary files /dev/null and b/tests/snapshots/nanox/test_extend_duration/00005.png differ diff --git a/tests/snapshots/nanox/test_extend_duration/00006.png b/tests/snapshots/nanox/test_extend_duration/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanox/test_extend_duration/00006.png differ diff --git a/tests/snapshots/nanox/test_extend_duration/00007.png b/tests/snapshots/nanox/test_extend_duration/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanox/test_extend_duration/00007.png differ diff --git a/tests/snapshots/nanox/test_extend_duration/00008.png b/tests/snapshots/nanox/test_extend_duration/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanox/test_extend_duration/00008.png differ diff --git a/tests/snapshots/nanox/test_fund_staking_rewards/00000.png b/tests/snapshots/nanox/test_fund_staking_rewards/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanox/test_fund_staking_rewards/00000.png differ diff --git a/tests/snapshots/nanox/test_fund_staking_rewards/00001.png b/tests/snapshots/nanox/test_fund_staking_rewards/00001.png new file mode 100644 index 00000000..481513cb Binary files /dev/null and b/tests/snapshots/nanox/test_fund_staking_rewards/00001.png differ diff --git a/tests/snapshots/nanox/test_fund_staking_rewards/00002.png b/tests/snapshots/nanox/test_fund_staking_rewards/00002.png new file mode 100644 index 00000000..37575b85 Binary files /dev/null and b/tests/snapshots/nanox/test_fund_staking_rewards/00002.png differ diff --git a/tests/snapshots/nanox/test_fund_staking_rewards/00003.png b/tests/snapshots/nanox/test_fund_staking_rewards/00003.png new file mode 100644 index 00000000..7c3b816b Binary files /dev/null and b/tests/snapshots/nanox/test_fund_staking_rewards/00003.png differ diff --git a/tests/snapshots/nanox/test_fund_staking_rewards/00004.png b/tests/snapshots/nanox/test_fund_staking_rewards/00004.png new file mode 100644 index 00000000..3fe7bfe9 Binary files /dev/null and b/tests/snapshots/nanox/test_fund_staking_rewards/00004.png differ diff --git a/tests/snapshots/nanox/test_fund_staking_rewards/00005.png b/tests/snapshots/nanox/test_fund_staking_rewards/00005.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanox/test_fund_staking_rewards/00005.png differ diff --git a/tests/snapshots/nanox/test_fund_staking_rewards/00006.png b/tests/snapshots/nanox/test_fund_staking_rewards/00006.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanox/test_fund_staking_rewards/00006.png differ diff --git a/tests/snapshots/nanox/test_fund_staking_rewards/00007.png b/tests/snapshots/nanox/test_fund_staking_rewards/00007.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanox/test_fund_staking_rewards/00007.png differ diff --git a/tests/snapshots/nanox/test_increase_locking_amount/00000.png b/tests/snapshots/nanox/test_increase_locking_amount/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanox/test_increase_locking_amount/00000.png differ diff --git a/tests/snapshots/nanox/test_increase_locking_amount/00001.png b/tests/snapshots/nanox/test_increase_locking_amount/00001.png new file mode 100644 index 00000000..f743a805 Binary files /dev/null and b/tests/snapshots/nanox/test_increase_locking_amount/00001.png differ diff --git a/tests/snapshots/nanox/test_increase_locking_amount/00002.png b/tests/snapshots/nanox/test_increase_locking_amount/00002.png new file mode 100644 index 00000000..17211cc0 Binary files /dev/null and b/tests/snapshots/nanox/test_increase_locking_amount/00002.png differ diff --git a/tests/snapshots/nanox/test_increase_locking_amount/00003.png b/tests/snapshots/nanox/test_increase_locking_amount/00003.png new file mode 100644 index 00000000..e2558068 Binary files /dev/null and b/tests/snapshots/nanox/test_increase_locking_amount/00003.png differ diff --git a/tests/snapshots/nanox/test_increase_locking_amount/00004.png b/tests/snapshots/nanox/test_increase_locking_amount/00004.png new file mode 100644 index 00000000..aa331e43 Binary files /dev/null and b/tests/snapshots/nanox/test_increase_locking_amount/00004.png differ diff --git a/tests/snapshots/nanox/test_increase_locking_amount/00005.png b/tests/snapshots/nanox/test_increase_locking_amount/00005.png new file mode 100644 index 00000000..bc7152d6 Binary files /dev/null and b/tests/snapshots/nanox/test_increase_locking_amount/00005.png differ diff --git a/tests/snapshots/nanox/test_increase_locking_amount/00006.png b/tests/snapshots/nanox/test_increase_locking_amount/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanox/test_increase_locking_amount/00006.png differ diff --git a/tests/snapshots/nanox/test_increase_locking_amount/00007.png b/tests/snapshots/nanox/test_increase_locking_amount/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanox/test_increase_locking_amount/00007.png differ diff --git a/tests/snapshots/nanox/test_increase_locking_amount/00008.png b/tests/snapshots/nanox/test_increase_locking_amount/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanox/test_increase_locking_amount/00008.png differ diff --git a/tests/snapshots/nanox/test_initiate_fast_unlock/00000.png b/tests/snapshots/nanox/test_initiate_fast_unlock/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanox/test_initiate_fast_unlock/00000.png differ diff --git a/tests/snapshots/nanox/test_initiate_fast_unlock/00001.png b/tests/snapshots/nanox/test_initiate_fast_unlock/00001.png new file mode 100644 index 00000000..0fc651ff Binary files /dev/null and b/tests/snapshots/nanox/test_initiate_fast_unlock/00001.png differ diff --git a/tests/snapshots/nanox/test_initiate_fast_unlock/00002.png b/tests/snapshots/nanox/test_initiate_fast_unlock/00002.png new file mode 100644 index 00000000..09793dc9 Binary files /dev/null and b/tests/snapshots/nanox/test_initiate_fast_unlock/00002.png differ diff --git a/tests/snapshots/nanox/test_initiate_fast_unlock/00003.png b/tests/snapshots/nanox/test_initiate_fast_unlock/00003.png new file mode 100644 index 00000000..4fc01a79 Binary files /dev/null and b/tests/snapshots/nanox/test_initiate_fast_unlock/00003.png differ diff --git a/tests/snapshots/nanox/test_initiate_fast_unlock/00004.png b/tests/snapshots/nanox/test_initiate_fast_unlock/00004.png new file mode 100644 index 00000000..4df11113 Binary files /dev/null and b/tests/snapshots/nanox/test_initiate_fast_unlock/00004.png differ diff --git a/tests/snapshots/nanox/test_initiate_fast_unlock/00005.png b/tests/snapshots/nanox/test_initiate_fast_unlock/00005.png new file mode 100644 index 00000000..32a3a14c Binary files /dev/null and b/tests/snapshots/nanox/test_initiate_fast_unlock/00005.png differ diff --git a/tests/snapshots/nanox/test_initiate_fast_unlock/00006.png b/tests/snapshots/nanox/test_initiate_fast_unlock/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanox/test_initiate_fast_unlock/00006.png differ diff --git a/tests/snapshots/nanox/test_initiate_fast_unlock/00007.png b/tests/snapshots/nanox/test_initiate_fast_unlock/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanox/test_initiate_fast_unlock/00007.png differ diff --git a/tests/snapshots/nanox/test_initiate_fast_unlock/00008.png b/tests/snapshots/nanox/test_initiate_fast_unlock/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanox/test_initiate_fast_unlock/00008.png differ diff --git a/tests/snapshots/nanox/test_pause_unlocking/00000.png b/tests/snapshots/nanox/test_pause_unlocking/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanox/test_pause_unlocking/00000.png differ diff --git a/tests/snapshots/nanox/test_pause_unlocking/00001.png b/tests/snapshots/nanox/test_pause_unlocking/00001.png new file mode 100644 index 00000000..406557af Binary files /dev/null and b/tests/snapshots/nanox/test_pause_unlocking/00001.png differ diff --git a/tests/snapshots/nanox/test_pause_unlocking/00002.png b/tests/snapshots/nanox/test_pause_unlocking/00002.png new file mode 100644 index 00000000..09793dc9 Binary files /dev/null and b/tests/snapshots/nanox/test_pause_unlocking/00002.png differ diff --git a/tests/snapshots/nanox/test_pause_unlocking/00003.png b/tests/snapshots/nanox/test_pause_unlocking/00003.png new file mode 100644 index 00000000..4fc01a79 Binary files /dev/null and b/tests/snapshots/nanox/test_pause_unlocking/00003.png differ diff --git a/tests/snapshots/nanox/test_pause_unlocking/00004.png b/tests/snapshots/nanox/test_pause_unlocking/00004.png new file mode 100644 index 00000000..4df11113 Binary files /dev/null and b/tests/snapshots/nanox/test_pause_unlocking/00004.png differ diff --git a/tests/snapshots/nanox/test_pause_unlocking/00005.png b/tests/snapshots/nanox/test_pause_unlocking/00005.png new file mode 100644 index 00000000..32a3a14c Binary files /dev/null and b/tests/snapshots/nanox/test_pause_unlocking/00005.png differ diff --git a/tests/snapshots/nanox/test_pause_unlocking/00006.png b/tests/snapshots/nanox/test_pause_unlocking/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanox/test_pause_unlocking/00006.png differ diff --git a/tests/snapshots/nanox/test_pause_unlocking/00007.png b/tests/snapshots/nanox/test_pause_unlocking/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanox/test_pause_unlocking/00007.png differ diff --git a/tests/snapshots/nanox/test_pause_unlocking/00008.png b/tests/snapshots/nanox/test_pause_unlocking/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanox/test_pause_unlocking/00008.png differ diff --git a/tests/snapshots/nanox/test_resume_unlocking/00000.png b/tests/snapshots/nanox/test_resume_unlocking/00000.png new file mode 100644 index 00000000..487ea10f Binary files /dev/null and b/tests/snapshots/nanox/test_resume_unlocking/00000.png differ diff --git a/tests/snapshots/nanox/test_resume_unlocking/00001.png b/tests/snapshots/nanox/test_resume_unlocking/00001.png new file mode 100644 index 00000000..a176905f Binary files /dev/null and b/tests/snapshots/nanox/test_resume_unlocking/00001.png differ diff --git a/tests/snapshots/nanox/test_resume_unlocking/00002.png b/tests/snapshots/nanox/test_resume_unlocking/00002.png new file mode 100644 index 00000000..09793dc9 Binary files /dev/null and b/tests/snapshots/nanox/test_resume_unlocking/00002.png differ diff --git a/tests/snapshots/nanox/test_resume_unlocking/00003.png b/tests/snapshots/nanox/test_resume_unlocking/00003.png new file mode 100644 index 00000000..4fc01a79 Binary files /dev/null and b/tests/snapshots/nanox/test_resume_unlocking/00003.png differ diff --git a/tests/snapshots/nanox/test_resume_unlocking/00004.png b/tests/snapshots/nanox/test_resume_unlocking/00004.png new file mode 100644 index 00000000..4df11113 Binary files /dev/null and b/tests/snapshots/nanox/test_resume_unlocking/00004.png differ diff --git a/tests/snapshots/nanox/test_resume_unlocking/00005.png b/tests/snapshots/nanox/test_resume_unlocking/00005.png new file mode 100644 index 00000000..32a3a14c Binary files /dev/null and b/tests/snapshots/nanox/test_resume_unlocking/00005.png differ diff --git a/tests/snapshots/nanox/test_resume_unlocking/00006.png b/tests/snapshots/nanox/test_resume_unlocking/00006.png new file mode 100644 index 00000000..3a1c8871 Binary files /dev/null and b/tests/snapshots/nanox/test_resume_unlocking/00006.png differ diff --git a/tests/snapshots/nanox/test_resume_unlocking/00007.png b/tests/snapshots/nanox/test_resume_unlocking/00007.png new file mode 100644 index 00000000..570ce28d Binary files /dev/null and b/tests/snapshots/nanox/test_resume_unlocking/00007.png differ diff --git a/tests/snapshots/nanox/test_resume_unlocking/00008.png b/tests/snapshots/nanox/test_resume_unlocking/00008.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/tests/snapshots/nanox/test_resume_unlocking/00008.png differ diff --git a/tests/snapshots/stax/test_add_unused_rewards/00000.png b/tests/snapshots/stax/test_add_unused_rewards/00000.png new file mode 100644 index 00000000..a0d4b627 Binary files /dev/null and b/tests/snapshots/stax/test_add_unused_rewards/00000.png differ diff --git a/tests/snapshots/stax/test_add_unused_rewards/00001.png b/tests/snapshots/stax/test_add_unused_rewards/00001.png new file mode 100644 index 00000000..0a1aa426 Binary files /dev/null and b/tests/snapshots/stax/test_add_unused_rewards/00001.png differ diff --git a/tests/snapshots/stax/test_add_unused_rewards/00002.png b/tests/snapshots/stax/test_add_unused_rewards/00002.png new file mode 100644 index 00000000..37344499 Binary files /dev/null and b/tests/snapshots/stax/test_add_unused_rewards/00002.png differ diff --git a/tests/snapshots/stax/test_add_unused_rewards/00003.png b/tests/snapshots/stax/test_add_unused_rewards/00003.png new file mode 100644 index 00000000..2ba6d27d Binary files /dev/null and b/tests/snapshots/stax/test_add_unused_rewards/00003.png differ diff --git a/tests/snapshots/stax/test_add_unused_rewards/00004.png b/tests/snapshots/stax/test_add_unused_rewards/00004.png new file mode 100644 index 00000000..b1ff1b3a Binary files /dev/null and b/tests/snapshots/stax/test_add_unused_rewards/00004.png differ diff --git a/tests/snapshots/stax/test_claim_multisig_account/00000.png b/tests/snapshots/stax/test_claim_multisig_account/00000.png index b108e170..9b7b4234 100644 Binary files a/tests/snapshots/stax/test_claim_multisig_account/00000.png and b/tests/snapshots/stax/test_claim_multisig_account/00000.png differ diff --git a/tests/snapshots/stax/test_claim_multisig_account/00001.png b/tests/snapshots/stax/test_claim_multisig_account/00001.png index 372e57bf..0d00e750 100644 Binary files a/tests/snapshots/stax/test_claim_multisig_account/00001.png and b/tests/snapshots/stax/test_claim_multisig_account/00001.png differ diff --git a/tests/snapshots/stax/test_claim_multisig_account/00002.png b/tests/snapshots/stax/test_claim_multisig_account/00002.png index f37dc50b..1695c844 100644 Binary files a/tests/snapshots/stax/test_claim_multisig_account/00002.png and b/tests/snapshots/stax/test_claim_multisig_account/00002.png differ diff --git a/tests/snapshots/stax/test_claim_multisig_account/00003.png b/tests/snapshots/stax/test_claim_multisig_account/00003.png index ec18318b..982ad00f 100644 Binary files a/tests/snapshots/stax/test_claim_multisig_account/00003.png and b/tests/snapshots/stax/test_claim_multisig_account/00003.png differ diff --git a/tests/snapshots/stax/test_claim_multisig_account/00004.png b/tests/snapshots/stax/test_claim_multisig_account/00004.png index a21279c8..2ba6d27d 100644 Binary files a/tests/snapshots/stax/test_claim_multisig_account/00004.png and b/tests/snapshots/stax/test_claim_multisig_account/00004.png differ diff --git a/tests/snapshots/stax/test_claim_regular_account/00000.png b/tests/snapshots/stax/test_claim_regular_account/00000.png index b108e170..9b7b4234 100644 Binary files a/tests/snapshots/stax/test_claim_regular_account/00000.png and b/tests/snapshots/stax/test_claim_regular_account/00000.png differ diff --git a/tests/snapshots/stax/test_claim_regular_account/00001.png b/tests/snapshots/stax/test_claim_regular_account/00001.png index bb3ff19c..5e03a192 100644 Binary files a/tests/snapshots/stax/test_claim_regular_account/00001.png and b/tests/snapshots/stax/test_claim_regular_account/00001.png differ diff --git a/tests/snapshots/stax/test_claim_regular_account/00002.png b/tests/snapshots/stax/test_claim_regular_account/00002.png index 5d24a3ab..4e32588e 100644 Binary files a/tests/snapshots/stax/test_claim_regular_account/00002.png and b/tests/snapshots/stax/test_claim_regular_account/00002.png differ diff --git a/tests/snapshots/stax/test_claim_regular_account/00003.png b/tests/snapshots/stax/test_claim_regular_account/00003.png index ec18318b..982ad00f 100644 Binary files a/tests/snapshots/stax/test_claim_regular_account/00003.png and b/tests/snapshots/stax/test_claim_regular_account/00003.png differ diff --git a/tests/snapshots/stax/test_claim_regular_account/00004.png b/tests/snapshots/stax/test_claim_regular_account/00004.png index a21279c8..2ba6d27d 100644 Binary files a/tests/snapshots/stax/test_claim_regular_account/00004.png and b/tests/snapshots/stax/test_claim_regular_account/00004.png differ diff --git a/tests/snapshots/stax/test_claim_rewards/00000.png b/tests/snapshots/stax/test_claim_rewards/00000.png new file mode 100644 index 00000000..e587ca9a Binary files /dev/null and b/tests/snapshots/stax/test_claim_rewards/00000.png differ diff --git a/tests/snapshots/stax/test_claim_rewards/00001.png b/tests/snapshots/stax/test_claim_rewards/00001.png new file mode 100644 index 00000000..14212d34 Binary files /dev/null and b/tests/snapshots/stax/test_claim_rewards/00001.png differ diff --git a/tests/snapshots/stax/test_claim_rewards/00002.png b/tests/snapshots/stax/test_claim_rewards/00002.png new file mode 100644 index 00000000..d8fb2022 Binary files /dev/null and b/tests/snapshots/stax/test_claim_rewards/00002.png differ diff --git a/tests/snapshots/stax/test_claim_rewards/00003.png b/tests/snapshots/stax/test_claim_rewards/00003.png new file mode 100644 index 00000000..444b4966 Binary files /dev/null and b/tests/snapshots/stax/test_claim_rewards/00003.png differ diff --git a/tests/snapshots/stax/test_claim_rewards/00004.png b/tests/snapshots/stax/test_claim_rewards/00004.png new file mode 100644 index 00000000..2ba6d27d Binary files /dev/null and b/tests/snapshots/stax/test_claim_rewards/00004.png differ diff --git a/tests/snapshots/stax/test_claim_rewards/00005.png b/tests/snapshots/stax/test_claim_rewards/00005.png new file mode 100644 index 00000000..b1ff1b3a Binary files /dev/null and b/tests/snapshots/stax/test_claim_rewards/00005.png differ diff --git a/tests/snapshots/stax/test_create_position/00000.png b/tests/snapshots/stax/test_create_position/00000.png new file mode 100644 index 00000000..d0d2d869 Binary files /dev/null and b/tests/snapshots/stax/test_create_position/00000.png differ diff --git a/tests/snapshots/stax/test_create_position/00001.png b/tests/snapshots/stax/test_create_position/00001.png new file mode 100644 index 00000000..e9b1b837 Binary files /dev/null and b/tests/snapshots/stax/test_create_position/00001.png differ diff --git a/tests/snapshots/stax/test_create_position/00002.png b/tests/snapshots/stax/test_create_position/00002.png new file mode 100644 index 00000000..e7460193 Binary files /dev/null and b/tests/snapshots/stax/test_create_position/00002.png differ diff --git a/tests/snapshots/stax/test_create_position/00003.png b/tests/snapshots/stax/test_create_position/00003.png new file mode 100644 index 00000000..2ba6d27d Binary files /dev/null and b/tests/snapshots/stax/test_create_position/00003.png differ diff --git a/tests/snapshots/stax/test_create_position/00004.png b/tests/snapshots/stax/test_create_position/00004.png new file mode 100644 index 00000000..b1ff1b3a Binary files /dev/null and b/tests/snapshots/stax/test_create_position/00004.png differ diff --git a/tests/snapshots/stax/test_delete_positions/00000.png b/tests/snapshots/stax/test_delete_positions/00000.png new file mode 100644 index 00000000..ff711751 Binary files /dev/null and b/tests/snapshots/stax/test_delete_positions/00000.png differ diff --git a/tests/snapshots/stax/test_delete_positions/00001.png b/tests/snapshots/stax/test_delete_positions/00001.png new file mode 100644 index 00000000..8262f20a Binary files /dev/null and b/tests/snapshots/stax/test_delete_positions/00001.png differ diff --git a/tests/snapshots/stax/test_delete_positions/00002.png b/tests/snapshots/stax/test_delete_positions/00002.png new file mode 100644 index 00000000..d8fb2022 Binary files /dev/null and b/tests/snapshots/stax/test_delete_positions/00002.png differ diff --git a/tests/snapshots/stax/test_delete_positions/00003.png b/tests/snapshots/stax/test_delete_positions/00003.png new file mode 100644 index 00000000..66ffa543 Binary files /dev/null and b/tests/snapshots/stax/test_delete_positions/00003.png differ diff --git a/tests/snapshots/stax/test_delete_positions/00004.png b/tests/snapshots/stax/test_delete_positions/00004.png new file mode 100644 index 00000000..2ba6d27d Binary files /dev/null and b/tests/snapshots/stax/test_delete_positions/00004.png differ diff --git a/tests/snapshots/stax/test_delete_positions/00005.png b/tests/snapshots/stax/test_delete_positions/00005.png new file mode 100644 index 00000000..b1ff1b3a Binary files /dev/null and b/tests/snapshots/stax/test_delete_positions/00005.png differ diff --git a/tests/snapshots/stax/test_extend_duration/00000.png b/tests/snapshots/stax/test_extend_duration/00000.png new file mode 100644 index 00000000..109fbe86 Binary files /dev/null and b/tests/snapshots/stax/test_extend_duration/00000.png differ diff --git a/tests/snapshots/stax/test_extend_duration/00001.png b/tests/snapshots/stax/test_extend_duration/00001.png new file mode 100644 index 00000000..a3eba41f Binary files /dev/null and b/tests/snapshots/stax/test_extend_duration/00001.png differ diff --git a/tests/snapshots/stax/test_extend_duration/00002.png b/tests/snapshots/stax/test_extend_duration/00002.png new file mode 100644 index 00000000..d8fb2022 Binary files /dev/null and b/tests/snapshots/stax/test_extend_duration/00002.png differ diff --git a/tests/snapshots/stax/test_extend_duration/00003.png b/tests/snapshots/stax/test_extend_duration/00003.png new file mode 100644 index 00000000..3e12657c Binary files /dev/null and b/tests/snapshots/stax/test_extend_duration/00003.png differ diff --git a/tests/snapshots/stax/test_extend_duration/00004.png b/tests/snapshots/stax/test_extend_duration/00004.png new file mode 100644 index 00000000..2ba6d27d Binary files /dev/null and b/tests/snapshots/stax/test_extend_duration/00004.png differ diff --git a/tests/snapshots/stax/test_extend_duration/00005.png b/tests/snapshots/stax/test_extend_duration/00005.png new file mode 100644 index 00000000..b1ff1b3a Binary files /dev/null and b/tests/snapshots/stax/test_extend_duration/00005.png differ diff --git a/tests/snapshots/stax/test_fund_staking_rewards/00000.png b/tests/snapshots/stax/test_fund_staking_rewards/00000.png new file mode 100644 index 00000000..5a6829b0 Binary files /dev/null and b/tests/snapshots/stax/test_fund_staking_rewards/00000.png differ diff --git a/tests/snapshots/stax/test_fund_staking_rewards/00001.png b/tests/snapshots/stax/test_fund_staking_rewards/00001.png new file mode 100644 index 00000000..265b0ca6 Binary files /dev/null and b/tests/snapshots/stax/test_fund_staking_rewards/00001.png differ diff --git a/tests/snapshots/stax/test_fund_staking_rewards/00002.png b/tests/snapshots/stax/test_fund_staking_rewards/00002.png new file mode 100644 index 00000000..740bfa12 Binary files /dev/null and b/tests/snapshots/stax/test_fund_staking_rewards/00002.png differ diff --git a/tests/snapshots/stax/test_fund_staking_rewards/00003.png b/tests/snapshots/stax/test_fund_staking_rewards/00003.png new file mode 100644 index 00000000..2ba6d27d Binary files /dev/null and b/tests/snapshots/stax/test_fund_staking_rewards/00003.png differ diff --git a/tests/snapshots/stax/test_fund_staking_rewards/00004.png b/tests/snapshots/stax/test_fund_staking_rewards/00004.png new file mode 100644 index 00000000..b1ff1b3a Binary files /dev/null and b/tests/snapshots/stax/test_fund_staking_rewards/00004.png differ diff --git a/tests/snapshots/stax/test_increase_locking_amount/00000.png b/tests/snapshots/stax/test_increase_locking_amount/00000.png new file mode 100644 index 00000000..6e77f7db Binary files /dev/null and b/tests/snapshots/stax/test_increase_locking_amount/00000.png differ diff --git a/tests/snapshots/stax/test_increase_locking_amount/00001.png b/tests/snapshots/stax/test_increase_locking_amount/00001.png new file mode 100644 index 00000000..3bb10623 Binary files /dev/null and b/tests/snapshots/stax/test_increase_locking_amount/00001.png differ diff --git a/tests/snapshots/stax/test_increase_locking_amount/00002.png b/tests/snapshots/stax/test_increase_locking_amount/00002.png new file mode 100644 index 00000000..d8fb2022 Binary files /dev/null and b/tests/snapshots/stax/test_increase_locking_amount/00002.png differ diff --git a/tests/snapshots/stax/test_increase_locking_amount/00003.png b/tests/snapshots/stax/test_increase_locking_amount/00003.png new file mode 100644 index 00000000..346953c7 Binary files /dev/null and b/tests/snapshots/stax/test_increase_locking_amount/00003.png differ diff --git a/tests/snapshots/stax/test_increase_locking_amount/00004.png b/tests/snapshots/stax/test_increase_locking_amount/00004.png new file mode 100644 index 00000000..2ba6d27d Binary files /dev/null and b/tests/snapshots/stax/test_increase_locking_amount/00004.png differ diff --git a/tests/snapshots/stax/test_increase_locking_amount/00005.png b/tests/snapshots/stax/test_increase_locking_amount/00005.png new file mode 100644 index 00000000..b1ff1b3a Binary files /dev/null and b/tests/snapshots/stax/test_increase_locking_amount/00005.png differ diff --git a/tests/snapshots/stax/test_initiate_fast_unlock/00000.png b/tests/snapshots/stax/test_initiate_fast_unlock/00000.png new file mode 100644 index 00000000..d36f9a04 Binary files /dev/null and b/tests/snapshots/stax/test_initiate_fast_unlock/00000.png differ diff --git a/tests/snapshots/stax/test_initiate_fast_unlock/00001.png b/tests/snapshots/stax/test_initiate_fast_unlock/00001.png new file mode 100644 index 00000000..14212d34 Binary files /dev/null and b/tests/snapshots/stax/test_initiate_fast_unlock/00001.png differ diff --git a/tests/snapshots/stax/test_initiate_fast_unlock/00002.png b/tests/snapshots/stax/test_initiate_fast_unlock/00002.png new file mode 100644 index 00000000..d8fb2022 Binary files /dev/null and b/tests/snapshots/stax/test_initiate_fast_unlock/00002.png differ diff --git a/tests/snapshots/stax/test_initiate_fast_unlock/00003.png b/tests/snapshots/stax/test_initiate_fast_unlock/00003.png new file mode 100644 index 00000000..c6a1ed0f Binary files /dev/null and b/tests/snapshots/stax/test_initiate_fast_unlock/00003.png differ diff --git a/tests/snapshots/stax/test_initiate_fast_unlock/00004.png b/tests/snapshots/stax/test_initiate_fast_unlock/00004.png new file mode 100644 index 00000000..2ba6d27d Binary files /dev/null and b/tests/snapshots/stax/test_initiate_fast_unlock/00004.png differ diff --git a/tests/snapshots/stax/test_initiate_fast_unlock/00005.png b/tests/snapshots/stax/test_initiate_fast_unlock/00005.png new file mode 100644 index 00000000..b1ff1b3a Binary files /dev/null and b/tests/snapshots/stax/test_initiate_fast_unlock/00005.png differ diff --git a/tests/snapshots/stax/test_pause_unlocking/00000.png b/tests/snapshots/stax/test_pause_unlocking/00000.png new file mode 100644 index 00000000..cd754fdc Binary files /dev/null and b/tests/snapshots/stax/test_pause_unlocking/00000.png differ diff --git a/tests/snapshots/stax/test_pause_unlocking/00001.png b/tests/snapshots/stax/test_pause_unlocking/00001.png new file mode 100644 index 00000000..14212d34 Binary files /dev/null and b/tests/snapshots/stax/test_pause_unlocking/00001.png differ diff --git a/tests/snapshots/stax/test_pause_unlocking/00002.png b/tests/snapshots/stax/test_pause_unlocking/00002.png new file mode 100644 index 00000000..d8fb2022 Binary files /dev/null and b/tests/snapshots/stax/test_pause_unlocking/00002.png differ diff --git a/tests/snapshots/stax/test_pause_unlocking/00003.png b/tests/snapshots/stax/test_pause_unlocking/00003.png new file mode 100644 index 00000000..0dd465f0 Binary files /dev/null and b/tests/snapshots/stax/test_pause_unlocking/00003.png differ diff --git a/tests/snapshots/stax/test_pause_unlocking/00004.png b/tests/snapshots/stax/test_pause_unlocking/00004.png new file mode 100644 index 00000000..2ba6d27d Binary files /dev/null and b/tests/snapshots/stax/test_pause_unlocking/00004.png differ diff --git a/tests/snapshots/stax/test_pause_unlocking/00005.png b/tests/snapshots/stax/test_pause_unlocking/00005.png new file mode 100644 index 00000000..b1ff1b3a Binary files /dev/null and b/tests/snapshots/stax/test_pause_unlocking/00005.png differ diff --git a/tests/snapshots/stax/test_resume_unlocking/00000.png b/tests/snapshots/stax/test_resume_unlocking/00000.png new file mode 100644 index 00000000..d40ac144 Binary files /dev/null and b/tests/snapshots/stax/test_resume_unlocking/00000.png differ diff --git a/tests/snapshots/stax/test_resume_unlocking/00001.png b/tests/snapshots/stax/test_resume_unlocking/00001.png new file mode 100644 index 00000000..14212d34 Binary files /dev/null and b/tests/snapshots/stax/test_resume_unlocking/00001.png differ diff --git a/tests/snapshots/stax/test_resume_unlocking/00002.png b/tests/snapshots/stax/test_resume_unlocking/00002.png new file mode 100644 index 00000000..d8fb2022 Binary files /dev/null and b/tests/snapshots/stax/test_resume_unlocking/00002.png differ diff --git a/tests/snapshots/stax/test_resume_unlocking/00003.png b/tests/snapshots/stax/test_resume_unlocking/00003.png new file mode 100644 index 00000000..39aa1da0 Binary files /dev/null and b/tests/snapshots/stax/test_resume_unlocking/00003.png differ diff --git a/tests/snapshots/stax/test_resume_unlocking/00004.png b/tests/snapshots/stax/test_resume_unlocking/00004.png new file mode 100644 index 00000000..2ba6d27d Binary files /dev/null and b/tests/snapshots/stax/test_resume_unlocking/00004.png differ diff --git a/tests/snapshots/stax/test_resume_unlocking/00005.png b/tests/snapshots/stax/test_resume_unlocking/00005.png new file mode 100644 index 00000000..b1ff1b3a Binary files /dev/null and b/tests/snapshots/stax/test_resume_unlocking/00005.png differ diff --git a/tests/test_claim.py b/tests/test_claim.py index 4b5ec43f..d734493f 100644 --- a/tests/test_claim.py +++ b/tests/test_claim.py @@ -22,7 +22,7 @@ PLUGIN_NAME = get_appname_from_makefile() -with open("%s/0x5bdcf98a3C11A1f6aA9293DB0169C2C2539526A0.abi.json" % (ABIS_FOLDER)) as file: +with open("%s/0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994.abi.json" % (ABIS_FOLDER)) as file: contract = Web3().eth.contract( abi=json.load(file), # Get address from filename diff --git a/tests/test_reward.py b/tests/test_reward.py new file mode 100644 index 00000000..400031b5 --- /dev/null +++ b/tests/test_reward.py @@ -0,0 +1,516 @@ +from pathlib import Path +import json +import os +import datetime + +from hexbytes import HexBytes + +from web3 import Web3 +from eth_typing import ChainId + +from ledger_app_clients.ethereum.client import EthAppClient +import ledger_app_clients.ethereum.response_parser as ResponseParser +from ledger_app_clients.ethereum.utils import get_selector_from_data, recover_transaction +from ragger.navigator import NavInsID + +from .utils import get_appname_from_makefile, DERIVATION_PATH + + +ROOT_SCREENSHOT_PATH = Path(__file__).parent +ABIS_FOLDER = "%s/abis" % (os.path.dirname(__file__)) + +PLUGIN_NAME = get_appname_from_makefile() + + +with open("%s/0xD35ca9577a9DADa7624a35EC10C2F55031f0Ab1f.abi.json" % (ABIS_FOLDER)) as file: + contract = Web3().eth.contract( + abi=json.load(file), + # Get address from filename + address=bytes.fromhex(os.path.basename(file.name).split(".")[0].split("x")[-1]) + ) + +def test_create_position(backend, firmware, navigator, test_name, wallet_addr): + client = EthAppClient(backend) + + data = contract.encodeABI("createPosition", [ + 86511774, + 100 + ]) + + # first setup the external plugin + client.set_external_plugin(PLUGIN_NAME, + contract.address, + # Extract function selector from the encoded data + get_selector_from_data(data)) + + tx_params = { + "nonce": 20, + "maxFeePerGas": Web3.to_wei(145, "gwei"), + "maxPriorityFeePerGas": Web3.to_wei(1.5, "gwei"), + "gas": 173290, + "to": contract.address, + "value": Web3.to_wei(0.1, "ether"), + "chainId": ChainId.ETH, + "data": data + } + + # send the transaction + with client.sign(DERIVATION_PATH, tx_params): + # Validate the on-screen request by performing the navigation appropriate for this device + if firmware.device.startswith("nano"): + navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, + [NavInsID.BOTH_CLICK], + "Accept", + ROOT_SCREENSHOT_PATH, + test_name) + else: + navigator.navigate_until_text_and_compare(NavInsID.USE_CASE_REVIEW_TAP, + [NavInsID.USE_CASE_REVIEW_CONFIRM, + NavInsID.USE_CASE_STATUS_DISMISS], + "Hold to sign", + ROOT_SCREENSHOT_PATH, + test_name) + # verify signature + vrs = ResponseParser.signature(client.response().data) + addr = recover_transaction(tx_params, vrs) + assert addr == wallet_addr.get() + +def test_initiate_fast_unlock(backend, firmware, navigator, test_name, wallet_addr): + client = EthAppClient(backend) + + data = contract.encodeABI("initiateFastUnlock", [ + [ + 86511774, + 100, + 34532, + 34, + ] + ]) + + # first setup the external plugin + client.set_external_plugin(PLUGIN_NAME, + contract.address, + # Extract function selector from the encoded data + get_selector_from_data(data)) + + tx_params = { + "nonce": 20, + "maxFeePerGas": Web3.to_wei(145, "gwei"), + "maxPriorityFeePerGas": Web3.to_wei(1.5, "gwei"), + "gas": 173290, + "to": contract.address, + "value": Web3.to_wei(0.1, "ether"), + "chainId": ChainId.ETH, + "data": data + } + + # send the transaction + with client.sign(DERIVATION_PATH, tx_params): + # Validate the on-screen request by performing the navigation appropriate for this device + if firmware.device.startswith("nano"): + navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, + [NavInsID.BOTH_CLICK], + "Accept", + ROOT_SCREENSHOT_PATH, + test_name) + else: + navigator.navigate_until_text_and_compare(NavInsID.USE_CASE_REVIEW_TAP, + [NavInsID.USE_CASE_REVIEW_CONFIRM, + NavInsID.USE_CASE_STATUS_DISMISS], + "Hold to sign", + ROOT_SCREENSHOT_PATH, + test_name) + # verify signature + vrs = ResponseParser.signature(client.response().data) + addr = recover_transaction(tx_params, vrs) + assert addr == wallet_addr.get() + +def test_claim_rewards(backend, firmware, navigator, test_name, wallet_addr): + client = EthAppClient(backend) + + data = contract.encodeABI("claimRewards", [ + [ + 86511774, + 100, + 34532, + 34, + ] + ]) + + # first setup the external plugin + client.set_external_plugin(PLUGIN_NAME, + contract.address, + # Extract function selector from the encoded data + get_selector_from_data(data)) + + tx_params = { + "nonce": 20, + "maxFeePerGas": Web3.to_wei(145, "gwei"), + "maxPriorityFeePerGas": Web3.to_wei(1.5, "gwei"), + "gas": 173290, + "to": contract.address, + "value": Web3.to_wei(0.1, "ether"), + "chainId": ChainId.ETH, + "data": data + } + + # send the transaction + with client.sign(DERIVATION_PATH, tx_params): + # Validate the on-screen request by performing the navigation appropriate for this device + if firmware.device.startswith("nano"): + navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, + [NavInsID.BOTH_CLICK], + "Accept", + ROOT_SCREENSHOT_PATH, + test_name) + else: + navigator.navigate_until_text_and_compare(NavInsID.USE_CASE_REVIEW_TAP, + [NavInsID.USE_CASE_REVIEW_CONFIRM, + NavInsID.USE_CASE_STATUS_DISMISS], + "Hold to sign", + ROOT_SCREENSHOT_PATH, + test_name) + # verify signature + vrs = ResponseParser.signature(client.response().data) + addr = recover_transaction(tx_params, vrs) + assert addr == wallet_addr.get() + +def test_pause_unlocking(backend, firmware, navigator, test_name, wallet_addr): + client = EthAppClient(backend) + + data = contract.encodeABI("pauseUnlocking", [ + [ + 86511774, + 100, + 34532, + 34, + ] + ]) + + # first setup the external plugin + client.set_external_plugin(PLUGIN_NAME, + contract.address, + # Extract function selector from the encoded data + get_selector_from_data(data)) + + tx_params = { + "nonce": 20, + "maxFeePerGas": Web3.to_wei(145, "gwei"), + "maxPriorityFeePerGas": Web3.to_wei(1.5, "gwei"), + "gas": 173290, + "to": contract.address, + "value": Web3.to_wei(0.1, "ether"), + "chainId": ChainId.ETH, + "data": data + } + + # send the transaction + with client.sign(DERIVATION_PATH, tx_params): + # Validate the on-screen request by performing the navigation appropriate for this device + if firmware.device.startswith("nano"): + navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, + [NavInsID.BOTH_CLICK], + "Accept", + ROOT_SCREENSHOT_PATH, + test_name) + else: + navigator.navigate_until_text_and_compare(NavInsID.USE_CASE_REVIEW_TAP, + [NavInsID.USE_CASE_REVIEW_CONFIRM, + NavInsID.USE_CASE_STATUS_DISMISS], + "Hold to sign", + ROOT_SCREENSHOT_PATH, + test_name) + # verify signature + vrs = ResponseParser.signature(client.response().data) + addr = recover_transaction(tx_params, vrs) + assert addr == wallet_addr.get() + +def test_resume_unlocking(backend, firmware, navigator, test_name, wallet_addr): + client = EthAppClient(backend) + + data = contract.encodeABI("resumeUnlockingCountdown", [ + [ + 86511774, + 100, + 34532, + 34, + ] + ]) + + # first setup the external plugin + client.set_external_plugin(PLUGIN_NAME, + contract.address, + # Extract function selector from the encoded data + get_selector_from_data(data)) + + tx_params = { + "nonce": 20, + "maxFeePerGas": Web3.to_wei(145, "gwei"), + "maxPriorityFeePerGas": Web3.to_wei(1.5, "gwei"), + "gas": 173290, + "to": contract.address, + "value": Web3.to_wei(0.1, "ether"), + "chainId": ChainId.ETH, + "data": data + } + + # send the transaction + with client.sign(DERIVATION_PATH, tx_params): + # Validate the on-screen request by performing the navigation appropriate for this device + if firmware.device.startswith("nano"): + navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, + [NavInsID.BOTH_CLICK], + "Accept", + ROOT_SCREENSHOT_PATH, + test_name) + else: + navigator.navigate_until_text_and_compare(NavInsID.USE_CASE_REVIEW_TAP, + [NavInsID.USE_CASE_REVIEW_CONFIRM, + NavInsID.USE_CASE_STATUS_DISMISS], + "Hold to sign", + ROOT_SCREENSHOT_PATH, + test_name) + # verify signature + vrs = ResponseParser.signature(client.response().data) + addr = recover_transaction(tx_params, vrs) + assert addr == wallet_addr.get() + +def test_increase_locking_amount(backend, firmware, navigator, test_name, wallet_addr): + client = EthAppClient(backend) + + data = contract.encodeABI("increaseLockingAmount", [ + [ + (2024, 2000000023003000000), + (9998, 1000000000000000000), + ] + ]) + + # first setup the external plugin + client.set_external_plugin(PLUGIN_NAME, + contract.address, + # Extract function selector from the encoded data + get_selector_from_data(data)) + + tx_params = { + "nonce": 20, + "maxFeePerGas": Web3.to_wei(145, "gwei"), + "maxPriorityFeePerGas": Web3.to_wei(1.5, "gwei"), + "gas": 173290, + "to": contract.address, + "value": Web3.to_wei(0.1, "ether"), + "chainId": ChainId.ETH, + "data": data + } + + # send the transaction + with client.sign(DERIVATION_PATH, tx_params): + # Validate the on-screen request by performing the navigation appropriate for this device + if firmware.device.startswith("nano"): + navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, + [NavInsID.BOTH_CLICK], + "Accept", + ROOT_SCREENSHOT_PATH, + test_name) + else: + navigator.navigate_until_text_and_compare(NavInsID.USE_CASE_REVIEW_TAP, + [NavInsID.USE_CASE_REVIEW_CONFIRM, + NavInsID.USE_CASE_STATUS_DISMISS], + "Hold to sign", + ROOT_SCREENSHOT_PATH, + test_name) + # verify signature + vrs = ResponseParser.signature(client.response().data) + addr = recover_transaction(tx_params, vrs) + assert addr == wallet_addr.get() + +def test_extend_duration(backend, firmware, navigator, test_name, wallet_addr): + client = EthAppClient(backend) + + data = contract.encodeABI("extendDuration", [ + [ + (2024, 6), + (9998, 8), + ] + ]) + + # first setup the external plugin + client.set_external_plugin(PLUGIN_NAME, + contract.address, + # Extract function selector from the encoded data + get_selector_from_data(data)) + + tx_params = { + "nonce": 20, + "maxFeePerGas": Web3.to_wei(145, "gwei"), + "maxPriorityFeePerGas": Web3.to_wei(1.5, "gwei"), + "gas": 173290, + "to": contract.address, + "value": Web3.to_wei(0.1, "ether"), + "chainId": ChainId.ETH, + "data": data + } + + # send the transaction + with client.sign(DERIVATION_PATH, tx_params): + # Validate the on-screen request by performing the navigation appropriate for this device + if firmware.device.startswith("nano"): + navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, + [NavInsID.BOTH_CLICK], + "Accept", + ROOT_SCREENSHOT_PATH, + test_name) + else: + navigator.navigate_until_text_and_compare(NavInsID.USE_CASE_REVIEW_TAP, + [NavInsID.USE_CASE_REVIEW_CONFIRM, + NavInsID.USE_CASE_STATUS_DISMISS], + "Hold to sign", + ROOT_SCREENSHOT_PATH, + test_name) + # verify signature + vrs = ResponseParser.signature(client.response().data) + addr = recover_transaction(tx_params, vrs) + assert addr == wallet_addr.get() + +def test_delete_positions(backend, firmware, navigator, test_name, wallet_addr): + client = EthAppClient(backend) + + data = contract.encodeABI("deletePositions", [ + [ + 42344, + 8643, + 777777777, + 666, + ] + ]) + + # first setup the external plugin + client.set_external_plugin(PLUGIN_NAME, + contract.address, + # Extract function selector from the encoded data + get_selector_from_data(data)) + + tx_params = { + "nonce": 20, + "maxFeePerGas": Web3.to_wei(145, "gwei"), + "maxPriorityFeePerGas": Web3.to_wei(1.5, "gwei"), + "gas": 173290, + "to": contract.address, + "value": Web3.to_wei(0.1, "ether"), + "chainId": ChainId.ETH, + "data": data + } + + # send the transaction + with client.sign(DERIVATION_PATH, tx_params): + # Validate the on-screen request by performing the navigation appropriate for this device + if firmware.device.startswith("nano"): + navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, + [NavInsID.BOTH_CLICK], + "Accept", + ROOT_SCREENSHOT_PATH, + test_name) + else: + navigator.navigate_until_text_and_compare(NavInsID.USE_CASE_REVIEW_TAP, + [NavInsID.USE_CASE_REVIEW_CONFIRM, + NavInsID.USE_CASE_STATUS_DISMISS], + "Hold to sign", + ROOT_SCREENSHOT_PATH, + test_name) + # verify signature + vrs = ResponseParser.signature(client.response().data) + addr = recover_transaction(tx_params, vrs) + assert addr == wallet_addr.get() + +def test_add_unused_rewards(backend, firmware, navigator, test_name, wallet_addr): + client = EthAppClient(backend) + + data = contract.encodeABI("addUnusedRewards", [ + 20000000000000000000, + 12, + 2 + ]) + + # first setup the external plugin + client.set_external_plugin(PLUGIN_NAME, + contract.address, + # Extract function selector from the encoded data + get_selector_from_data(data)) + + tx_params = { + "nonce": 20, + "maxFeePerGas": Web3.to_wei(145, "gwei"), + "maxPriorityFeePerGas": Web3.to_wei(1.5, "gwei"), + "gas": 173290, + "to": contract.address, + "value": Web3.to_wei(0.1, "ether"), + "chainId": ChainId.ETH, + "data": data + } + + # send the transaction + with client.sign(DERIVATION_PATH, tx_params): + # Validate the on-screen request by performing the navigation appropriate for this device + if firmware.device.startswith("nano"): + navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, + [NavInsID.BOTH_CLICK], + "Accept", + ROOT_SCREENSHOT_PATH, + test_name) + else: + navigator.navigate_until_text_and_compare(NavInsID.USE_CASE_REVIEW_TAP, + [NavInsID.USE_CASE_REVIEW_CONFIRM, + NavInsID.USE_CASE_STATUS_DISMISS], + "Hold to sign", + ROOT_SCREENSHOT_PATH, + test_name) + # verify signature + vrs = ResponseParser.signature(client.response().data) + addr = recover_transaction(tx_params, vrs) + assert addr == wallet_addr.get() + +def test_fund_staking_rewards(backend, firmware, navigator, test_name, wallet_addr): + client = EthAppClient(backend) + + data = contract.encodeABI("fundStakingRewards", [ + 300000000000000000000, + 7, + 6 + ]) + + # first setup the external plugin + client.set_external_plugin(PLUGIN_NAME, + contract.address, + # Extract function selector from the encoded data + get_selector_from_data(data)) + + tx_params = { + "nonce": 20, + "maxFeePerGas": Web3.to_wei(145, "gwei"), + "maxPriorityFeePerGas": Web3.to_wei(1.5, "gwei"), + "gas": 173290, + "to": contract.address, + "value": Web3.to_wei(0.1, "ether"), + "chainId": ChainId.ETH, + "data": data + } + + # send the transaction + with client.sign(DERIVATION_PATH, tx_params): + # Validate the on-screen request by performing the navigation appropriate for this device + if firmware.device.startswith("nano"): + navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, + [NavInsID.BOTH_CLICK], + "Accept", + ROOT_SCREENSHOT_PATH, + test_name) + else: + navigator.navigate_until_text_and_compare(NavInsID.USE_CASE_REVIEW_TAP, + [NavInsID.USE_CASE_REVIEW_CONFIRM, + NavInsID.USE_CASE_STATUS_DISMISS], + "Hold to sign", + ROOT_SCREENSHOT_PATH, + test_name) + # verify signature + vrs = ResponseParser.signature(client.response().data) + addr = recover_transaction(tx_params, vrs) + assert addr == wallet_addr.get()