diff --git a/.clang-format b/.clang-format index b4abfa0..c76e9fc 100644 --- a/.clang-format +++ b/.clang-format @@ -12,7 +12,6 @@ SortIncludes: false SpaceAfterCStyleCast: true AllowShortCaseLabelsOnASingleLine: false AllowAllArgumentsOnNextLine: false -AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: Never AllowShortFunctionsOnASingleLine: None BinPackArguments: false diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index bae98db..3a45c67 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -117,6 +117,7 @@ jobs: with: repository: LedgerHQ/app-ethereum ref: ${{ ((github.base_ref || github.ref_name) == 'main' && 'master') || (github.base_ref || github.ref_name) }} + submodules: recursive - name: Build run: | diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml new file mode 100644 index 0000000..ca465e5 --- /dev/null +++ b/.github/workflows/release-build.yml @@ -0,0 +1,18 @@ +--- +name: Release build + +on: + workflow_dispatch: + push: + branches: + - main + - master + - develop + pull_request: + +jobs: + build: + name: Build application using the reusable workflow + uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1 + with: + upload_app_binaries_artifact: "compiled_app_bindaries" diff --git a/Makefile b/Makefile index f8eeb65..5b85898 100755 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # **************************************************************************** -# Ledger App +# Ledger Ethereum Plugin Staderlabs # (c) 2023 Ledger SAS. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,116 +15,12 @@ # limitations under the License. # **************************************************************************** -ifeq ($(BOLOS_SDK),) -$(error Environment variable BOLOS_SDK is not set) -endif - -include $(BOLOS_SDK)/Makefile.defines - -######################################## -# Mandatory configuration # -######################################## # Application name APPNAME = "Staderlabs" # Application version APPVERSION_M = 1 -APPVERSION_N = 1 -APPVERSION_P = 2 -APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)" - -# Initialize plugin SDK submodule if needed -ifneq ($(shell git submodule status | grep '^[-+]'),) -$(info INFO: Need to reinitialize git submodules) -$(shell git submodule update --init) -endif - -ifeq ($(ETHEREUM_PLUGIN_SDK),) -ETHEREUM_PLUGIN_SDK=ethereum-plugin-sdk -endif - -# Application source files -APP_SOURCE_PATH += src $(ETHEREUM_PLUGIN_SDK) - -# Application icons following guidelines: -# https://developers.ledger.com/docs/embedded-app/design-requirements/#device-icon -ICON_ID = $(shell echo -n "$(APPNAME)" | tr " " "_" | tr "[:upper:]" "[:lower:]") -ICON_NANOS = icons/nanos_app_$(ICON_ID).gif -ICON_NANOX = icons/nanox_app_$(ICON_ID).gif -ICON_NANOSP = $(ICON_NANOX) -ICON_STAX = icons/stax_app_$(ICON_ID).gif - -ifeq ($(TARGET_NAME),TARGET_STAX) - DEFINES += ICONGLYPH=C_stax_$(ICON_ID)_64px - DEFINES += ICONBITMAP=C_stax_$(ICON_ID)_64px_bitmap -endif - -# Application allowed derivation curves. -# Possibles curves are: secp256k1, secp256r1, ed25519 and bls12381g1 -# If your app needs it, you can specify multiple curves by using: -# `CURVE_APP_LOAD_PARAMS = ` -CURVE_APP_LOAD_PARAMS = secp256k1 - -# Application allowed derivation paths. -# You should request a specific path for your app. -# This serve as an isolation mechanism. -# Most application will have to request a path according to the BIP-0044 -# and SLIP-0044 standards. -# If your app needs it, you can specify multiple path by using: -# `PATH_APP_LOAD_PARAMS = "44'/1'" "45'/1'"` -PATH_APP_LOAD_PARAMS = "44'/60'" # purpose=coin(44) / coin_type=Testnet(1) - -# Setting to allow building variant applications -# - is the name of the parameter which should be set -# to specify the variant that should be build. -# - a list of variant that can be build using this app code. -# * It must at least contains one value. -# * Values can be the app ticker or anything else but should be unique. -VARIANT_PARAM = COIN -VARIANT_VALUES = staderlabs - -# Enabling DEBUG flag will enable PRINTF and disable optimizations -#DEBUG = 1 - -######################################## -# Application custom permissions # -######################################## -# See SDK `include/appflags.h` for the purpose of each permission -#HAVE_APPLICATION_FLAG_DERIVE_MASTER = 1 -#HAVE_APPLICATION_FLAG_GLOBAL_PIN = 1 -#HAVE_APPLICATION_FLAG_BOLOS_SETTINGS = 1 -HAVE_APPLICATION_FLAG_LIBRARY = 1 - -######################################## -# Application communication interfaces # -######################################## -#ENABLE_BLUETOOTH = 1 -#ENABLE_NFC = 1 - -######################################## -# NBGL custom features # -######################################## -#ENABLE_NBGL_QRCODE = 1 -#ENABLE_NBGL_KEYBOARD = 1 -#ENABLE_NBGL_KEYPAD = 1 - -######################################## -# Features disablers # -######################################## -# These advanced settings allow to disable some feature that are by -# default enabled in the SDK `Makefile.standard_app`. - -DISABLE_STANDARD_APP_FILES = 1 - -# To allow custom size declaration -#DISABLE_DEFAULT_IO_SEPROXY_BUFFER_SIZE = 1 - -# Will set all the following disablers -#DISABLE_STANDARD_APP_DEFINES = 1 - -DISABLE_STANDARD_SNPRINTF = 1 -#DISABLE_STANDARD_USB = 1 -DISABLE_STANDARD_WEBUSB = 1 -DISABLE_STANDARD_BAGL_UX_FLOW = 1 +APPVERSION_N = 2 +APPVERSION_P = 0 -include $(BOLOS_SDK)/Makefile.standard_app +include ethereum-plugin-sdk/standard_plugin.mk \ No newline at end of file diff --git a/PLUGIN_SPECIFICATION.md b/PLUGIN_SPECIFICATION.md index 3bdc023..4d97f2b 100644 --- a/PLUGIN_SPECIFICATION.md +++ b/PLUGIN_SPECIFICATION.md @@ -34,19 +34,6 @@ Functions covered by above contract/s : |StakeManager | requestWithdraw(uint256 \_amountInBnbX) | `0x745400c9`| `_amountInBnbX` | |StakeManager | claimWithdraw(uint256 \_idx) | `0xb13acedd`| | -#### FTMx - -| Network | Contract Name | Smart Contract | -| ------- | ------------- | -------------------------------------------- | -| Fantom | FTMStaking | `0xb458bfc855ab504a8a327720fcef98886065529b` | - -Functions covered by above contract/s : -|Contract | Function | Selector | Displayed Parameters | -| --- | --- | --- | --- | -|FTMStaking | deposit() | `0xd0e30db0`| native_token_amount (ftm) | -|FTMStaking | undelegate(uint256 wrID, uint256 amountFTMx, uint256 minAmountFTM) | `0x4f864df4`| `amountFTMx` | -|FTMStaking | withdraw(uint256 wrID, uint256 bitmaskToSkip) | `0x441a3e70`| | - #### ETHx | Network | Contract Name | Smart Contract | @@ -60,5 +47,19 @@ Functions covered by above contract/s : |StaderStakePoolsManager | deposit(address \_receiver, string calldata \_referralId) | `0xb7482509`| `_receiver`, native_token_amount (eth) | |UserWithdrawalManager | requestWithdraw(uint256 \_ethXAmount, address \_owner, string calldata \_referralId) | `0x1f7ec122`| `_ethXAmount`, `_owner` | |UserWithdrawalManager | claim(uint256 \_requestId) | `0x379607f5`| | -|StaderStakePoolsManager | deposit(address \_receiver) | `0xf340fa01`| `_receiver`, native_token_amount (eth) | -|UserWithdrawalManager | requestWithdraw(uint256 \_ethXAmount, address \_owner) | `0xccc143b8`| `_ethXAmount`, `_owner` | + +#### KELP + +| Network | Contract Name | Smart Contract | +| ------- | ------------- | -------------------------------------------- | +| Ethereum | LRTDepositPool | `0x036676389e48133B63a802f8635AD39E752D375D` | +| Ethereum | LRTWithdrawalManager | `0x62de59c08eb5dae4b7e6f7a8cad3006d6965ec16` | + + +Functions covered by above contract/s : +|Contract | Function | Selector | Displayed Parameters | +| --- | --- | --- | --- | +|LRTDepositPool | depositETH(uint256 minRSETHAmountExpected, string calldata referralId) | `0x72c51c0b`| native_token_amount (eth) | +|LRTDepositPool | depositAsset(address asset, uint256 depositAmount, uint256 minRSETHAmountExpected, string calldata referralId) | `0xc3ae1766`| `asset`, `depositAmount` | +|LRTWithdrawalManager | initiateWithdrawal(address asset, uint256 rsETHUnstaked) | `0xc8393ba9`| `asset`, `rsETHUnstaked` | +|LRTWithdrawalManager | completeWithdrawal(address asset) | `0x6dbaf9ee`| `asset` | diff --git a/ethereum-plugin-sdk b/ethereum-plugin-sdk index 4d8e044..0afd2a9 160000 --- a/ethereum-plugin-sdk +++ b/ethereum-plugin-sdk @@ -1 +1 @@ -Subproject commit 4d8e04480530cd14dd670a0a6405bca992d16942 +Subproject commit 0afd2a969eb23e8a508560e0e308dc51fb9219e0 diff --git a/glyphs/stax_staderlabs_64px.gif b/glyphs/stax_staderlabs_64px.gif index 26c795f..3e25ee5 100644 Binary files a/glyphs/stax_staderlabs_64px.gif and b/glyphs/stax_staderlabs_64px.gif differ diff --git a/icons/flex_app_staderlabs.gif b/icons/flex_app_staderlabs.gif new file mode 100644 index 0000000..eea37f6 Binary files /dev/null and b/icons/flex_app_staderlabs.gif differ diff --git a/icons/stax_app_staderlabs.gif b/icons/stax_app_staderlabs.gif index 1c1a314..3d350b2 100644 Binary files a/icons/stax_app_staderlabs.gif and b/icons/stax_app_staderlabs.gif differ diff --git a/ledger_app.toml b/ledger_app.toml new file mode 100644 index 0000000..8637560 --- /dev/null +++ b/ledger_app.toml @@ -0,0 +1,4 @@ +[app] +build_directory = "./" +sdk = "C" +devices = ["nanos", "nanox", "nanos+", "stax", "flex"] diff --git a/src/contract.c b/src/contract.c deleted file mode 100644 index 3b71e41..0000000 --- a/src/contract.c +++ /dev/null @@ -1,147 +0,0 @@ -/******************************************************************************* - * Ethereum 2 Deposit Application - * (c) 2020 Ledger - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ********************************************************************************/ - -#include -#include "staderlabs_plugin.h" - -// List of selectors supported by this plugin. - -// Network: Ethereum -// Contract: MaticX -// Method: function submit(uint256 _amount) -// Selector: 0xea99c2a6 -static const uint32_t ETH_MATICX_SUBMIT_SELECTOR = 0xea99c2a6; - -// Network: Ethereum -// Contract: MaticX -// Method: function requestWithdraw(uint256 _amount) -// Selector: 0x745400c9 -static const uint32_t ETH_MATICX_REQUEST_WITHDRAW_SELECTOR = 0x745400c9; - -// Network: Ethereum -// Contract: MaticX -// Method: function claimWithdrawal(uint256 _idx) -// Selector: 0xf8444436 -static const uint32_t ETH_MATICX_CLAIM_WITHDRAWAL_SELECTOR = 0xf8444436; - -// Network: Polygon -// Contract: ChildPool -// Method: function swapMaticForMaticXViaInstantPool() -// Selector: 0xc78cf1a0 -static const uint32_t POLYGON_CHILDPOOL_SWAP_MATIC_FOR_MATICX_VIA_INSTANT_POOL_SELECTOR = - 0xc78cf1a0; - -// Network: Polygon -// Contract: ChildPool -// Method: function requestMaticXSwap(uint256 _amount) -// Selector: 0x48eaf6d6 -static const uint32_t POLYGON_CHILDPOOL_REQUEST_MATICX_SWAP_SELECTOR = 0x48eaf6d6; - -// Network: Polygon -// Contract: ChildPool -// Method: function claimMaticXSwap(uint256 _idx) -// Selector: 0x77baf209 -static const uint32_t POLYGON_CHILDPOOL_CLAIM_MATICX_SWAP_SELECTOR = 0x77baf209; - -// Network: BSC -// Contract: StakeManager -// Method: function deposit() -// Selector: 0xd0e30db0 -static const uint32_t BSC_STAKEMANAGER_DEPOSIT_SELECTOR = 0xd0e30db0; - -// Network: BSC -// Contract: StakeManager -// Method: function requestWithdraw(uint256 _amountInBnbX) -// Selector: 0x745400c9 -static const uint32_t BSC_STAKEMANAGER_REQUEST_WITHDRAW_SELECTOR = 0x745400c9; - -// Network: BSC -// Contract: StakeManager -// Method: function claimWithdraw(uint256 _idx) -// Selector: 0xb13acedd -static const uint32_t BSC_STAKEMANAGER_CLAIM_WITHDRAW_SELECTOR = 0xb13acedd; - -// Network: Fantom -// Contract: FTMStaking -// Method: function deposit() -// Selector: 0xd0e30db0 -static const uint32_t FTM_DEPOSIT_SELECTOR = 0xd0e30db0; - -// Network: Fantom -// Contract: FTMStaking -// Method: function undelegate(uint256 wrID, uint256 amountFTMx, uint256 minAmountFTM) -// Selector: 0x4f864df4 -static const uint32_t FTM_UNDELEGATE_SELECTOR = 0x4f864df4; - -// Network: Fantom -// Contract: FTMStaking -// Method: function withdraw(uint256 wrID, uint256 bitmaskToSkip) -// Selector: 0x441a3e70 -static const uint32_t FTM_WITHDRAW_SELECTOR = 0x441a3e70; - -// Network: Ethereum -// Contract: StaderStakePoolsManager -// Method: function deposit(address _receiver, string calldata _referralId) -// Selector: 0xb7482509 -static const uint32_t ETHX_DEPOSIT_SELECTOR = 0xb7482509; - -// Network: Ethereum -// Contract: UserWithdrawalManager -// Method: -// function requestWithdraw(uint256 _ethXAmount, address _owner, string calldata _referralId) -// Selector: 0x1f7ec122 -static const uint32_t ETHX_REQUEST_WITHDRAW_SELECTOR = 0x1f7ec122; - -// Network: Ethereum -// Contract: UserWithdrawalManager -// Method: function claim(uint256 _requestId) -// Selector: 0x379607f5 -static const uint32_t ETHX_CLAIM_SELECTOR = 0x379607f5; - -// Network: Ethereum -// Contract: StaderStakePoolsManager -// Method: function deposit(address _receiver) -// Selector: 0xf340fa01 -static const uint32_t ETHX_DEPOSIT_LEGACY_SELECTOR = 0xf340fa01; - -// Network: Ethereum -// Contract: UserWithdrawalManager -// Method: function requestWithdraw(uint256 _ethXAmount, address _owner) -// Selector: 0xccc143b8 -static const uint32_t ETHX_REQUEST_WITHDRAW_LEGACY_SELECTOR = 0xccc143b8; - -// Array of all the different staderlabs selectors. Make sure this follows the same order as the -// enum defined in `staderlabs_plugin.h` -const uint32_t STADERLABS_SELECTORS[NUM_SELECTORS] = { - ETH_MATICX_SUBMIT_SELECTOR, - ETH_MATICX_REQUEST_WITHDRAW_SELECTOR, - ETH_MATICX_CLAIM_WITHDRAWAL_SELECTOR, - POLYGON_CHILDPOOL_SWAP_MATIC_FOR_MATICX_VIA_INSTANT_POOL_SELECTOR, - POLYGON_CHILDPOOL_REQUEST_MATICX_SWAP_SELECTOR, - POLYGON_CHILDPOOL_CLAIM_MATICX_SWAP_SELECTOR, - BSC_STAKEMANAGER_DEPOSIT_SELECTOR, - BSC_STAKEMANAGER_REQUEST_WITHDRAW_SELECTOR, - BSC_STAKEMANAGER_CLAIM_WITHDRAW_SELECTOR, - FTM_DEPOSIT_SELECTOR, - FTM_UNDELEGATE_SELECTOR, - FTM_WITHDRAW_SELECTOR, - ETHX_DEPOSIT_SELECTOR, - ETHX_REQUEST_WITHDRAW_SELECTOR, - ETHX_CLAIM_SELECTOR, - ETHX_DEPOSIT_LEGACY_SELECTOR, - ETHX_REQUEST_WITHDRAW_LEGACY_SELECTOR, -}; diff --git a/src/dbg/debug.h b/src/dbg/debug.h deleted file mode 100644 index 06f63df..0000000 --- a/src/dbg/debug.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once -#include - -// Printf that uses speculos semi-hosting features. -void semihosted_printf(const char *format, ...); \ No newline at end of file diff --git a/src/dbg/printf.c b/src/dbg/printf.c deleted file mode 100644 index 7ef63c3..0000000 --- a/src/dbg/printf.c +++ /dev/null @@ -1,567 +0,0 @@ -#include "stdint.h" -#include -#include - -#if !defined(MIN) -#define MIN(x, y) ((x) < (y) ? (x) : (y)) -#endif // MIN - -// Prints the null terminated string pointed by `buf`. -static void debug_write(const char *buf) { - asm volatile( - "movs r0, #0x04\n" - "movs r1, %0\n" - "svc 0xab\n" ::"r"(buf) - : "r0", "r1"); -} - -// Prints a single character `c`. -static void printc(char c) { - char buf[2]; - - buf[0] = c; - buf[1] = 0; - debug_write(buf); -} - -// Prints `size` characters of `str. -static void prints(const char *str, uint16_t size) { - char buf[64]; - - while (size > 0) { - uint8_t written = MIN(sizeof(buf) - 1, size); - - memcpy(buf, str, written); - buf[written] = 0; - debug_write(buf); - - if (written >= size) { - size = 0; - } else { - size -= written; - str += written; - } - } -} - -static const char g_pcHex[] = { - '0', - '1', - '2', - '3', - '4', - '5', - '6', - '7', - '8', - '9', - 'a', - 'b', - 'c', - 'd', - 'e', - 'f', -}; - -static const char g_pcHex_cap[] = { - '0', - '1', - '2', - '3', - '4', - '5', - '6', - '7', - '8', - '9', - 'A', - 'B', - 'C', - 'D', - 'E', - 'F', -}; - -void semihosted_printf(const char *format, ...) { - unsigned long ulIdx, ulValue, ulPos, ulCount, ulBase, ulNeg, ulStrlen, ulCap; - char *pcStr, pcBuf[16], cFill; - va_list vaArgP; - char cStrlenSet; - - // - // Check the arguments. - // - if (format == 0) { - return; - } - - // - // Start the varargs processing. - // - va_start(vaArgP, format); - - // - // Loop while there are more characters in the string. - // - while (*format) { - // - // Find the first non-% character, or the end of the string. - // - for (ulIdx = 0; (format[ulIdx] != '%') && (format[ulIdx] != '\0'); ulIdx++) { - } - - // - // Write this portion of the string. - // - prints(format, ulIdx); - - // - // Skip the portion of the string that was written. - // - format += ulIdx; - - // - // See if the next character is a %. - // - if (*format == '%') { - // - // Skip the %. - // - format++; - - // - // Set the digit count to zero, and the fill character to space - // (i.e. to the defaults). - // - ulCount = 0; - cFill = ' '; - ulStrlen = 0; - cStrlenSet = 0; - ulCap = 0; - ulBase = 10; - - // - // It may be necessary to get back here to process more characters. - // Goto's aren't pretty, but effective. I feel extremely dirty for - // using not one but two of the beasts. - // - again: - - // - // Determine how to handle the next character. - // - switch (*format++) { - // - // Handle the digit characters. - // - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': { - // - // If this is a zero, and it is the first digit, then the - // fill character is a zero instead of a space. - // - if ((format[-1] == '0') && (ulCount == 0)) { - cFill = '0'; - } - - // - // Update the digit count. - // - ulCount *= 10; - ulCount += format[-1] - '0'; - - // - // Get the next character. - // - goto again; - } - - // - // Handle the %c command. - // - case 'c': { - // - // Get the value from the varargs. - // - ulValue = va_arg(vaArgP, unsigned long); - - // - // Print out the character. - // - prints((char *) &ulValue, 1); - - // - // This command has been handled. - // - break; - } - - // - // Handle the %d command. - // - case 'd': { - // - // Get the value from the varargs. - // - ulValue = va_arg(vaArgP, unsigned long); - - // - // Reset the buffer position. - // - ulPos = 0; - - // - // If the value is negative, make it positive and indicate - // that a minus sign is needed. - // - if ((long) ulValue < 0) { - // - // Make the value positive. - // - ulValue = -(long) ulValue; - - // - // Indicate that the value is negative. - // - ulNeg = 1; - } else { - // - // Indicate that the value is positive so that a minus - // sign isn't inserted. - // - ulNeg = 0; - } - - // - // Set the base to 10. - // - ulBase = 10; - - // - // Convert the value to ASCII. - // - goto convert; - } - - // - // Handle ths %.*s command - // special %.*H or %.*h format to print a given length of hex digits (case: H UPPER, - // h lower) - // - case '.': { - // ensure next char is '*' and next one is 's' - if (format[0] == '*' && - (format[1] == 's' || format[1] == 'H' || format[1] == 'h')) { - // skip '*' char - format++; - - ulStrlen = va_arg(vaArgP, unsigned long); - cStrlenSet = 1; - - // interpret next char (H/h/s) - goto again; - } - - // does not support %.2x for example - goto error; - } - - case '*': { - if (*format == 's') { - ulStrlen = va_arg(vaArgP, unsigned long); - cStrlenSet = 2; - goto again; - } - - goto error; - } - - case '-': // -XXs - { - cStrlenSet = 0; - // read a number of space to post pad with ' ' the string to display - goto again; - } - - // - // Handle the %s command. - // %H and %h also - case 'H': - ulCap = 1; // uppercase base 16 - ulBase = 16; - goto case_s; - case 'h': - ulCap = 0; - ulBase = 16; // lowercase base 16 - goto case_s; - case 's': - case_s : { - // - // Get the string pointer from the varargs. - // - pcStr = va_arg(vaArgP, char *); - - // - // Determine the length of the string. (if not specified using .*) - // - switch (cStrlenSet) { - // compute length with strlen - case 0: - for (ulIdx = 0; pcStr[ulIdx] != '\0'; ulIdx++) { - } - break; - - // use given length - case 1: - ulIdx = ulStrlen; - break; - - // printout prepad - case 2: - // if string is empty, then, ' ' padding - if (pcStr[0] == '\0') { - // padd ulStrlen white space - do { - prints(" ", 1); - } while (ulStrlen-- > 0); - - goto s_pad; - } - goto error; // unsupported if replicating the same string multiple - // times - case 3: - // skip '-' still buggy ... - goto again; - } - - // - // Write the string. - // - switch (ulBase) { - default: - prints(pcStr, ulIdx); - break; - case 16: { - unsigned char nibble1, nibble2; - for (ulCount = 0; ulCount < ulIdx; ulCount++) { - nibble1 = (pcStr[ulCount] >> 4) & 0xF; - nibble2 = pcStr[ulCount] & 0xF; - switch (ulCap) { - case 0: - printc(g_pcHex[nibble1]); - printc(g_pcHex[nibble2]); - break; - case 1: - printc(g_pcHex_cap[nibble1]); - printc(g_pcHex_cap[nibble2]); - break; - } - } - break; - } - } - - s_pad: - // - // Write any required padding spaces - // - if (ulCount > ulIdx) { - ulCount -= ulIdx; - while (ulCount--) { - prints(" ", 1); - } - } - // - // This command has been handled. - // - break; - } - - // - // Handle the %u command. - // - case 'u': { - // - // Get the value from the varargs. - // - ulValue = va_arg(vaArgP, unsigned long); - - // - // Reset the buffer position. - // - ulPos = 0; - - // - // Set the base to 10. - // - ulBase = 10; - - // - // Indicate that the value is positive so that a minus sign - // isn't inserted. - // - ulNeg = 0; - - // - // Convert the value to ASCII. - // - goto convert; - } - - // - // Handle the %x and %X commands. Note that they are treated - // identically; i.e. %X will use lower case letters for a-f - // instead of the upper case letters is should use. We also - // alias %p to %x. - // - case 'X': - ulCap = 1; - __attribute__((fallthrough)); - case 'x': - case 'p': { - // - // Get the value from the varargs. - // - ulValue = va_arg(vaArgP, unsigned long); - - // - // Reset the buffer position. - // - ulPos = 0; - - // - // Set the base to 16. - // - ulBase = 16; - - // - // Indicate that the value is positive so that a minus sign - // isn't inserted. - // - ulNeg = 0; - - // - // Determine the number of digits in the string version of - // the value. - // - convert: - for (ulIdx = 1; - (((ulIdx * ulBase) <= ulValue) && (((ulIdx * ulBase) / ulBase) == ulIdx)); - ulIdx *= ulBase, ulCount--) { - } - - // - // If the value is negative, reduce the count of padding - // characters needed. - // - if (ulNeg) { - ulCount--; - } - - // - // If the value is negative and the value is padded with - // zeros, then place the minus sign before the padding. - // - if (ulNeg && (cFill == '0')) { - // - // Place the minus sign in the output buffer. - // - pcBuf[ulPos++] = '-'; - - // - // The minus sign has been placed, so turn off the - // negative flag. - // - ulNeg = 0; - } - - // - // Provide additional padding at the beginning of the - // string conversion if needed. - // - if ((ulCount > 1) && (ulCount < 16)) { - for (ulCount--; ulCount; ulCount--) { - pcBuf[ulPos++] = cFill; - } - } - - // - // If the value is negative, then place the minus sign - // before the number. - // - if (ulNeg) { - // - // Place the minus sign in the output buffer. - // - pcBuf[ulPos++] = '-'; - } - - // - // Convert the value into a string. - // - for (; ulIdx; ulIdx /= ulBase) { - if (!ulCap) { - pcBuf[ulPos++] = g_pcHex[(ulValue / ulIdx) % ulBase]; - } else { - pcBuf[ulPos++] = g_pcHex_cap[(ulValue / ulIdx) % ulBase]; - } - } - - // - // Write the string. - // - prints(pcBuf, ulPos); - - // - // This command has been handled. - // - break; - } - - // - // Handle the %% command. - // - case '%': { - // - // Simply write a single %. - // - prints(format - 1, 1); - - // - // This command has been handled. - // - break; - } - - error: - // - // Handle all other commands. - // - default: { - // - // Indicate an error. - // - prints("ERROR", 5); - - // - // This command has been handled. - // - break; - } - } - } - } - - // - // End the varargs processing. - // - va_end(vaArgP); -} \ No newline at end of file diff --git a/src/handle_finalize.c b/src/handle_finalize.c index 0f0b43b..db7acd5 100644 --- a/src/handle_finalize.c +++ b/src/handle_finalize.c @@ -5,12 +5,21 @@ void handle_finalize(ethPluginFinalize_t *msg) { switch (context->selectorIndex) { case ETHX_DEPOSIT: - case ETHX_DEPOSIT_LEGACY: case ETHX_REQUEST_WITHDRAW: - case ETHX_REQUEST_WITHDRAW_LEGACY: msg->numScreens = 2; break; + case KELP_LST_DEPOSIT: + case KELP_CLAIM_WITHDRAW: + msg->numScreens = 1; + msg->tokenLookup1 = context->token_addr; + break; + + case KELP_INITIATE_WITHDRAW: + msg->numScreens = 2; + msg->tokenLookup1 = context->token_addr; + break; + default: msg->numScreens = 1; break; diff --git a/src/handle_init_contract.c b/src/handle_init_contract.c index 0fa16f0..5856a73 100644 --- a/src/handle_init_contract.c +++ b/src/handle_init_contract.c @@ -1,15 +1,6 @@ +#include "plugin_utils.h" #include "staderlabs_plugin.h" -static int find_selector(uint32_t selector, const uint32_t *selectors, size_t n, selector_t *out) { - for (selector_t i = 0; i < n; i++) { - if (selector == selectors[i]) { - *out = i; - return 0; - } - } - return -1; -} - // Called once to init. void handle_init_contract(ethPluginInitContract_t *msg) { // Make sure we are running a compatible version. @@ -32,78 +23,86 @@ void handle_init_contract(ethPluginInitContract_t *msg) { // Initialize the context (to 0). memset(context, 0, sizeof(*context)); - uint32_t selector = U4BE(msg->selector, 0); - if (find_selector(selector, STADERLABS_SELECTORS, NUM_SELECTORS, &context->selectorIndex)) { + size_t index; + if (!find_selector(U4BE(msg->selector, 0), SELECTORS, SELECTOR_COUNT, &index)) { + PRINTF("Error: selector not found!\n"); msg->result = ETH_PLUGIN_RESULT_UNAVAILABLE; return; } + context->selectorIndex = index; + // check for overflow + if ((size_t) context->selectorIndex != index) { + PRINTF("Error: overflow detected on selector index!\n"); + msg->result = ETH_PLUGIN_RESULT_ERROR; + return; + } // Set `next_param` to be the first field we expect to parse. // EDIT THIS: Adapt the `cases`, and set the `next_param` to be the first parameter you expect // to parse. switch (context->selectorIndex) { - case ETHX_DEPOSIT_LEGACY: case ETHX_DEPOSIT: context->next_param = ACCOUNT_ADDR; - context->ticker = "ETH"; break; - case ETHX_REQUEST_WITHDRAW_LEGACY: case ETHX_REQUEST_WITHDRAW: context->next_param = UNSTAKE_AMOUNT; - context->ticker = "ETHX"; + strlcpy(context->ticker, "ETHX", sizeof(context->ticker)); break; case ETHX_CLAIM: context->next_param = UNEXPECTED_PARAMETER; - context->ticker = "ETH"; + strlcpy(context->ticker, "ETH", sizeof(context->ticker)); break; case ETH_MATICX_SUBMIT: context->next_param = STAKE_AMOUNT; - context->ticker = "MATIC"; + strlcpy(context->ticker, "MATIC", sizeof(context->ticker)); break; case POLYGON_CHILDPOOL_SWAP_MATIC_FOR_MATICX_VIA_INSTANT_POOL: context->next_param = UNEXPECTED_PARAMETER; - context->ticker = "MATIC"; break; case BSC_STAKEMANAGER_DEPOSIT: - // the below case is of no use, as the selector matches with `BSC_STAKEMANAGER_DEPOSIT` - case FTM_DEPOSIT: context->next_param = UNEXPECTED_PARAMETER; - context->ticker = "BNB"; break; case ETH_MATICX_REQUEST_WITHDRAW: - // the below case is of no use, as the selector matches with `ETH_MATICX_REQUEST_WITHDRAW` - case BSC_STAKEMANAGER_REQUEST_WITHDRAW: + // case BSC_STAKEMANAGER_REQUEST_WITHDRAW: + // the selector matches with `ETH_MATICX_REQUEST_WITHDRAW` case POLYGON_CHILDPOOL_REQUEST_MATICX_SWAP: context->next_param = UNSTAKE_AMOUNT; - context->ticker = "MATICX"; - break; - - case FTM_UNDELEGATE: - context->next_param = UNSTAKE_AMOUNT; - context->ticker = "FTMX"; - context->skip_next_param = true; + strlcpy(context->ticker, "MATICX", sizeof(context->ticker)); break; case ETH_MATICX_CLAIM_WITHDRAWAL: case POLYGON_CHILDPOOL_CLAIM_MATICX_SWAP: context->next_param = UNEXPECTED_PARAMETER; - context->ticker = "MATIC"; + strlcpy(context->ticker, "MATIC", sizeof(context->ticker)); break; case BSC_STAKEMANAGER_CLAIM_WITHDRAW: context->next_param = UNEXPECTED_PARAMETER; - context->ticker = "BNB"; + strlcpy(context->ticker, "BNB", sizeof(context->ticker)); + break; + + case KELP_LST_DEPOSIT: + context->next_param = TOKEN_ADDR; break; - case FTM_WITHDRAW: + case KELP_ETH_DEPOSIT: context->next_param = UNEXPECTED_PARAMETER; - context->ticker = "FTM"; + break; + + case KELP_INITIATE_WITHDRAW: + context->next_param = TOKEN_ADDR; + strlcpy(context->ticker, "ETH", sizeof(context->ticker)); + break; + + case KELP_CLAIM_WITHDRAW: + context->next_param = TOKEN_ADDR; + strlcpy(context->ticker, "ETH", sizeof(context->ticker)); break; // Keep this diff --git a/src/handle_provide_parameter.c b/src/handle_provide_parameter.c index 5561352..1fabd84 100644 --- a/src/handle_provide_parameter.c +++ b/src/handle_provide_parameter.c @@ -29,11 +29,6 @@ static void handle_stake(ethPluginProvideParameter_t *msg, context_t *context) { } static void handle_unstake(ethPluginProvideParameter_t *msg, context_t *context) { - if (context->skip_next_param) { // this is currently only useful in ftm_undelegate - context->skip_next_param = false; - return; - } - switch (context->next_param) { case UNSTAKE_AMOUNT: handle_amount_received(msg, context); @@ -87,6 +82,46 @@ static void handle_ethx_request_withdraw(ethPluginProvideParameter_t *msg, conte } } +static void handle_kelp_lst_deposit(ethPluginProvideParameter_t *msg, context_t *context) { + if (context->skip_next_param) { + return; + } + + switch (context->next_param) { + case TOKEN_ADDR: + copy_address(context->token_addr, msg->parameter, sizeof(context->token_addr)); + context->next_param = STAKE_AMOUNT; + break; + + case STAKE_AMOUNT: + handle_amount_received(msg, context); + context->next_param = UNEXPECTED_PARAMETER; + context->skip_next_param = true; + break; + + // Keep this + default: + handle_unsupported_param(msg); + break; + } +} + +static void handle_kelp_initiate_withdraw(ethPluginProvideParameter_t *msg, context_t *context) { + switch (context->next_param) { + case TOKEN_ADDR: + copy_address(context->token_addr, msg->parameter, sizeof(context->token_addr)); + context->next_param = UNSTAKE_AMOUNT; + break; + case UNSTAKE_AMOUNT: + handle_amount_received(msg, context); + context->next_param = UNEXPECTED_PARAMETER; + break; + default: + handle_unsupported_param(msg); + break; + } +} + void handle_provide_parameter(ethPluginProvideParameter_t *msg) { context_t *context = (context_t *) msg->pluginContext; // We use `%.*H`: it's a utility function to print bytes. You first give @@ -101,12 +136,10 @@ void handle_provide_parameter(ethPluginProvideParameter_t *msg) { // EDIT THIS: adapt the cases and the names of the functions. switch (context->selectorIndex) { - case ETHX_DEPOSIT_LEGACY: case ETHX_DEPOSIT: handle_ethx_deposit(msg, context); break; - case ETHX_REQUEST_WITHDRAW_LEGACY: case ETHX_REQUEST_WITHDRAW: handle_ethx_request_withdraw(msg, context); break; @@ -115,21 +148,31 @@ void handle_provide_parameter(ethPluginProvideParameter_t *msg) { handle_stake(msg, context); break; + // case BSC_STAKEMANAGER_REQUEST_WITHDRAW: + // the selector matches with `ETH_MATICX_REQUEST_WITHDRAW` case ETH_MATICX_REQUEST_WITHDRAW: case POLYGON_CHILDPOOL_REQUEST_MATICX_SWAP: - case BSC_STAKEMANAGER_REQUEST_WITHDRAW: - case FTM_UNDELEGATE: handle_unstake(msg, context); break; + case KELP_ETH_DEPOSIT: case ETHX_CLAIM: case ETH_MATICX_CLAIM_WITHDRAWAL: case POLYGON_CHILDPOOL_SWAP_MATIC_FOR_MATICX_VIA_INSTANT_POOL: case POLYGON_CHILDPOOL_CLAIM_MATICX_SWAP: case BSC_STAKEMANAGER_DEPOSIT: - case FTM_DEPOSIT: case BSC_STAKEMANAGER_CLAIM_WITHDRAW: - case FTM_WITHDRAW: + context->next_param = UNEXPECTED_PARAMETER; + break; + case KELP_LST_DEPOSIT: + handle_kelp_lst_deposit(msg, context); + break; + case KELP_INITIATE_WITHDRAW: + handle_kelp_initiate_withdraw(msg, context); + break; + + case KELP_CLAIM_WITHDRAW: + copy_address(context->token_addr, msg->parameter, sizeof(context->token_addr)); context->next_param = UNEXPECTED_PARAMETER; break; diff --git a/src/handle_provide_token.c b/src/handle_provide_token.c index e867f59..3ff25ef 100644 --- a/src/handle_provide_token.c +++ b/src/handle_provide_token.c @@ -4,5 +4,12 @@ // `msg->token1` and `msg->token2`. If those pointers are `NULL`, this means the ethereum app didn't // find any info regarding the requested tokens! void handle_provide_token(ethPluginProvideInfo_t *msg) { + context_t *context = (context_t *) msg->pluginContext; + + // FOR KELP_INITIATE_WITHDRAW, assign the ticker if available, + // else it will be ETH, already set during init_contract + if (msg->item1) { + strlcpy(context->ticker, (char *) msg->item1->token.ticker, sizeof(context->ticker)); + } msg->result = ETH_PLUGIN_RESULT_OK; } diff --git a/src/handle_query_contract_id.c b/src/handle_query_contract_id.c index 738d4b5..af50989 100644 --- a/src/handle_query_contract_id.c +++ b/src/handle_query_contract_id.c @@ -7,26 +7,23 @@ void handle_query_contract_id(ethQueryContractID_t *msg) { // msg->version will be the lower sentence displayed on the screen. // For the first screen, display the plugin name. - strlcpy(msg->name, PLUGIN_NAME, msg->nameLength); + strlcpy(msg->name, APPNAME, msg->nameLength); const char *msgVersion; // EDIT THIS: Adapt the cases by modifying the strings you pass to `strlcpy`. switch (context->selectorIndex) { case ETHX_DEPOSIT: - case ETHX_DEPOSIT_LEGACY: case ETH_MATICX_SUBMIT: case POLYGON_CHILDPOOL_SWAP_MATIC_FOR_MATICX_VIA_INSTANT_POOL: case BSC_STAKEMANAGER_DEPOSIT: - case FTM_DEPOSIT: msgVersion = "Stake"; break; + // case BSC_STAKEMANAGER_REQUEST_WITHDRAW: + // the selector matches with `ETH_MATICX_REQUEST_WITHDRAW` case ETHX_REQUEST_WITHDRAW: - case ETHX_REQUEST_WITHDRAW_LEGACY: case ETH_MATICX_REQUEST_WITHDRAW: case POLYGON_CHILDPOOL_REQUEST_MATICX_SWAP: - case BSC_STAKEMANAGER_REQUEST_WITHDRAW: - case FTM_UNDELEGATE: msgVersion = "Unstake"; break; @@ -34,7 +31,25 @@ void handle_query_contract_id(ethQueryContractID_t *msg) { case ETH_MATICX_CLAIM_WITHDRAWAL: case POLYGON_CHILDPOOL_CLAIM_MATICX_SWAP: case BSC_STAKEMANAGER_CLAIM_WITHDRAW: - case FTM_WITHDRAW: + msgVersion = "Claim"; + break; + + case KELP_LST_DEPOSIT: + strlcpy(msg->name, "Kelp", msg->nameLength); + msgVersion = "LST Restake"; + break; + case KELP_ETH_DEPOSIT: + strlcpy(msg->name, "Kelp", msg->nameLength); + msgVersion = "Native Restake"; + break; + + case KELP_INITIATE_WITHDRAW: + strlcpy(msg->name, "Kelp", msg->nameLength); + msgVersion = "Unstake"; + break; + + case KELP_CLAIM_WITHDRAW: + strlcpy(msg->name, "Kelp", msg->nameLength); msgVersion = "Claim"; break; diff --git a/src/handle_query_contract_ui.c b/src/handle_query_contract_ui.c index 85ece3e..69bf438 100644 --- a/src/handle_query_contract_ui.c +++ b/src/handle_query_contract_ui.c @@ -1,24 +1,21 @@ #include #include "staderlabs_plugin.h" -static bool set_native_token_stake_ui(ethQueryContractUI_t *msg, context_t *context) { +static bool set_native_token_stake_ui(ethQueryContractUI_t *msg) { strlcpy(msg->title, "Stake", msg->titleLength); const uint8_t *native_token_amount = msg->pluginSharedRO->txContent->value.value; uint8_t native_token_amount_size = msg->pluginSharedRO->txContent->value.length; - if (memcmp(msg->network_ticker, "FTM", 3) == 0) { - context->ticker = "FTM"; - } - // Converts the uint256 number located in `native_token_amount` to its string representation and // copies this to `msg->msg`. - return amountToString(native_token_amount, - native_token_amount_size, - WEI_TO_ETHER, - context->ticker, - msg->msg, - msg->msgLength); + return amountToString( + native_token_amount, + native_token_amount_size, + WEI_TO_ETHER, + msg->network_ticker, // token ticker is same as network ticker for native token staking + msg->msg, + msg->msgLength); } static bool set_stake_ui(ethQueryContractUI_t *msg, const context_t *context) { @@ -35,9 +32,8 @@ static bool set_stake_ui(ethQueryContractUI_t *msg, const context_t *context) { static bool set_unstake_ui(ethQueryContractUI_t *msg, context_t *context) { strlcpy(msg->title, "Unstake", msg->titleLength); - char bsc_ticker[MAX_TICKER_LEN] = "BNB"; - if (memcmp(msg->network_ticker, bsc_ticker, 3) == 0) { - context->ticker = "BNBX"; + if (memcmp(msg->network_ticker, "BNB", 3) == 0) { + strlcpy(context->ticker, "BNBX", sizeof(context->ticker)); } return amountToString(context->amount_received, @@ -67,8 +63,7 @@ static bool set_account_addr_ui(ethQueryContractUI_t *msg, context_t *context) { // `msg->msg`. return getEthAddressStringFromBinary( context->account_addr, - (char *) msg->msg + 2, // +2 because we've already prefixed with '0x'. - msg->pluginSharedRW->sha3, // Used by the function to calculate the hash + (char *) msg->msg + 2, // +2 because we've already prefixed with '0x'. chainid); } @@ -80,7 +75,7 @@ static bool handle_ethx_deposit(ethQueryContractUI_t *msg, context_t *context) { switch (msg->screenIndex) { case 0: - ret = set_native_token_stake_ui(msg, context); + ret = set_native_token_stake_ui(msg); break; case 1: strlcpy(msg->title, "Receiver", msg->titleLength); @@ -113,6 +108,35 @@ static bool handle_ethx_request_withdraw(ethQueryContractUI_t *msg, context_t *c return ret; } +static bool handle_kelp_initiate_withdraw(ethQueryContractUI_t *msg, context_t *context) { + bool ret = false; + + memset(msg->title, 0, msg->titleLength); + memset(msg->msg, 0, msg->msgLength); + + switch (msg->screenIndex) { + case 0: + strlcpy(msg->title, "Unstake", msg->titleLength); + ret = amountToString(context->amount_received, + sizeof(context->amount_received), + WEI_TO_ETHER, + "RSETH", + msg->msg, + msg->msgLength); + break; + + case 1: + strlcpy(msg->title, "Asset Expected", msg->titleLength); + strlcpy(msg->msg, context->ticker, msg->msgLength); + ret = true; + break; + + default: + PRINTF("Received an invalid screenIndex\n"); + } + return ret; +} + void handle_query_contract_ui(ethQueryContractUI_t *msg) { context_t *context = (context_t *) msg->pluginContext; bool ret = false; @@ -126,13 +150,14 @@ void handle_query_contract_ui(ethQueryContractUI_t *msg) { switch (context->selectorIndex) { case ETH_MATICX_SUBMIT: + case KELP_LST_DEPOSIT: ret = set_stake_ui(msg, context); break; + // case BSC_STAKEMANAGER_REQUEST_WITHDRAW: + // the selector matches with `ETH_MATICX_REQUEST_WITHDRAW` case ETH_MATICX_REQUEST_WITHDRAW: case POLYGON_CHILDPOOL_REQUEST_MATICX_SWAP: - case BSC_STAKEMANAGER_REQUEST_WITHDRAW: - case FTM_UNDELEGATE: ret = set_unstake_ui(msg, context); break; @@ -140,26 +165,28 @@ void handle_query_contract_ui(ethQueryContractUI_t *msg) { case ETH_MATICX_CLAIM_WITHDRAWAL: case POLYGON_CHILDPOOL_CLAIM_MATICX_SWAP: case BSC_STAKEMANAGER_CLAIM_WITHDRAW: - case FTM_WITHDRAW: + case KELP_CLAIM_WITHDRAW: ret = set_claim_ui(msg, context); break; + case KELP_ETH_DEPOSIT: case POLYGON_CHILDPOOL_SWAP_MATIC_FOR_MATICX_VIA_INSTANT_POOL: case BSC_STAKEMANAGER_DEPOSIT: - case FTM_DEPOSIT: - ret = set_native_token_stake_ui(msg, context); + ret = set_native_token_stake_ui(msg); break; case ETHX_DEPOSIT: - case ETHX_DEPOSIT_LEGACY: ret = handle_ethx_deposit(msg, context); break; case ETHX_REQUEST_WITHDRAW: - case ETHX_REQUEST_WITHDRAW_LEGACY: ret = handle_ethx_request_withdraw(msg, context); break; + case KELP_INITIATE_WITHDRAW: + ret = handle_kelp_initiate_withdraw(msg, context); + break; + default: PRINTF("Selector index: %d not supported\n", context->selectorIndex); } diff --git a/src/staderlabs_plugin.c b/src/staderlabs_plugin.c new file mode 100644 index 0000000..3321c45 --- /dev/null +++ b/src/staderlabs_plugin.c @@ -0,0 +1,23 @@ +/******************************************************************************* + * Plugin Staderlabs + * (c) 2023 Ledger + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ********************************************************************************/ + +#include +#include "staderlabs_plugin.h" + +// This array will be automatically expanded to map all selector_t names with the correct value. +// Do not modify ! +const uint32_t SELECTORS[SELECTOR_COUNT] = {SELECTORS_LIST(TO_VALUE)}; \ No newline at end of file diff --git a/src/staderlabs_plugin.h b/src/staderlabs_plugin.h index 5e09d4a..adb2f0d 100644 --- a/src/staderlabs_plugin.h +++ b/src/staderlabs_plugin.h @@ -1,53 +1,83 @@ +/******************************************************************************* + * Plugin Staderlabs + * (c) 2023 Ledger + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ********************************************************************************/ + #pragma once -#include "eth_internals.h" -#include "eth_plugin_interface.h" #include +#include "eth_plugin_interface.h" -// Number of selectors defined in this plugin. Should match the enum `selector_t`. -#define NUM_SELECTORS 17 +// All possible selectors of your plugin. +// EDIT THIS: Enter your selectors here, in the format X(NAME, value) +// 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(ETH_MATICX_SUBMIT, 0xea99c2a6) \ + X(ETH_MATICX_REQUEST_WITHDRAW, 0x745400c9) \ + X(ETH_MATICX_CLAIM_WITHDRAWAL, 0xf8444436) \ + X(POLYGON_CHILDPOOL_SWAP_MATIC_FOR_MATICX_VIA_INSTANT_POOL, 0xc78cf1a0) \ + X(POLYGON_CHILDPOOL_REQUEST_MATICX_SWAP, 0x48eaf6d6) \ + X(POLYGON_CHILDPOOL_CLAIM_MATICX_SWAP, 0x77baf209) \ + X(BSC_STAKEMANAGER_DEPOSIT, 0xd0e30db0) \ + X(BSC_STAKEMANAGER_REQUEST_WITHDRAW, 0x745400c9) \ + X(BSC_STAKEMANAGER_CLAIM_WITHDRAW, 0xb13acedd) \ + X(ETHX_DEPOSIT, 0xb7482509) \ + X(ETHX_REQUEST_WITHDRAW, 0x1f7ec122) \ + X(ETHX_CLAIM, 0x379607f5) \ + X(KELP_LST_DEPOSIT, 0xc3ae1766) \ + X(KELP_ETH_DEPOSIT, 0x72c51c0b) \ + X(KELP_INITIATE_WITHDRAW, 0xc8393ba9) \ + X(KELP_CLAIM_WITHDRAW, 0x6dbaf9ee) -// Name of the plugin. -#define PLUGIN_NAME "Staderlabs" +// Xmacro helpers to define the enum and map +// Do not modify ! +#define TO_ENUM(selector_name, selector_id) selector_name, +#define TO_VALUE(selector_name, selector_id) selector_id, -// Enumeration of the different selectors possible. -// Should follow the exact same order as the array declared in main.c -typedef enum { - ETH_MATICX_SUBMIT = 0, - ETH_MATICX_REQUEST_WITHDRAW, - ETH_MATICX_CLAIM_WITHDRAWAL, - POLYGON_CHILDPOOL_SWAP_MATIC_FOR_MATICX_VIA_INSTANT_POOL, - POLYGON_CHILDPOOL_REQUEST_MATICX_SWAP, - POLYGON_CHILDPOOL_CLAIM_MATICX_SWAP, - BSC_STAKEMANAGER_DEPOSIT, - BSC_STAKEMANAGER_REQUEST_WITHDRAW, - BSC_STAKEMANAGER_CLAIM_WITHDRAW, - FTM_DEPOSIT, - FTM_UNDELEGATE, - FTM_WITHDRAW, - ETHX_DEPOSIT, - ETHX_REQUEST_WITHDRAW, - ETHX_CLAIM, - ETHX_DEPOSIT_LEGACY, - ETHX_REQUEST_WITHDRAW_LEGACY, +// This enum will be automatically expanded to hold all selector names. +// The value SELECTOR_COUNT can be used to get the number of defined selectors +// Do not modify ! +typedef enum selector_e { + SELECTORS_LIST(TO_ENUM) SELECTOR_COUNT, } selector_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]; + // Enumeration used to parse the smart contract data. +// EDIT THIS: Adapt the parameter names here. typedef enum { STAKE_AMOUNT = 0, UNSTAKE_AMOUNT, ACCOUNT_ADDR, + TOKEN_ADDR, UNEXPECTED_PARAMETER, } parameter; -extern const uint32_t STADERLABS_SELECTORS[NUM_SELECTORS]; - // Shared global memory with Ethereum app. Must be at most 5 * 32 bytes. -typedef struct context_t { +// EDIT THIS: This struct is used by your plugin to save the parameters you parse. You +// will need to adapt this struct to your plugin. +typedef struct context_s { // For display. uint8_t amount_received[INT256_LENGTH]; - const char *ticker; uint8_t account_addr[ADDRESS_LENGTH]; + uint8_t token_addr[ADDRESS_LENGTH]; + char ticker[MAX_TICKER_LEN]; // For parsing data. uint8_t next_param; // Set to be the next param we expect to parse. @@ -57,6 +87,6 @@ typedef struct context_t { selector_t selectorIndex; } context_t; -// Piece of code that will check that the above structure is not bigger than 5 * 32. Do not remove -// this check. -_Static_assert(sizeof(context_t) <= 5 * 32, "Structure of parameters too big."); +// Check if the context structure will fit in the RAM section ETH will prepare for us +// Do not remove! +ASSERT_SIZEOF_PLUGIN_CONTEXT(context_t); \ No newline at end of file diff --git a/tests/networks/ethereum/staderlabs/abis/0x036676389e48133b63a802f8635ad39e752d375d.json b/tests/networks/ethereum/staderlabs/abis/0x036676389e48133b63a802f8635ad39e752d375d.json new file mode 100644 index 0000000..3eb76a9 --- /dev/null +++ b/tests/networks/ethereum/staderlabs/abis/0x036676389e48133b63a802f8635ad39e752d375d.json @@ -0,0 +1,745 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AssetNotSupported", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotLRTConfigAdmin", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotLRTConfigManager", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAmountToDeposit", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMaximumNodeDelegatorLimit", + "type": "error" + }, + { + "inputs": [], + "name": "MaximumDepositLimitReached", + "type": "error" + }, + { + "inputs": [], + "name": "MaximumNodeDelegatorLimitReached", + "type": "error" + }, + { + "inputs": [], + "name": "MinimumAmountToReceiveNotMet", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "assetAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "assetBalance", + "type": "uint256" + } + ], + "name": "NodeDelegatorHasAssetBalance", + "type": "error" + }, + { + "inputs": [], + "name": "NodeDelegatorHasETH", + "type": "error" + }, + { + "inputs": [], + "name": "NodeDelegatorNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "NotEnoughAssetToTransfer", + "type": "error" + }, + { + "inputs": [], + "name": "TokenTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInUse", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "depositor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rsethMintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "referralId", + "type": "string" + } + ], + "name": "AssetDeposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "depositor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rsethMintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "referralId", + "type": "string" + } + ], + "name": "ETHDeposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ethAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "toAsset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "returnAmount", + "type": "uint256" + } + ], + "name": "ETHSwappedForLST", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxNodeDelegatorLimit", + "type": "uint256" + } + ], + "name": "MaxNodeDelegatorLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "minAmountToDeposit", + "type": "uint256" + } + ], + "name": "MinAmountToDepositUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "nodeDelegatorContracts", + "type": "address[]" + } + ], + "name": "NodeDelegatorAddedinQueue", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "nodeDelegatorContracts", + "type": "address" + } + ], + "name": "NodeDelegatorRemovedFromQueue", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "lrtConfig", + "type": "address" + } + ], + "name": "UpdatedLRTConfig", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "nodeDelegatorContracts", + "type": "address[]" + } + ], + "name": "addNodeDelegatorContractToQueue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "depositAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minRSETHAmountExpected", + "type": "uint256" + }, + { + "internalType": "string", + "name": "referralId", + "type": "string" + } + ], + "name": "depositAsset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minRSETHAmountExpected", + "type": "uint256" + }, + { + "internalType": "string", + "name": "referralId", + "type": "string" + } + ], + "name": "depositETH", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "getAssetCurrentLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "getAssetDistributionData", + "outputs": [ + { + "internalType": "uint256", + "name": "assetLyingInDepositPool", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetLyingInNDCs", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetStakedInEigenLayer", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getETHDistributionData", + "outputs": [ + { + "internalType": "uint256", + "name": "ethLyingInDepositPool", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ethLyingInNDCs", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ethStakedInEigenLayer", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNodeDelegatorQueue", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "getRsETHAmountToMint", + "outputs": [ + { + "internalType": "uint256", + "name": "rsethAmountToMint", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "toAsset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "ethAmountToSend", + "type": "uint256" + } + ], + "name": "getSwapETHToAssetReturnAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "returnAmount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "getTotalAssetDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "totalAssetDeposit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "lrtConfigAddr", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isNodeDelegator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lrtConfig", + "outputs": [ + { + "internalType": "contract ILRTConfig", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxNodeDelegatorLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minAmountToDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "nodeDelegatorQueue", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "nodeDelegatorContracts", + "type": "address[]" + } + ], + "name": "removeManyNodeDelegatorContractsFromQueue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nodeDelegatorAddress", + "type": "address" + } + ], + "name": "removeNodeDelegatorContractFromQueue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minAmountToDeposit_", + "type": "uint256" + } + ], + "name": "setMinAmountToDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "toAsset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minToAssetAmount", + "type": "uint256" + } + ], + "name": "swapETHForAssetWithinDepositPool", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ndcIndex", + "type": "uint256" + }, + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferAssetToNodeDelegator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ndcIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferETHToNodeDelegator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "lrtConfigAddr", + "type": "address" + } + ], + "name": "updateLRTConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxNodeDelegatorLimit_", + "type": "uint256" + } + ], + "name": "updateMaxNodeDelegatorLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] \ No newline at end of file diff --git a/tests/networks/ethereum/staderlabs/abis/0x62de59c08eb5dae4b7e6f7a8cad3006d6965ec16.json b/tests/networks/ethereum/staderlabs/abis/0x62de59c08eb5dae4b7e6f7a8cad3006d6965ec16.json new file mode 100644 index 0000000..116b4f0 --- /dev/null +++ b/tests/networks/ethereum/staderlabs/abis/0x62de59c08eb5dae4b7e6f7a8cad3006d6965ec16.json @@ -0,0 +1,774 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AmountMustBeGreaterThanZero", + "type": "error" + }, + { + "inputs": [], + "name": "AssetNotSupported", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assetPrice", + "type": "uint256" + } + ], + "name": "AssetPriceMustBeGreaterMinimum", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotLRTConfigAdmin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "role", + "type": "string" + } + ], + "name": "CallerNotLRTConfigAllowedRole", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotLRTConfigOperator", + "type": "error" + }, + { + "inputs": [], + "name": "EthTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ExceedAmountToWithdraw", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAmountToWithdraw", + "type": "error" + }, + { + "inputs": [], + "name": "NoPendingWithdrawals", + "type": "error" + }, + { + "inputs": [], + "name": "QueueEmpty", + "type": "error" + }, + { + "inputs": [], + "name": "QueueFull", + "type": "error" + }, + { + "inputs": [], + "name": "QueueOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "rsEthPrice", + "type": "uint256" + } + ], + "name": "RsETHPriceMustBeGreaterMinimum", + "type": "error" + }, + { + "inputs": [], + "name": "StrategyNotSupported", + "type": "error" + }, + { + "inputs": [], + "name": "TokenTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInUse", + "type": "error" + }, + { + "inputs": [], + "name": "WithdrawalDelayNotPassed", + "type": "error" + }, + { + "inputs": [], + "name": "WithdrawalDelayTooSmall", + "type": "error" + }, + { + "inputs": [], + "name": "WithdrawalLocked", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rsEthAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assetAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rsEThPrice", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assetPrice", + "type": "uint256" + } + ], + "name": "AssetUnlocked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "withdrawer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountBurned", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountReceived", + "type": "uint256" + } + ], + "name": "AssetWithdrawalFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "withdrawer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rsETHUnstaked", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + } + ], + "name": "AssetWithdrawalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "depositor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ethAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesAmount", + "type": "uint256" + } + ], + "name": "EtherReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "minRsEthAmountToWithdraw", + "type": "uint256" + } + ], + "name": "MinAmountToWithdrawUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "lrtConfig", + "type": "address" + } + ], + "name": "UpdatedLRTConfig", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawalDelayBlocks", + "type": "uint256" + } + ], + "name": "WithdrawalDelayBlocksUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "assetsCommitted", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "completeWithdrawal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "getAvailableAssetAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "availableAssetAmount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "getExpectedAssetAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "underlyingToReceive", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "requestIndex", + "type": "uint256" + } + ], + "name": "getRequestId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "userIndex", + "type": "uint256" + } + ], + "name": "getUserWithdrawalRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "rsETHAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAssetAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "withdrawalStartBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "lrtConfigAddr", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "rsETHUnstaked", + "type": "uint256" + } + ], + "name": "initiateWithdrawal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lrtConfig", + "outputs": [ + { + "internalType": "contract ILRTConfig", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "minRsEthAmountToWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "nextLockedNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "requestNonce", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "nextUnusedNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "receiveFromLRTUnstakingVault", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minRsEthAmountToWithdraw_", + "type": "uint256" + } + ], + "name": "setMinRsEthAmountToWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "withdrawalDelayBlocks_", + "type": "uint256" + } + ], + "name": "setWithdrawalDelayBlocks", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "firstExcludedIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumAssetPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumRsEthPrice", + "type": "uint256" + } + ], + "name": "unlockQueue", + "outputs": [ + { + "internalType": "uint256", + "name": "rsETHBurned", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetAmountUnlocked", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "lrtConfigAddr", + "type": "address" + } + ], + "name": "updateLRTConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "userAssociatedNonces", + "outputs": [ + { + "internalType": "uint128", + "name": "_begin", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_end", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawalDelayBlocks", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "requestId", + "type": "bytes32" + } + ], + "name": "withdrawalRequests", + "outputs": [ + { + "internalType": "uint256", + "name": "rsETHUnstaked", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAssetAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "withdrawalStartBlock", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] \ No newline at end of file diff --git a/tests/networks/ethereum/staderlabs/b2c.json b/tests/networks/ethereum/staderlabs/b2c.json index 0cad120..54c134a 100644 --- a/tests/networks/ethereum/staderlabs/b2c.json +++ b/tests/networks/ethereum/staderlabs/b2c.json @@ -26,11 +26,6 @@ "address": "0xcf5ea1b38380f6af39068375516daf40ed70d299", "contractName": "StaderStakePoolsManager", "selectors": { - "0xf340fa01": { - "erc20OfInterest": [], - "method": "deposit", - "plugin": "Staderlabs" - }, "0xb7482509": { "erc20OfInterest": [], "method": "deposit", @@ -42,11 +37,6 @@ "address": "0x9f0491b32dbce587c50c4c43ab303b06478193a7", "contractName": "UserWithdrawalManager", "selectors": { - "0xccc143b8": { - "erc20OfInterest": [], - "method": "requestWithdraw", - "plugin": "Staderlabs" - }, "0x1f7ec122": { "erc20OfInterest": [], "method": "requestWithdraw", @@ -58,7 +48,45 @@ "plugin": "Staderlabs" } } + }, + { + "address": "0x036676389e48133b63a802f8635ad39e752d375d", + "contractName": "LRTDepositPool", + "selectors": { + "0xc3ae1766": { + "erc20OfInterest": [ + "asset" + ], + "method": "depositAsset", + "plugin": "Staderlabs" + }, + "0x72c51c0b": { + "erc20OfInterest": [], + "method": "depositETH", + "plugin": "Staderlabs" + } + } + }, + { + "address": "0x62de59c08eb5dae4b7e6f7a8cad3006d6965ec16", + "contractName": "LRTWithdrawalManager", + "selectors": { + "0xc8393ba9": { + "erc20OfInterest": [ + "asset" + ], + "method": "initiateWithdrawal", + "plugin": "Staderlabs" + }, + "0x6dbaf9ee": { + "erc20OfInterest": [ + "asset" + ], + "method": "completeWithdrawal", + "plugin": "Staderlabs" + } + } } ], "name": "Staderlabs" -} +} \ No newline at end of file diff --git a/tests/networks/fantom/staderlabs/abis/0xb458bfc855ab504a8a327720fcef98886065529b.json b/tests/networks/fantom/staderlabs/abis/0xb458bfc855ab504a8a327720fcef98886065529b.json deleted file mode 100644 index d048cb5..0000000 --- a/tests/networks/fantom/staderlabs/abis/0xb458bfc855ab504a8a327720fcef98886065529b.json +++ /dev/null @@ -1,929 +0,0 @@ -[ - { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "low", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "high", - "type": "uint256" - } - ], - "name": "LogDepositLimitUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ftmxAmount", - "type": "uint256" - } - ], - "name": "LogDeposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "duration", - "type": "uint256" - } - ], - "name": "LogEpochDurationSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "lockupDuration", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "LogLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "newValue", - "type": "bool" - } - ], - "name": "LogMaintenancePausedUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "newValue", - "type": "bool" - } - ], - "name": "LogUndelegatePausedUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "wrID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountFTMx", - "type": "uint256" - } - ], - "name": "LogUndelegated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "validatorPicker", - "type": "address" - } - ], - "name": "LogValidatorPickerSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "maturedIndex", - "type": "uint256" - } - ], - "name": "LogVaultHarvested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "LogVaultOwnerUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "LogVaultWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "newValue", - "type": "bool" - } - ], - "name": "LogWithdrawPausedUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "delay", - "type": "uint256" - } - ], - "name": "LogWithdrawalDelaySet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "wrID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "bitmaskToSkip", - "type": "uint256" - } - ], - "name": "LogWithdrawn", - "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": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "DECIMAL_UNIT", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FTMX", - "outputs": [ - { - "internalType": "contract IERC20Burnable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_LOCKUP_DURATION", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SFC", - "outputs": [ - { "internalType": "contract ISFC", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "UNLOCKED_REWARD_RATIO", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "allWithdrawalRequests", - "outputs": [ - { "internalType": "uint256", "name": "requestTime", "type": "uint256" }, - { "internalType": "uint256", "name": "poolAmount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "undelegateAmount", - "type": "uint256" - }, - { "internalType": "uint256", "name": "penalty", "type": "uint256" }, - { "internalType": "address", "name": "user", "type": "address" }, - { "internalType": "bool", "name": "isWithdrawn", "type": "bool" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "amountFTMx", "type": "uint256" } - ], - "name": "calculatePenalty", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" }, - { "internalType": "uint256", "name": "", "type": "uint256" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "claimRewardsAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "currentVaultCount", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "currentVaultPtr", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "epochDuration", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ftmPendingWithdrawal", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getExchangeRate", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "ftmAmount", "type": "uint256" }, - { "internalType": "bool", "name": "toIgnore", "type": "bool" } - ], - "name": "getFTMxAmountForFTM", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "vaultIndex", "type": "uint256" } - ], - "name": "getMaturedVault", - "outputs": [ - { "internalType": "address payable", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMaturedVaultLength", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPoolBalance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "vaultIndex", "type": "uint256" } - ], - "name": "getVault", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "wrID", "type": "uint256" } - ], - "name": "getWithdrawalInfo", - "outputs": [ - { - "components": [ - { - "internalType": "address payable", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountToUnlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountToUndelegate", - "type": "uint256" - } - ], - "internalType": "struct FTMStaking.UndelegateInfo[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "vaultIndex", "type": "uint256" } - ], - "name": "harvestVault", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20Burnable", - "name": "_ftmx_", - "type": "address" - }, - { "internalType": "contract ISFC", "name": "_sfc_", "type": "address" }, - { - "internalType": "uint256", - "name": "maxVaultCount_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "epochDuration_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "withdrawalDelay_", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "lastKnownEpoch", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "lock", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maintenancePaused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxDeposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxVaultCount", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minDeposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nextEligibleTimestamp", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "pickVaultsToUndelegate", - "outputs": [ - { - "components": [ - { - "internalType": "address payable", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountToUnlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountToUndelegate", - "type": "uint256" - } - ], - "internalType": "struct FTMStaking.UndelegateInfo[]", - "name": "", - "type": "tuple[]" - }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "protocolFeeBIPS", - "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": "low", "type": "uint256" }, - { "internalType": "uint256", "name": "high", "type": "uint256" } - ], - "name": "setDepositLimits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "duration", "type": "uint256" } - ], - "name": "setEpochDuration", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bool", "name": "desiredValue", "type": "bool" } - ], - "name": "setMaintenancePaused", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "newFeeBIPS", "type": "uint256" } - ], - "name": "setProtocolFeeBIPS", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "newTreasury", "type": "address" } - ], - "name": "setTreasury", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bool", "name": "desiredValue", "type": "bool" } - ], - "name": "setUndelegatePaused", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IValidatorPicker", - "name": "picker", - "type": "address" - } - ], - "name": "setValidatorPicker", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bool", "name": "desiredValue", "type": "bool" } - ], - "name": "setWithdrawPaused", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "delay", "type": "uint256" } - ], - "name": "setWithdrawalDelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "totalFTMWorth", - "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": [], - "name": "treasury", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "wrID", "type": "uint256" }, - { "internalType": "uint256", "name": "amountFTMx", "type": "uint256" }, - { "internalType": "uint256", "name": "minAmountFTM", "type": "uint256" } - ], - "name": "undelegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "undelegatePaused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address payable", "name": "vault", "type": "address" }, - { "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "updateVaultOwner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "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": "validatorPicker", - "outputs": [ - { - "internalType": "contract IValidatorPicker", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "wrID", "type": "uint256" }, - { "internalType": "uint256", "name": "bitmaskToSkip", "type": "uint256" } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "maturedIndex", "type": "uint256" } - ], - "name": "withdrawMatured", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawPaused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawalDelay", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } -] diff --git a/tests/networks/fantom/staderlabs/b2c.json b/tests/networks/fantom/staderlabs/b2c.json deleted file mode 100644 index 02451fb..0000000 --- a/tests/networks/fantom/staderlabs/b2c.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chainId": 250, - "contracts": [ - { - "address": "0xb458bfc855ab504a8a327720fcef98886065529b", - "contractName": "FTMStaking", - "selectors": { - "0xd0e30db0": { - "erc20OfInterest": [], - "method": "deposit", - "plugin": "Staderlabs" - }, - "0x4f864df4": { - "erc20OfInterest": [], - "method": "undelegate", - "plugin": "Staderlabs" - }, - "0x441a3e70": { - "erc20OfInterest": [], - "method": "withdraw", - "plugin": "Staderlabs" - } - } - } - ], - "name": "Staderlabs" -} diff --git a/tests/snapshots/bsc_bnbx_nanosp_claim_withdraw/00001.png b/tests/snapshots/bsc_bnbx_nanosp_claim_withdraw/00001.png index 8d2714a..b9c5003 100644 Binary files a/tests/snapshots/bsc_bnbx_nanosp_claim_withdraw/00001.png and b/tests/snapshots/bsc_bnbx_nanosp_claim_withdraw/00001.png differ diff --git a/tests/snapshots/bsc_bnbx_nanosp_claim_withdraw/00004.png b/tests/snapshots/bsc_bnbx_nanosp_claim_withdraw/00004.png index 3af6333..02dee0e 100644 Binary files a/tests/snapshots/bsc_bnbx_nanosp_claim_withdraw/00004.png and b/tests/snapshots/bsc_bnbx_nanosp_claim_withdraw/00004.png differ diff --git a/tests/snapshots/bsc_bnbx_nanosp_claim_withdraw/00006.png b/tests/snapshots/bsc_bnbx_nanosp_claim_withdraw/00006.png index a58590b..6578872 100644 Binary files a/tests/snapshots/bsc_bnbx_nanosp_claim_withdraw/00006.png and b/tests/snapshots/bsc_bnbx_nanosp_claim_withdraw/00006.png differ diff --git a/tests/snapshots/bsc_bnbx_nanosp_deposit/00001.png b/tests/snapshots/bsc_bnbx_nanosp_deposit/00001.png index 6767056..fff06c7 100644 Binary files a/tests/snapshots/bsc_bnbx_nanosp_deposit/00001.png and b/tests/snapshots/bsc_bnbx_nanosp_deposit/00001.png differ diff --git a/tests/snapshots/bsc_bnbx_nanosp_deposit/00002.png b/tests/snapshots/bsc_bnbx_nanosp_deposit/00002.png index 971be23..b7cb101 100644 Binary files a/tests/snapshots/bsc_bnbx_nanosp_deposit/00002.png and b/tests/snapshots/bsc_bnbx_nanosp_deposit/00002.png differ diff --git a/tests/snapshots/bsc_bnbx_nanosp_deposit/00004.png b/tests/snapshots/bsc_bnbx_nanosp_deposit/00004.png index 3af6333..02dee0e 100644 Binary files a/tests/snapshots/bsc_bnbx_nanosp_deposit/00004.png and b/tests/snapshots/bsc_bnbx_nanosp_deposit/00004.png differ diff --git a/tests/snapshots/bsc_bnbx_nanosp_deposit/00006.png b/tests/snapshots/bsc_bnbx_nanosp_deposit/00006.png index a58590b..6578872 100644 Binary files a/tests/snapshots/bsc_bnbx_nanosp_deposit/00006.png and b/tests/snapshots/bsc_bnbx_nanosp_deposit/00006.png differ diff --git a/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00001.png b/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00001.png index ccdcd19..911e699 100644 Binary files a/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00001.png and b/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00001.png differ diff --git a/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00002.png b/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00002.png index b0635ea..b1c2853 100644 Binary files a/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00002.png and b/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00002.png differ diff --git a/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00004.png b/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00004.png index 3af6333..02dee0e 100644 Binary files a/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00004.png and b/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00004.png differ diff --git a/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00006.png b/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00006.png index a58590b..6578872 100644 Binary files a/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00006.png and b/tests/snapshots/bsc_bnbx_nanosp_request_withdraw/00006.png differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00001.png b/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00001.png deleted file mode 100644 index 1d263aa..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00001.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00002.png b/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00002.png deleted file mode 100644 index 4c24343..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00002.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00003.png b/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00003.png deleted file mode 100644 index b9738b4..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00003.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00004.png b/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00004.png deleted file mode 100644 index 62517e8..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00004.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00005.png b/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00005.png deleted file mode 100644 index d00ffb9..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00005.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00007.png b/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00007.png deleted file mode 100644 index 07b4b29..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00007.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00008.png b/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00008.png deleted file mode 100644 index 095bef4..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00008.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00001.png b/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00001.png deleted file mode 100644 index f8d7ed1..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00001.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00002.png b/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00002.png deleted file mode 100644 index 2322ff5..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00002.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00003.png b/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00003.png deleted file mode 100644 index 3d2dc64..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00003.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00004.png b/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00004.png deleted file mode 100644 index b7e3cac..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00004.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00005.png b/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00005.png deleted file mode 100644 index e2cb9fa..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00005.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00007.png b/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00007.png deleted file mode 100644 index c135a4b..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00007.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00008.png b/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00008.png deleted file mode 100644 index 7b71a4d..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00008.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_claim_eth/00001.png b/tests/snapshots/ethereum_ethx_nanosp_claim_eth/00001.png index 8d2714a..b9c5003 100644 Binary files a/tests/snapshots/ethereum_ethx_nanosp_claim_eth/00001.png and b/tests/snapshots/ethereum_ethx_nanosp_claim_eth/00001.png differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_claim_eth/00003.png b/tests/snapshots/ethereum_ethx_nanosp_claim_eth/00003.png index d989a81..1ab0e92 100644 Binary files a/tests/snapshots/ethereum_ethx_nanosp_claim_eth/00003.png and b/tests/snapshots/ethereum_ethx_nanosp_claim_eth/00003.png differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_claim_eth/00005.png b/tests/snapshots/ethereum_ethx_nanosp_claim_eth/00005.png index a58590b..6578872 100644 Binary files a/tests/snapshots/ethereum_ethx_nanosp_claim_eth/00005.png and b/tests/snapshots/ethereum_ethx_nanosp_claim_eth/00005.png differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00001.png b/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00001.png deleted file mode 100644 index ccdcd19..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00001.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00002.png b/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00002.png deleted file mode 100644 index d89b812..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00002.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00003.png b/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00003.png deleted file mode 100644 index 79dcca1..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00003.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00004.png b/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00004.png deleted file mode 100644 index e8276dd..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00004.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00006.png b/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00006.png deleted file mode 100644 index a58590b..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00006.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00001.png b/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00001.png deleted file mode 100644 index 6767056..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00001.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00002.png b/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00002.png deleted file mode 100644 index 2438285..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00002.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00003.png b/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00003.png deleted file mode 100644 index 1d2f308..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00003.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00004.png b/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00004.png deleted file mode 100644 index e5979a2..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00004.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00006.png b/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00006.png deleted file mode 100644 index a58590b..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00006.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00001.png b/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00001.png index ccdcd19..911e699 100644 Binary files a/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00001.png and b/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00001.png differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00002.png b/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00002.png index 95c7e5b..aaf8925 100644 Binary files a/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00002.png and b/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00002.png differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00004.png b/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00004.png index dc1c042..79ecbf6 100644 Binary files a/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00004.png and b/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00004.png differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00006.png b/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00006.png index a58590b..6578872 100644 Binary files a/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00006.png and b/tests/snapshots/ethereum_ethx_nanosp_request_withdraw_eth/00006.png differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00001.png b/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00001.png index 6767056..fff06c7 100644 Binary files a/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00001.png and b/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00001.png differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00002.png b/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00002.png index 98c9d65..84477f5 100644 Binary files a/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00002.png and b/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00002.png differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00004.png b/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00004.png index 49c7ad9..0b28391 100644 Binary files a/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00004.png and b/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00004.png differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00006.png b/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00006.png index a58590b..6578872 100644 Binary files a/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00006.png and b/tests/snapshots/ethereum_ethx_nanosp_stake_eth/00006.png differ diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00001.png b/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00001.png deleted file mode 100644 index 911e699..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00001.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00002.png b/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00002.png deleted file mode 100644 index 30f0cec..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00002.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00003.png b/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00003.png deleted file mode 100644 index 79dcca1..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00003.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00004.png b/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00004.png deleted file mode 100644 index f30afe2..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00004.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00001.png b/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00001.png deleted file mode 100644 index fff06c7..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00001.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00002.png b/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00002.png deleted file mode 100644 index 41f278c..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00002.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00003.png b/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00003.png deleted file mode 100644 index 1d2f308..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00003.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00004.png b/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00004.png deleted file mode 100644 index e4e5c5d..0000000 Binary files a/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00004.png and /dev/null differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00000.png b/tests/snapshots/ethereum_kelp_claim_eth_nanos/00000.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00000.png rename to tests/snapshots/ethereum_kelp_claim_eth_nanos/00000.png diff --git a/tests/snapshots/ethereum_kelp_claim_eth_nanos/00001.png b/tests/snapshots/ethereum_kelp_claim_eth_nanos/00001.png new file mode 100644 index 0000000..a8889a8 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_eth_nanos/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_claim_eth_nanos/00002.png b/tests/snapshots/ethereum_kelp_claim_eth_nanos/00002.png new file mode 100644 index 0000000..48d0f86 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_eth_nanos/00002.png differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00006.png b/tests/snapshots/ethereum_kelp_claim_eth_nanos/00003.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00006.png rename to tests/snapshots/ethereum_kelp_claim_eth_nanos/00003.png diff --git a/tests/snapshots/ethereum_kelp_claim_eth_nanos/00004.png b/tests/snapshots/ethereum_kelp_claim_eth_nanos/00004.png new file mode 100644 index 0000000..b66bc3c Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_eth_nanos/00004.png differ diff --git a/tests/snapshots/ethereum_kelp_claim_eth_nanos/00005.png b/tests/snapshots/ethereum_kelp_claim_eth_nanos/00005.png new file mode 100644 index 0000000..0e8ca1b Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_eth_nanos/00005.png differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00009.png b/tests/snapshots/ethereum_kelp_claim_eth_nanos/00006.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00009.png rename to tests/snapshots/ethereum_kelp_claim_eth_nanos/00006.png diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00010.png b/tests/snapshots/ethereum_kelp_claim_eth_nanos/00007.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanos_legacy_request_withdraw_eth/00010.png rename to tests/snapshots/ethereum_kelp_claim_eth_nanos/00007.png diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00000.png b/tests/snapshots/ethereum_kelp_claim_eth_nanosp/00000.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00000.png rename to tests/snapshots/ethereum_kelp_claim_eth_nanosp/00000.png diff --git a/tests/snapshots/ethereum_kelp_claim_eth_nanosp/00001.png b/tests/snapshots/ethereum_kelp_claim_eth_nanosp/00001.png new file mode 100644 index 0000000..460363c Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_eth_nanosp/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_claim_eth_nanosp/00002.png b/tests/snapshots/ethereum_kelp_claim_eth_nanosp/00002.png new file mode 100644 index 0000000..62fd4e7 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_eth_nanosp/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_claim_eth_nanosp/00003.png b/tests/snapshots/ethereum_kelp_claim_eth_nanosp/00003.png new file mode 100644 index 0000000..e1452e9 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_eth_nanosp/00003.png differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00005.png b/tests/snapshots/ethereum_kelp_claim_eth_nanosp/00004.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanosp_legacy_request_withdraw_eth/00005.png rename to tests/snapshots/ethereum_kelp_claim_eth_nanosp/00004.png diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00006.png b/tests/snapshots/ethereum_kelp_claim_eth_nanosp/00005.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00006.png rename to tests/snapshots/ethereum_kelp_claim_eth_nanosp/00005.png diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00000.png b/tests/snapshots/ethereum_kelp_claim_eth_nanox/00000.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00000.png rename to tests/snapshots/ethereum_kelp_claim_eth_nanox/00000.png diff --git a/tests/snapshots/ethereum_kelp_claim_eth_nanox/00001.png b/tests/snapshots/ethereum_kelp_claim_eth_nanox/00001.png new file mode 100644 index 0000000..460363c Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_eth_nanox/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_claim_eth_nanox/00002.png b/tests/snapshots/ethereum_kelp_claim_eth_nanox/00002.png new file mode 100644 index 0000000..62fd4e7 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_eth_nanox/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_claim_eth_nanox/00003.png b/tests/snapshots/ethereum_kelp_claim_eth_nanox/00003.png new file mode 100644 index 0000000..e1452e9 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_eth_nanox/00003.png differ diff --git a/tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00005.png b/tests/snapshots/ethereum_kelp_claim_eth_nanox/00004.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanosp_legacy_stake_eth/00005.png rename to tests/snapshots/ethereum_kelp_claim_eth_nanox/00004.png diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00006.png b/tests/snapshots/ethereum_kelp_claim_eth_nanox/00005.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00006.png rename to tests/snapshots/ethereum_kelp_claim_eth_nanox/00005.png diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00000.png b/tests/snapshots/ethereum_kelp_claim_lst_nanos/00000.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00000.png rename to tests/snapshots/ethereum_kelp_claim_lst_nanos/00000.png diff --git a/tests/snapshots/ethereum_kelp_claim_lst_nanos/00001.png b/tests/snapshots/ethereum_kelp_claim_lst_nanos/00001.png new file mode 100644 index 0000000..a8889a8 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_lst_nanos/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_claim_lst_nanos/00002.png b/tests/snapshots/ethereum_kelp_claim_lst_nanos/00002.png new file mode 100644 index 0000000..c410454 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_lst_nanos/00002.png differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00006.png b/tests/snapshots/ethereum_kelp_claim_lst_nanos/00003.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00006.png rename to tests/snapshots/ethereum_kelp_claim_lst_nanos/00003.png diff --git a/tests/snapshots/ethereum_kelp_claim_lst_nanos/00004.png b/tests/snapshots/ethereum_kelp_claim_lst_nanos/00004.png new file mode 100644 index 0000000..2129c85 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_lst_nanos/00004.png differ diff --git a/tests/snapshots/ethereum_kelp_claim_lst_nanos/00005.png b/tests/snapshots/ethereum_kelp_claim_lst_nanos/00005.png new file mode 100644 index 0000000..a402456 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_lst_nanos/00005.png differ diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00009.png b/tests/snapshots/ethereum_kelp_claim_lst_nanos/00006.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00009.png rename to tests/snapshots/ethereum_kelp_claim_lst_nanos/00006.png diff --git a/tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00010.png b/tests/snapshots/ethereum_kelp_claim_lst_nanos/00007.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanos_legacy_stake_eth/00010.png rename to tests/snapshots/ethereum_kelp_claim_lst_nanos/00007.png diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00000.png b/tests/snapshots/ethereum_kelp_claim_lst_nanosp/00000.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00000.png rename to tests/snapshots/ethereum_kelp_claim_lst_nanosp/00000.png diff --git a/tests/snapshots/ethereum_kelp_claim_lst_nanosp/00001.png b/tests/snapshots/ethereum_kelp_claim_lst_nanosp/00001.png new file mode 100644 index 0000000..460363c Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_lst_nanosp/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_claim_lst_nanosp/00002.png b/tests/snapshots/ethereum_kelp_claim_lst_nanosp/00002.png new file mode 100644 index 0000000..47010a7 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_lst_nanosp/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_claim_lst_nanosp/00003.png b/tests/snapshots/ethereum_kelp_claim_lst_nanosp/00003.png new file mode 100644 index 0000000..6b87502 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_lst_nanosp/00003.png differ diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00005.png b/tests/snapshots/ethereum_kelp_claim_lst_nanosp/00004.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanox_legacy_request_withdraw_eth/00005.png rename to tests/snapshots/ethereum_kelp_claim_lst_nanosp/00004.png diff --git a/tests/snapshots/fantom_ftmx_nanox_deposit/00006.png b/tests/snapshots/ethereum_kelp_claim_lst_nanosp/00005.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanox_deposit/00006.png rename to tests/snapshots/ethereum_kelp_claim_lst_nanosp/00005.png diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00000.png b/tests/snapshots/ethereum_kelp_claim_lst_nanox/00000.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00000.png rename to tests/snapshots/ethereum_kelp_claim_lst_nanox/00000.png diff --git a/tests/snapshots/ethereum_kelp_claim_lst_nanox/00001.png b/tests/snapshots/ethereum_kelp_claim_lst_nanox/00001.png new file mode 100644 index 0000000..460363c Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_lst_nanox/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_claim_lst_nanox/00002.png b/tests/snapshots/ethereum_kelp_claim_lst_nanox/00002.png new file mode 100644 index 0000000..47010a7 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_lst_nanox/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_claim_lst_nanox/00003.png b/tests/snapshots/ethereum_kelp_claim_lst_nanox/00003.png new file mode 100644 index 0000000..6b87502 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_claim_lst_nanox/00003.png differ diff --git a/tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00005.png b/tests/snapshots/ethereum_kelp_claim_lst_nanox/00004.png similarity index 100% rename from tests/snapshots/ethereum_ethx_nanox_legacy_stake_eth/00005.png rename to tests/snapshots/ethereum_kelp_claim_lst_nanox/00004.png diff --git a/tests/snapshots/fantom_ftmx_nanox_undelegate/00006.png b/tests/snapshots/ethereum_kelp_claim_lst_nanox/00005.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanox_undelegate/00006.png rename to tests/snapshots/ethereum_kelp_claim_lst_nanox/00005.png diff --git a/tests/snapshots/fantom_ftmx_nanos_deposit/00000.png b/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00000.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanos_deposit/00000.png rename to tests/snapshots/ethereum_kelp_nanos_deposit_eth/00000.png diff --git a/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00001.png b/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00001.png new file mode 100644 index 0000000..106ecf6 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00002.png b/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00002.png new file mode 100644 index 0000000..5715b23 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00003.png b/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00003.png new file mode 100644 index 0000000..1595331 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00003.png differ diff --git a/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00004.png b/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00004.png new file mode 100644 index 0000000..d959a36 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00004.png differ diff --git a/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00005.png b/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00005.png new file mode 100644 index 0000000..96fac90 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00005.png differ diff --git a/tests/snapshots/fantom_ftmx_nanos_deposit/00005.png b/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00006.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanos_deposit/00005.png rename to tests/snapshots/ethereum_kelp_nanos_deposit_eth/00006.png diff --git a/tests/snapshots/fantom_ftmx_nanos_deposit/00006.png b/tests/snapshots/ethereum_kelp_nanos_deposit_eth/00007.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanos_deposit/00006.png rename to tests/snapshots/ethereum_kelp_nanos_deposit_eth/00007.png diff --git a/tests/snapshots/fantom_ftmx_nanos_undelegate/00000.png b/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00000.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanos_undelegate/00000.png rename to tests/snapshots/ethereum_kelp_nanos_deposit_lst/00000.png diff --git a/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00001.png b/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00001.png new file mode 100644 index 0000000..5cc2653 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00002.png b/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00002.png new file mode 100644 index 0000000..39e88bb Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00003.png b/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00003.png new file mode 100644 index 0000000..1595331 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00003.png differ diff --git a/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00004.png b/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00004.png new file mode 100644 index 0000000..88e9c19 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00004.png differ diff --git a/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00005.png b/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00005.png new file mode 100644 index 0000000..7782392 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00005.png differ diff --git a/tests/snapshots/fantom_ftmx_nanos_undelegate/00005.png b/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00006.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanos_undelegate/00005.png rename to tests/snapshots/ethereum_kelp_nanos_deposit_lst/00006.png diff --git a/tests/snapshots/fantom_ftmx_nanos_undelegate/00006.png b/tests/snapshots/ethereum_kelp_nanos_deposit_lst/00007.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanos_undelegate/00006.png rename to tests/snapshots/ethereum_kelp_nanos_deposit_lst/00007.png diff --git a/tests/snapshots/fantom_ftmx_nanosp_deposit/00000.png b/tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00000.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanosp_deposit/00000.png rename to tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00000.png diff --git a/tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00001.png b/tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00001.png new file mode 100644 index 0000000..3af4214 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00002.png b/tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00002.png new file mode 100644 index 0000000..c81699b Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00003.png b/tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00003.png new file mode 100644 index 0000000..13005df Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00003.png differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_deposit/00005.png b/tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00004.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanosp_deposit/00005.png rename to tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00004.png diff --git a/tests/snapshots/fantom_ftmx_nanox_withdraw/00006.png b/tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00005.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanox_withdraw/00006.png rename to tests/snapshots/ethereum_kelp_nanosp_deposit_eth/00005.png diff --git a/tests/snapshots/fantom_ftmx_nanosp_undelegate/00000.png b/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00000.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanosp_undelegate/00000.png rename to tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00000.png diff --git a/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00001.png b/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00001.png new file mode 100644 index 0000000..c8cae1c Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00002.png b/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00002.png new file mode 100644 index 0000000..348cdcf Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00003.png b/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00003.png new file mode 100644 index 0000000..b34ebc2 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00003.png differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_undelegate/00005.png b/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00004.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanosp_undelegate/00005.png rename to tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00004.png diff --git a/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00005.png b/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00005.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanosp_deposit_lst/00005.png differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_withdraw/00000.png b/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00000.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanosp_withdraw/00000.png rename to tests/snapshots/ethereum_kelp_nanox_deposit_eth/00000.png diff --git a/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00001.png b/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00001.png new file mode 100644 index 0000000..3af4214 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00002.png b/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00002.png new file mode 100644 index 0000000..c81699b Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00003.png b/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00003.png new file mode 100644 index 0000000..13005df Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00003.png differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_withdraw/00005.png b/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00004.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanosp_withdraw/00005.png rename to tests/snapshots/ethereum_kelp_nanox_deposit_eth/00004.png diff --git a/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00005.png b/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00005.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanox_deposit_eth/00005.png differ diff --git a/tests/snapshots/fantom_ftmx_nanox_deposit/00000.png b/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00000.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanox_deposit/00000.png rename to tests/snapshots/ethereum_kelp_nanox_deposit_lst/00000.png diff --git a/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00001.png b/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00001.png new file mode 100644 index 0000000..c8cae1c Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00002.png b/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00002.png new file mode 100644 index 0000000..348cdcf Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00003.png b/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00003.png new file mode 100644 index 0000000..b34ebc2 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00003.png differ diff --git a/tests/snapshots/fantom_ftmx_nanox_deposit/00005.png b/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00004.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanox_deposit/00005.png rename to tests/snapshots/ethereum_kelp_nanox_deposit_lst/00004.png diff --git a/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00005.png b/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00005.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_nanox_deposit_lst/00005.png differ diff --git a/tests/snapshots/fantom_ftmx_nanos_withdraw/00000.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00000.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanos_withdraw/00000.png rename to tests/snapshots/ethereum_kelp_unstake_eth_nanos/00000.png diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00001.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00001.png new file mode 100644 index 0000000..3ac7050 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00002.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00002.png new file mode 100644 index 0000000..748a5ef Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00003.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00003.png new file mode 100644 index 0000000..3fb2cea Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00003.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00004.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00004.png new file mode 100644 index 0000000..1595331 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00004.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00005.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00005.png new file mode 100644 index 0000000..734e7b2 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00005.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00006.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00006.png new file mode 100644 index 0000000..7307247 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00006.png differ diff --git a/tests/snapshots/fantom_ftmx_nanos_withdraw/00005.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00007.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanos_withdraw/00005.png rename to tests/snapshots/ethereum_kelp_unstake_eth_nanos/00007.png diff --git a/tests/snapshots/fantom_ftmx_nanos_withdraw/00006.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanos/00008.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanos_withdraw/00006.png rename to tests/snapshots/ethereum_kelp_unstake_eth_nanos/00008.png diff --git a/tests/snapshots/fantom_ftmx_nanox_undelegate/00000.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00000.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanox_undelegate/00000.png rename to tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00000.png diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00001.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00001.png new file mode 100644 index 0000000..6c7d10e Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00002.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00002.png new file mode 100644 index 0000000..83a4a4e Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00003.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00003.png new file mode 100644 index 0000000..c94a771 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00003.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00004.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00004.png new file mode 100644 index 0000000..632c2fa Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00004.png differ diff --git a/tests/snapshots/fantom_ftmx_nanox_undelegate/00005.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00005.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanox_undelegate/00005.png rename to tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00005.png diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00006.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00006.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanosp/00006.png differ diff --git a/tests/snapshots/fantom_ftmx_nanox_withdraw/00000.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00000.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanox_withdraw/00000.png rename to tests/snapshots/ethereum_kelp_unstake_eth_nanox/00000.png diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00001.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00001.png new file mode 100644 index 0000000..6c7d10e Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00002.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00002.png new file mode 100644 index 0000000..83a4a4e Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00003.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00003.png new file mode 100644 index 0000000..c94a771 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00003.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00004.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00004.png new file mode 100644 index 0000000..632c2fa Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00004.png differ diff --git a/tests/snapshots/fantom_ftmx_nanox_withdraw/00005.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00005.png similarity index 100% rename from tests/snapshots/fantom_ftmx_nanox_withdraw/00005.png rename to tests/snapshots/ethereum_kelp_unstake_eth_nanox/00005.png diff --git a/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00006.png b/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00006.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_eth_nanox/00006.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00000.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00000.png new file mode 100644 index 0000000..8d84cc7 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00000.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00001.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00001.png new file mode 100644 index 0000000..3ac7050 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00002.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00002.png new file mode 100644 index 0000000..adc6579 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00003.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00003.png new file mode 100644 index 0000000..49bbb9f Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00003.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00004.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00004.png new file mode 100644 index 0000000..1595331 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00004.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00005.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00005.png new file mode 100644 index 0000000..93dcb75 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00005.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00006.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00006.png new file mode 100644 index 0000000..2f38728 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00006.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00007.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00007.png new file mode 100644 index 0000000..1c9156c Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00007.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00008.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00008.png new file mode 100644 index 0000000..ce795f3 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanos/00008.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00000.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00000.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00001.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00001.png new file mode 100644 index 0000000..6c7d10e Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00002.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00002.png new file mode 100644 index 0000000..f16a51d Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00003.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00003.png new file mode 100644 index 0000000..93fcf44 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00003.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00004.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00004.png new file mode 100644 index 0000000..c206d4f Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00004.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00005.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00005.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00005.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00006.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00006.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanosp/00006.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00000.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00000.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00001.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00001.png new file mode 100644 index 0000000..6c7d10e Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00001.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00002.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00002.png new file mode 100644 index 0000000..f16a51d Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00002.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00003.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00003.png new file mode 100644 index 0000000..93fcf44 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00003.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00004.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00004.png new file mode 100644 index 0000000..c206d4f Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00004.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00005.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00005.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00005.png differ diff --git a/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00006.png b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00006.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/ethereum_kelp_unstake_lst_nanox/00006.png differ diff --git a/tests/snapshots/ethereum_maticx_nanosp_claim_matic/00001.png b/tests/snapshots/ethereum_maticx_nanosp_claim_matic/00001.png index 8d2714a..b9c5003 100644 Binary files a/tests/snapshots/ethereum_maticx_nanosp_claim_matic/00001.png and b/tests/snapshots/ethereum_maticx_nanosp_claim_matic/00001.png differ diff --git a/tests/snapshots/ethereum_maticx_nanosp_claim_matic/00003.png b/tests/snapshots/ethereum_maticx_nanosp_claim_matic/00003.png index 8a5e3f0..da9e1b2 100644 Binary files a/tests/snapshots/ethereum_maticx_nanosp_claim_matic/00003.png and b/tests/snapshots/ethereum_maticx_nanosp_claim_matic/00003.png differ diff --git a/tests/snapshots/ethereum_maticx_nanosp_claim_matic/00005.png b/tests/snapshots/ethereum_maticx_nanosp_claim_matic/00005.png index a58590b..6578872 100644 Binary files a/tests/snapshots/ethereum_maticx_nanosp_claim_matic/00005.png and b/tests/snapshots/ethereum_maticx_nanosp_claim_matic/00005.png differ diff --git a/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00001.png b/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00001.png index 6767056..fff06c7 100644 Binary files a/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00001.png and b/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00001.png differ diff --git a/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00002.png b/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00002.png index 10d9774..82a8739 100644 Binary files a/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00002.png and b/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00002.png differ diff --git a/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00003.png b/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00003.png index 3d80533..a4d0243 100644 Binary files a/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00003.png and b/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00003.png differ diff --git a/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00005.png b/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00005.png index a58590b..6578872 100644 Binary files a/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00005.png and b/tests/snapshots/ethereum_maticx_nanosp_stake_matic/00005.png differ diff --git a/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00001.png b/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00001.png index ccdcd19..911e699 100644 Binary files a/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00001.png and b/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00001.png differ diff --git a/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00002.png b/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00002.png index 5329e55..838a184 100644 Binary files a/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00002.png and b/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00002.png differ diff --git a/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00003.png b/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00003.png index 386c820..f9d64d1 100644 Binary files a/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00003.png and b/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00003.png differ diff --git a/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00005.png b/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00005.png index a58590b..6578872 100644 Binary files a/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00005.png and b/tests/snapshots/ethereum_maticx_nanosp_unstake_maticx/00005.png differ diff --git a/tests/snapshots/fantom_ftmx_nanos_deposit/00001.png b/tests/snapshots/fantom_ftmx_nanos_deposit/00001.png deleted file mode 100644 index f8d7ed1..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanos_deposit/00001.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanos_deposit/00002.png b/tests/snapshots/fantom_ftmx_nanos_deposit/00002.png deleted file mode 100644 index 2afc12b..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanos_deposit/00002.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanos_deposit/00003.png b/tests/snapshots/fantom_ftmx_nanos_deposit/00003.png deleted file mode 100644 index 6ac0cce..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanos_deposit/00003.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanos_deposit/00004.png b/tests/snapshots/fantom_ftmx_nanos_deposit/00004.png deleted file mode 100644 index 8ef155a..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanos_deposit/00004.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanos_undelegate/00001.png b/tests/snapshots/fantom_ftmx_nanos_undelegate/00001.png deleted file mode 100644 index 1d263aa..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanos_undelegate/00001.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanos_undelegate/00002.png b/tests/snapshots/fantom_ftmx_nanos_undelegate/00002.png deleted file mode 100644 index f6ce4ea..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanos_undelegate/00002.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanos_undelegate/00003.png b/tests/snapshots/fantom_ftmx_nanos_undelegate/00003.png deleted file mode 100644 index 6ac0cce..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanos_undelegate/00003.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanos_undelegate/00004.png b/tests/snapshots/fantom_ftmx_nanos_undelegate/00004.png deleted file mode 100644 index 8ef155a..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanos_undelegate/00004.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanos_withdraw/00001.png b/tests/snapshots/fantom_ftmx_nanos_withdraw/00001.png deleted file mode 100644 index 9a2b3d0..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanos_withdraw/00001.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanos_withdraw/00002.png b/tests/snapshots/fantom_ftmx_nanos_withdraw/00002.png deleted file mode 100644 index dbfd11e..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanos_withdraw/00002.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanos_withdraw/00003.png b/tests/snapshots/fantom_ftmx_nanos_withdraw/00003.png deleted file mode 100644 index 6ac0cce..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanos_withdraw/00003.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanos_withdraw/00004.png b/tests/snapshots/fantom_ftmx_nanos_withdraw/00004.png deleted file mode 100644 index 8ef155a..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanos_withdraw/00004.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_deposit/00001.png b/tests/snapshots/fantom_ftmx_nanosp_deposit/00001.png deleted file mode 100644 index 6767056..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_deposit/00001.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_deposit/00002.png b/tests/snapshots/fantom_ftmx_nanosp_deposit/00002.png deleted file mode 100644 index ff6bebb..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_deposit/00002.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_deposit/00003.png b/tests/snapshots/fantom_ftmx_nanosp_deposit/00003.png deleted file mode 100644 index f248f9b..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_deposit/00003.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_deposit/00004.png b/tests/snapshots/fantom_ftmx_nanosp_deposit/00004.png deleted file mode 100644 index 764e442..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_deposit/00004.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_deposit/00006.png b/tests/snapshots/fantom_ftmx_nanosp_deposit/00006.png deleted file mode 100644 index a58590b..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_deposit/00006.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_undelegate/00001.png b/tests/snapshots/fantom_ftmx_nanosp_undelegate/00001.png deleted file mode 100644 index ccdcd19..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_undelegate/00001.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_undelegate/00002.png b/tests/snapshots/fantom_ftmx_nanosp_undelegate/00002.png deleted file mode 100644 index 0baca1f..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_undelegate/00002.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_undelegate/00003.png b/tests/snapshots/fantom_ftmx_nanosp_undelegate/00003.png deleted file mode 100644 index f248f9b..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_undelegate/00003.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_undelegate/00004.png b/tests/snapshots/fantom_ftmx_nanosp_undelegate/00004.png deleted file mode 100644 index 764e442..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_undelegate/00004.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_undelegate/00006.png b/tests/snapshots/fantom_ftmx_nanosp_undelegate/00006.png deleted file mode 100644 index a58590b..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_undelegate/00006.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_withdraw/00001.png b/tests/snapshots/fantom_ftmx_nanosp_withdraw/00001.png deleted file mode 100644 index 8d2714a..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_withdraw/00001.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_withdraw/00002.png b/tests/snapshots/fantom_ftmx_nanosp_withdraw/00002.png deleted file mode 100644 index ddc7638..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_withdraw/00002.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_withdraw/00003.png b/tests/snapshots/fantom_ftmx_nanosp_withdraw/00003.png deleted file mode 100644 index f248f9b..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_withdraw/00003.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_withdraw/00004.png b/tests/snapshots/fantom_ftmx_nanosp_withdraw/00004.png deleted file mode 100644 index 764e442..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_withdraw/00004.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanosp_withdraw/00006.png b/tests/snapshots/fantom_ftmx_nanosp_withdraw/00006.png deleted file mode 100644 index a58590b..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanosp_withdraw/00006.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanox_deposit/00001.png b/tests/snapshots/fantom_ftmx_nanox_deposit/00001.png deleted file mode 100644 index fff06c7..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanox_deposit/00001.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanox_deposit/00002.png b/tests/snapshots/fantom_ftmx_nanox_deposit/00002.png deleted file mode 100644 index c9c70b1..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanox_deposit/00002.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanox_deposit/00003.png b/tests/snapshots/fantom_ftmx_nanox_deposit/00003.png deleted file mode 100644 index f248f9b..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanox_deposit/00003.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanox_deposit/00004.png b/tests/snapshots/fantom_ftmx_nanox_deposit/00004.png deleted file mode 100644 index 7c6b3b5..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanox_deposit/00004.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanox_undelegate/00001.png b/tests/snapshots/fantom_ftmx_nanox_undelegate/00001.png deleted file mode 100644 index 911e699..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanox_undelegate/00001.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanox_undelegate/00002.png b/tests/snapshots/fantom_ftmx_nanox_undelegate/00002.png deleted file mode 100644 index ed970e3..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanox_undelegate/00002.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanox_undelegate/00003.png b/tests/snapshots/fantom_ftmx_nanox_undelegate/00003.png deleted file mode 100644 index f248f9b..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanox_undelegate/00003.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanox_undelegate/00004.png b/tests/snapshots/fantom_ftmx_nanox_undelegate/00004.png deleted file mode 100644 index 7c6b3b5..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanox_undelegate/00004.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanox_withdraw/00001.png b/tests/snapshots/fantom_ftmx_nanox_withdraw/00001.png deleted file mode 100644 index b9c5003..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanox_withdraw/00001.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanox_withdraw/00002.png b/tests/snapshots/fantom_ftmx_nanox_withdraw/00002.png deleted file mode 100644 index ddc7638..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanox_withdraw/00002.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanox_withdraw/00003.png b/tests/snapshots/fantom_ftmx_nanox_withdraw/00003.png deleted file mode 100644 index f248f9b..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanox_withdraw/00003.png and /dev/null differ diff --git a/tests/snapshots/fantom_ftmx_nanox_withdraw/00004.png b/tests/snapshots/fantom_ftmx_nanox_withdraw/00004.png deleted file mode 100644 index 7c6b3b5..0000000 Binary files a/tests/snapshots/fantom_ftmx_nanox_withdraw/00004.png and /dev/null differ diff --git a/tests/snapshots/polygon_maticx_nanosp_claim_maticx_swap/00001.png b/tests/snapshots/polygon_maticx_nanosp_claim_maticx_swap/00001.png index 8d2714a..b9c5003 100644 Binary files a/tests/snapshots/polygon_maticx_nanosp_claim_maticx_swap/00001.png and b/tests/snapshots/polygon_maticx_nanosp_claim_maticx_swap/00001.png differ diff --git a/tests/snapshots/polygon_maticx_nanosp_claim_maticx_swap/00004.png b/tests/snapshots/polygon_maticx_nanosp_claim_maticx_swap/00004.png index ca6fa96..8677395 100644 Binary files a/tests/snapshots/polygon_maticx_nanosp_claim_maticx_swap/00004.png and b/tests/snapshots/polygon_maticx_nanosp_claim_maticx_swap/00004.png differ diff --git a/tests/snapshots/polygon_maticx_nanosp_claim_maticx_swap/00006.png b/tests/snapshots/polygon_maticx_nanosp_claim_maticx_swap/00006.png index a58590b..6578872 100644 Binary files a/tests/snapshots/polygon_maticx_nanosp_claim_maticx_swap/00006.png and b/tests/snapshots/polygon_maticx_nanosp_claim_maticx_swap/00006.png differ diff --git a/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00001.png b/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00001.png index ccdcd19..911e699 100644 Binary files a/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00001.png and b/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00001.png differ diff --git a/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00002.png b/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00002.png index d40fa8d..bc4c68d 100644 Binary files a/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00002.png and b/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00002.png differ diff --git a/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00004.png b/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00004.png index ca6fa96..8677395 100644 Binary files a/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00004.png and b/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00004.png differ diff --git a/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00006.png b/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00006.png index a58590b..6578872 100644 Binary files a/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00006.png and b/tests/snapshots/polygon_maticx_nanosp_request_maticx_swap/00006.png differ diff --git a/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00001.png b/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00001.png index 6767056..fff06c7 100644 Binary files a/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00001.png and b/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00001.png differ diff --git a/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00002.png b/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00002.png index f1d49f5..974000a 100644 Binary files a/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00002.png and b/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00002.png differ diff --git a/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00004.png b/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00004.png index ca6fa96..8677395 100644 Binary files a/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00004.png and b/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00004.png differ diff --git a/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00006.png b/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00006.png index a58590b..6578872 100644 Binary files a/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00006.png and b/tests/snapshots/polygon_maticx_nanosp_swap_matic_via_ipool/00006.png differ diff --git a/tests/src/eth/ethx/deposit_legacy.test.js b/tests/src/eth/kelp/claimETH.test.js similarity index 52% rename from tests/src/eth/ethx/deposit_legacy.test.js rename to tests/src/eth/kelp/claimETH.test.js index e00487d..5f0e6ff 100644 --- a/tests/src/eth/ethx/deposit_legacy.test.js +++ b/tests/src/eth/kelp/claimETH.test.js @@ -8,30 +8,27 @@ import { txFromEtherscan, } from "../../test.fixture"; -const contractAddr = "0xcf5ea1b38380f6af39068375516daf40ed70d299"; -const pluginName = "staderlabs"; const testNetwork = "ethereum"; -const chainID = 1; -// Test from replayed transaction: https://etherscan.io/tx/0x4e771017864ff34176c8c9fa62fe1950852933345f921dc5316c63554c9bc453 +// Test from replayed transaction: https://etherscan.io/tx/0xa5458f18af5bd00d7bda4332f33af93e0f7cd7294c6715dbf5a4c143f0a1d6e3 const inputData = - "0x02f8980113850550de54dd850550de54dd8301c88a94cf5ea1b38380f6af39068375516daf40ed70d29987038d7ea4c68000a4f340fa01000000000000000000000000ad345b348bd84a4b42a5fde63feb7a29ef2af4e9c080a0a3adf22f4ce9fead664befb0ca33730f3bb8edb1a1d65a7f5275ac9a8622d29ea01a99e171740d723ee61049d7f0465f4e219fca86aaddf06bab02d3400f554242"; + "0x02f89001078439d106808502f335de57830227ce9462de59c08eb5dae4b7e6f7a8cad3006d6965ec1680a46dbaf9ee000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeec080a0e5b528d407765077dc056f703a6b616bff83ed970eb2250615e94347846ad133a040c023c952756e5aa6d25dec78cb7f67f9ebb5f42de588d6e46c34e2976f6308"; nano_models.forEach(function (model) { test( - "[Nano " + model.letter + "] Legacy Deposit ETH", + "[Nano " + model.letter + "] Kelp Claim ETH", zemu(model, async (sim, eth) => { const serializedTx = txFromEtherscan(inputData); const tx = eth.signTransaction("44'/60'/0'/0", serializedTx); - const right_clicks = model.letter === "S" ? 9 : 5; + const right_clicks = model.letter === "S" ? 6 : 4; // Wait for the application to actually load and parse the transaction await waitForAppScreen(sim); // Navigate the display by pressing the right button `right_clicks` times, then pressing both buttons to accept the transaction. await sim.navigateAndCompareSnapshots( ".", - testNetwork + "_ethx_" + model.name + "_legacy_stake_eth", + testNetwork + "_kelp_claim_eth_" + model.name, [right_clicks, 0] ); diff --git a/tests/src/eth/ethx/withdraw_legacy.test.js b/tests/src/eth/kelp/claimLST.test.js similarity index 50% rename from tests/src/eth/ethx/withdraw_legacy.test.js rename to tests/src/eth/kelp/claimLST.test.js index 48ded2f..2e7bcf1 100644 --- a/tests/src/eth/ethx/withdraw_legacy.test.js +++ b/tests/src/eth/kelp/claimLST.test.js @@ -8,30 +8,27 @@ import { txFromEtherscan, } from "../../test.fixture"; -const contractAddr = "0xcf5ea1b38380f6af39068375516daf40ed70d299"; -const pluginName = "staderlabs"; const testNetwork = "ethereum"; -const chainID = 1; -// Test from replayed transaction: https://etherscan.io/tx/0xa7b2f78c84bc5528629d37b56856d47601c42f4d7f1505fa6767bcd090fb5044 +// Test from replayed transaction: https://etherscan.io/tx/0x31a88ec3977a4cd4ab0a105607a9ac1d350e1f2a2148345f6bdf9b583a74518b const inputData = - "0x02f8b30182059585053f837bd185053f837bd18304d7be949f0491b32dbce587c50c4c43ab303b06478193a780b844ccc143b80000000000000000000000000000000000000000000000056a30e2758fb0a40000000000000000000000000087bc2f2ba8c83f412fed5c3151de0ffbdc959984c080a01bf62d962c7e2d888df40f0a61dd9eb6c60ed01e1291ce15b9acbad154e0cf619fc470d4477df1e52cb4030e2f976dc13856d09010d164dd97a5532d59b9d413"; + "0x02f8910181e48439d106808502c0b7a94e8302c6ad9462de59c08eb5dae4b7e6f7a8cad3006d6965ec1680a46dbaf9ee000000000000000000000000ac3e018457b222d93114458476f3e3416abbe38fc001a015b3a4d1d38f492c00322e7a1eef1f044ddfbe0f145031d80470e22ffa63dc24a07605ee5c0b3b1b0d216e10ee28a1db78cd723df9812d3ec2585beaaa9f0844e1"; nano_models.forEach(function (model) { test( - "[Nano " + model.letter + "] Legacy Request Withdraw ETH", + "[Nano " + model.letter + "] Kelp Claim LST", zemu(model, async (sim, eth) => { const serializedTx = txFromEtherscan(inputData); const tx = eth.signTransaction("44'/60'/0'/0", serializedTx); - const right_clicks = model.letter === "S" ? 9 : 5; + const right_clicks = model.letter === "S" ? 6 : 4; // Wait for the application to actually load and parse the transaction await waitForAppScreen(sim); // Navigate the display by pressing the right button `right_clicks` times, then pressing both buttons to accept the transaction. await sim.navigateAndCompareSnapshots( ".", - testNetwork + "_ethx_" + model.name + "_legacy_request_withdraw_eth", + testNetwork + "_kelp_claim_lst_" + model.name, [right_clicks, 0] ); diff --git a/tests/src/eth/kelp/depositAsset.test.js b/tests/src/eth/kelp/depositAsset.test.js new file mode 100644 index 0000000..6ae6700 --- /dev/null +++ b/tests/src/eth/kelp/depositAsset.test.js @@ -0,0 +1,39 @@ +import "core-js/stable"; +import "regenerator-runtime"; +import { + waitForAppScreen, + zemu, + nano_models, + serializeTx, + txFromEtherscan, +} from "../../test.fixture"; + +const testNetwork = "ethereum"; +// Test from replayed transaction: https://etherscan.io/tx/0xfc310710142f1d1b6da83ae7a74ccdc6e110b83b193c546ac74423b61d03cfd9 +const inputData = + "0x02f9015401820221850746f00bd9850746f00bd98307066094036676389e48133b63a802f8635ad39e752d375d80b8e4c3ae1766000000000000000000000000a35b1b31ce002fbf2058d22f30f95d405200a15b0000000000000000000000000000000000000000000000001b340783b0b8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004065313663623065316333353133303164333338656661343334656531646166336631393335386363633363666161643163386264323733663736633133313561c001a0aec13856dbebd5a5dd1cca745781942327cb6a279f6276a8ec19c3c402294cd1a035b6f92a682f56ae9187eb84c3340c15f69649fdbbe396b5eaf7d16bb2826503"; + +nano_models.forEach(function (model) { + test( + "[Nano " + model.letter + "] Deposit LST", + zemu(model, async (sim, eth) => { + const serializedTx = txFromEtherscan(inputData); + + const tx = eth.signTransaction("44'/60'/0'/0", serializedTx); + + const right_clicks = model.letter === "S" ? 6 : 4; + + // Wait for the application to actually load and parse the transaction + await waitForAppScreen(sim); + // Navigate the display by pressing the right button `right_clicks` times, then pressing both buttons to accept the transaction. + await sim.navigateAndCompareSnapshots( + ".", + testNetwork + "_kelp_" + model.name + "_deposit_lst", + [right_clicks, 0] + ); + + await tx; + }), + 50000 + ); +}); diff --git a/tests/src/eth/kelp/depositETH.test.js b/tests/src/eth/kelp/depositETH.test.js new file mode 100644 index 0000000..4d3e086 --- /dev/null +++ b/tests/src/eth/kelp/depositETH.test.js @@ -0,0 +1,39 @@ +import "core-js/stable"; +import "regenerator-runtime"; +import { + waitForAppScreen, + zemu, + nano_models, + serializeTx, + txFromEtherscan, +} from "../../test.fixture"; + +const testNetwork = "ethereum"; +// Test from replayed transaction: https://etherscan.io/tx/0x8a00de6dbc850f48e78b61a11c3061e3fc065507073921b8312bba9b4c713284 +const inputData = + "0x02f90138018083902d038509f5d5b7778307a4db94036676389e48133b63a802f8635ad39e752d375d880d0b8d0508de0000b8c472c51c0b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000042307836613137346533306162376238313262663631326462383932663038303634656364666161613638636166353034633330326630353236663066303930643836000000000000000000000000000000000000000000000000000000000000c080a0c451fdeb418249686444110516b6872489fdb57e5623e19e459a9f9dcb24487ba070a9fed5d2660b874f3b80bc14abb38d92863b1332c05dc9d11e6beb78d91034"; + +nano_models.forEach(function (model) { + test( + "[Nano " + model.letter + "] Deposit ETH", + zemu(model, async (sim, eth) => { + const serializedTx = txFromEtherscan(inputData); + + const tx = eth.signTransaction("44'/60'/0'/0", serializedTx); + + const right_clicks = model.letter === "S" ? 6 : 4; + + // Wait for the application to actually load and parse the transaction + await waitForAppScreen(sim); + // Navigate the display by pressing the right button `right_clicks` times, then pressing both buttons to accept the transaction. + await sim.navigateAndCompareSnapshots( + ".", + testNetwork + "_kelp_" + model.name + "_deposit_eth", + [right_clicks, 0] + ); + + await tx; + }), + 50000 + ); +}); diff --git a/tests/src/eth/kelp/initiateWithdrawalETH.test.js b/tests/src/eth/kelp/initiateWithdrawalETH.test.js new file mode 100644 index 0000000..96a6696 --- /dev/null +++ b/tests/src/eth/kelp/initiateWithdrawalETH.test.js @@ -0,0 +1,39 @@ +import "core-js/stable"; +import "regenerator-runtime"; +import { + waitForAppScreen, + zemu, + nano_models, + serializeTx, + txFromEtherscan, +} from "../../test.fixture"; + +const testNetwork = "ethereum"; +// Test from replayed transaction: https://etherscan.io/tx/0x5a6a235be8865c5989bd5f604e9f4c14c442e5db0ee06b64e93a74ead5b5b14c +const inputData = + "0x02f8b00150839402a08501ccf6aae1830a78d19462de59c08eb5dae4b7e6f7a8cad3006d6965ec1680b844c8393ba9000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000000000015f021397cf0000c001a0b812d5b2183bd21ccde3765da1ad02a7233f835b01bc3519db9a123f84acbf38a0761578a1e66af567e40dcf4597af674956381fc85db0f2c9881f3f95eb863726"; + +nano_models.forEach(function (model) { + test( + "[Nano " + model.letter + "] Kelp Unstake ETH", + zemu(model, async (sim, eth) => { + const serializedTx = txFromEtherscan(inputData); + + const tx = eth.signTransaction("44'/60'/0'/0", serializedTx); + + const right_clicks = model.letter === "S" ? 7 : 5; + + // Wait for the application to actually load and parse the transaction + await waitForAppScreen(sim); + // Navigate the display by pressing the right button `right_clicks` times, then pressing both buttons to accept the transaction. + await sim.navigateAndCompareSnapshots( + ".", + testNetwork + "_kelp_unstake_eth_" + model.name, + [right_clicks, 0] + ); + + await tx; + }), + 50000 + ); +}); diff --git a/tests/src/eth/kelp/initiateWithdrawalLST.test.js b/tests/src/eth/kelp/initiateWithdrawalLST.test.js new file mode 100644 index 0000000..b2000a3 --- /dev/null +++ b/tests/src/eth/kelp/initiateWithdrawalLST.test.js @@ -0,0 +1,39 @@ +import "core-js/stable"; +import "regenerator-runtime"; +import { + waitForAppScreen, + zemu, + nano_models, + serializeTx, + txFromEtherscan, +} from "../../test.fixture"; + +const testNetwork = "ethereum"; +// Test from replayed transaction: https://etherscan.io/tx/0xa44d01da432225b7ad2cc49b0160d57464439107044af3497a9b71d7677c82c7 +const inputData = + "0x02f8b001318421bef4e984dfce82df83105db09462de59c08eb5dae4b7e6f7a8cad3006d6965ec1680b844c8393ba9000000000000000000000000a35b1b31ce002fbf2058d22f30f95d405200a15b0000000000000000000000000000000000000000000000000f99f5f1987e8000c001a05dd079fce787f4a03da05f8ba68d6a1abe3d094a6985c27dab843e84eff027b9a005fc6255e49140ca4d76477e6a4f3d6ae09d61f83a56655e166e960683d3127e"; + +nano_models.forEach(function (model) { + test( + "[Nano " + model.letter + "] Kelp Unstake LST", + zemu(model, async (sim, eth) => { + const serializedTx = txFromEtherscan(inputData); + + const tx = eth.signTransaction("44'/60'/0'/0", serializedTx); + + const right_clicks = model.letter === "S" ? 7 : 5; + + // Wait for the application to actually load and parse the transaction + await waitForAppScreen(sim); + // Navigate the display by pressing the right button `right_clicks` times, then pressing both buttons to accept the transaction. + await sim.navigateAndCompareSnapshots( + ".", + testNetwork + "_kelp_unstake_lst_" + model.name, + [right_clicks, 0] + ); + + await tx; + }), + 50000 + ); +}); diff --git a/tests/src/fantom/deposit.test.js b/tests/src/fantom/deposit.test.js deleted file mode 100644 index 760ae86..0000000 --- a/tests/src/fantom/deposit.test.js +++ /dev/null @@ -1,47 +0,0 @@ -import "core-js/stable"; -import "regenerator-runtime"; -import { - waitForAppScreen, - zemu, - nano_models, - serializeTx, -} from "../test.fixture"; - -const contractAddr = "0xb458bfc855ab504a8a327720fcef98886065529b"; -const pluginName = "staderlabs"; -const testNetwork = "fantom"; -const chainID = 250; -const signedPlugin = false; -// Test from replayed transaction: https://ftmscan.com/tx/0xe3a07a16873a19be351cacb1c48f7fe23c4b2975ba774e71b26c4992afca1ac0 -// msg.value is hardcoded, hence it will be wrong in test -const inputData = "0xd0e30db0"; - -nano_models.forEach(function (model) { - test( - "[Nano " + model.letter + "] Deposit FTM", - zemu( - model, - async (sim, eth) => { - const serializedTx = serializeTx(contractAddr, inputData, chainID); - - const tx = eth.signTransaction("44'/60'/0'/0/0", serializedTx); - - const right_clicks = model.letter === "S" ? 5 : 5; - - // Wait for the application to actually load and parse the transaction - await waitForAppScreen(sim); - // Navigate the display by pressing the right button `right_clicks` times, then pressing both buttons to accept the transaction. - await sim.navigateAndCompareSnapshots( - ".", - testNetwork + "_ftmx_" + model.name + "_deposit", - [right_clicks, 0] - ); - - await tx; - }, - signedPlugin, - testNetwork - ), - 20000 - ); -}); diff --git a/tests/src/fantom/undelegate.test.js b/tests/src/fantom/undelegate.test.js deleted file mode 100644 index 337e2bb..0000000 --- a/tests/src/fantom/undelegate.test.js +++ /dev/null @@ -1,47 +0,0 @@ -import "core-js/stable"; -import "regenerator-runtime"; -import { - waitForAppScreen, - zemu, - nano_models, - serializeTx, -} from "../test.fixture"; - -const contractAddr = "0xb458bfc855ab504a8a327720fcef98886065529b"; -const pluginName = "staderlabs"; -const testNetwork = "fantom"; -const chainID = 250; -const signedPlugin = false; -// Test from replayed transaction: https://ftmscan.com/tx/0x60130f5baa43bfdad15b79f4ff573b081e9a2f69a64b6db839b7afc71df2903b -const inputData = - "0x4f864df400000000000000000000000000000000000000000000000000011352faaba2bf00000000000000000000000000000000000000000000000ea00bf71b724f800000000000000000000000000000000000000000000000000f6eea29cfd81d7920"; - -nano_models.forEach(function (model) { - test( - "[Nano " + model.letter + "] Unstake FTM", - zemu( - model, - async (sim, eth) => { - const serializedTx = serializeTx(contractAddr, inputData, chainID); - - const tx = eth.signTransaction("44'/60'/0'/0/0", serializedTx); - - const right_clicks = model.letter === "S" ? 5 : 5; - - // Wait for the application to actually load and parse the transaction - await waitForAppScreen(sim); - // Navigate the display by pressing the right button `right_clicks` times, then pressing both buttons to accept the transaction. - await sim.navigateAndCompareSnapshots( - ".", - testNetwork + "_ftmx_" + model.name + "_undelegate", - [right_clicks, 0] - ); - - await tx; - }, - signedPlugin, - testNetwork - ), - 20000 - ); -}); diff --git a/tests/src/fantom/withdraw.test.js b/tests/src/fantom/withdraw.test.js deleted file mode 100644 index 447f6f0..0000000 --- a/tests/src/fantom/withdraw.test.js +++ /dev/null @@ -1,47 +0,0 @@ -import "core-js/stable"; -import "regenerator-runtime"; -import { - waitForAppScreen, - zemu, - nano_models, - serializeTx, -} from "../test.fixture"; - -const contractAddr = "0xb458bfc855ab504a8a327720fcef98886065529b"; -const pluginName = "staderlabs"; -const testNetwork = "fantom"; -const chainID = 250; -const signedPlugin = false; -// Test from replayed transaction: https://ftmscan.com/tx/0x8b5cc5810f4cf8048413ff3f66c32d3c0175e6f159a5c8dce0ce1a2207effc25 -const inputData = - "0x441a3e70000000000000000000000000000000000000000000000000000325c5ddb1a21c0000000000000000000000000000000000000000000000000000000000000000"; - -nano_models.forEach(function (model) { - test( - "[Nano " + model.letter + "] Withdraw FTM", - zemu( - model, - async (sim, eth) => { - const serializedTx = serializeTx(contractAddr, inputData, chainID); - - const tx = eth.signTransaction("44'/60'/0'/0/0", serializedTx); - - const right_clicks = model.letter === "S" ? 5 : 5; - - // Wait for the application to actually load and parse the transaction - await waitForAppScreen(sim); - // Navigate the display by pressing the right button `right_clicks` times, then pressing both buttons to accept the transaction. - await sim.navigateAndCompareSnapshots( - ".", - testNetwork + "_ftmx_" + model.name + "_withdraw", - [right_clicks, 0] - ); - - await tx; - }, - signedPlugin, - testNetwork - ), - 20000 - ); -});