diff --git a/README.md b/README.md index 9078352..2ab04fb 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,7 @@ ![Kiln Logo](https://uploads-ssl.webflow.com/625db3caa8abd6c22d5f0ce3/6260572336892a801afd71e3_Kiln_Logo-Transparent-Dark.svg) This plug-in is compatible with Nano S / X devices, it enables to -interact in a secure wait with the Kiln deposit smart contract to -stake Ethereum. +interact in a secure way with the Kiln On-Chain v1, v2 and EigenLayer Liquid Restaking contracts. ## Prerequisite @@ -28,17 +27,43 @@ git clone --recurse-submodules https://github.com/LedgerHQ/app-ethereum.git ## Documentation -Need more information about the interface, the architecture, or general stuff about ethereum plugins? You can find more about them in the [ethereum-app documentation](https://github.com/LedgerHQ/app-ethereum/blob/master/doc/ethapp_plugins.asc). +### Plugin codebase -## Smart Contracts +This plugin follows the structure of a Ledger Ethereum app plugin described [here](https://developers.ledger.com/docs/device-app/develop/code/plugin). -Smart contracts covered by this plugin are: +It receives data from the Ethereum app, processes it and displays (ie "clearsign") on the device screen. + +All the plugin code is in the `src` folder. + +The plugin codebase follows the 6 steps of the plugin flow: + +1. **initialize** (in `src/handle_init_contract.c`): plugin receives the selector to manage, and init the correct parser initial state for the function (`context->next_param`). +2. **provide parameter** (in `src/provide_parameter/handle_provide_parameter.c`): selected parser receives parameters 32 bytes by 32 bytes, and parse them to the correct state. See files like `src/provide_parameter/eigenlayer.c` for the different parsers. +3. **finalize** (in `src/handle_finalize.c`): plugin returns the number of screens to display +4. **provide_token** not used here +5. **query_contract_id** (in `src/handle_query_contract_id.c`): plugin returns the contract name as the first displayed screen on the device +6. **query_contract_ui** (in `src/query_contract_ui/handle_query_contract_ui.c`): plugin returns the screens to display on the device, each product has its own file like `src/query_contract_ui/eigenlayer.c`. + +Other important files: + +- `src/contracts.c` holds all the constant representing contract functions, parameters or known contracts mappings. +- `src/kiln_plugin.h` is where we define all the parser states and the plugin context structure. + +### Plugin context + +The plugin context is defined in `src/kiln_plugin.h` and holds the state of the plugin. It is passed to all the plugin functions. + +It is defined using a union of all the possible parser parameters of the plugin, and a `next_param` field to know which parser state to use next. + +The plugin context is memset to 0 everytime init_contract is called (beginning of a clearsigning flow), so we make sure that the plugin context union is in a clean state before using it in the parsers. + +### Provide parameter parsers + +The provide parameter parsers are defined in `src/provide_parameter/` and are called by the `handle_provide_parameter` function. -| Network | Version | Smart Contract | -| ------- | ------- | -------------------------------------------- | -| Goerli | V0 | `0xe8Ff2a04837aac535199eEcB5ecE52b2735b3543` | +Each parser is a state machine that receives 32 bytes of data at a time (abi format), and updates the plugin context state accordingly. -## Build +### Build Go to the plugin-tools folder and run the "./start" script. @@ -55,7 +80,13 @@ cd app-plugin-kiln/tests # go to the tests folder in app-plugin-kiln ./build_local_test_elfs.sh # run the script build_local_test_elfs.sh ``` -## Tests +### Tests + +The tests are in the `tests/src` folder. They are written in javascript and use the `@ledgerhq/hw-app-eth` library to simulate the device. + +The tests are run using the `yarn test` command. + +The output of the tests is a series of screenshots stored in the `tests/snapshots-tmp` folder that are compared to the expected screenshots in the `tests/snapshots` folder. The latter are stored in the git repository to make sure we expect the correct outputs. To test the plugin go to the tests folder from the "app-plugin-kiln/tests" and run the script "test" @@ -65,153 +96,264 @@ yarn # install dependencies yarn test # run the script test ``` -## Continuous Integration +### Continuous Integration The flow processed in [GitHub Actions](https://github.com/features/actions) is the following: - Code formatting with [clang-format](http://clang.llvm.org/docs/ClangFormat.html) - Compilation of the application for Ledger Nano S in [ledger-app-builder](https://github.com/LedgerHQ/ledger-app-builder) -# Flows +### Supported Smart Contracts + +Smart contracts covered by this plugin are: + +| Network | Name | Address | +| ------- | ----------------------------- | -------------------------------------------- | +| Mainnet | Kiln On-Chain v1 | `0x1e68238ce926dec62b3fbc99ab06eb1d85ce0270` | +| Mainnet | Kiln On-Chain v2 Native20 | `0x5db5235b5c7e247488784986e58019fffd98fda4` | +| Mainnet | Kiln On-Chain v2 ExitQueue | `0x8d6fd650500f82c7d978a440348e5a9b886943bf` | +| Mainnet | EigenLayer Delegation Manager | `0x858646372cc42e1a627fce94aa7a7033e7cf075a` | +| Mainnet | EigenLayer Strategy Manager | `0x39053d51b77dc0d36036fc1fcc8cb819df8ef37a` | -## NANO S +## Clearsigning -### Deposit +### KILN ON-CHAIN v1 - Deposit + +Function: `deposit()` +Clearsigned: + +- tx.value ![](/tests/snapshots/nanos_deposit/00000.png) ![](/tests/snapshots/nanos_deposit/00001.png) ![](/tests/snapshots/nanos_deposit/00002.png) ![](/tests/snapshots/nanos_deposit/00003.png) ![](/tests/snapshots/nanos_deposit/00004.png) ![](/tests/snapshots/nanos_deposit/00005.png) -### Withdraw +![](/tests/snapshots/nanox_deposit/00000.png) ![](/tests/snapshots/nanox_deposit/00001.png) ![](/tests/snapshots/nanox_deposit/00002.png) ![](/tests/snapshots/nanox_deposit/00003.png) ![](/tests/snapshots/nanox_deposit/00004.png) ![](/tests/snapshots/nanox_deposit/00005.png) + +### KILN ON-CHAIN v1 - Withdraw + +Function `withdraw(bytes validatorPubkey)` +Clearsigned: + +- none as BLS key is not digest to display on device and only owner of the validator can withdraw on its behalf so no attack vector possible. ![](/tests/snapshots/nanos_withdraw/00000.png) ![](/tests/snapshots/nanos_withdraw/00001.png) ![](/tests/snapshots/nanos_withdraw/00002.png) ![](/tests/snapshots/nanos_withdraw/00003.png) ![](/tests/snapshots/nanos_withdraw/00004.png) ![](/tests/snapshots/nanos_withdraw/00005.png) -### Withdraw EL +![](/tests/snapshots/nanox_withdraw/00000.png) ![](/tests/snapshots/nanox_withdraw/00001.png) ![](/tests/snapshots/nanox_withdraw/00002.png) ![](/tests/snapshots/nanox_withdraw/00003.png) ![](/tests/snapshots/nanox_withdraw/00004.png) ![](/tests/snapshots/nanox_withdraw/00005.png) + +### KILN ON-CHAIN v1 - Withdraw EL + +Function `withdrawEL(bytes validatorPubkey)` +Clearsigned: + +- none as BLS key is not digest to display on device and only owner of the validator can withdraw on its behalf so no attack vector possible. ![](/tests/snapshots/nanos_withdrawEL/00000.png) ![](/tests/snapshots/nanos_withdrawEL/00001.png) ![](/tests/snapshots/nanos_withdrawEL/00002.png) ![](/tests/snapshots/nanos_withdrawEL/00003.png) ![](/tests/snapshots/nanos_withdrawEL/00004.png) ![](/tests/snapshots/nanos_withdrawEL/00005.png) -### Withdraw CL +![](/tests/snapshots/nanox_withdrawEL/00000.png) ![](/tests/snapshots/nanox_withdrawEL/00001.png) ![](/tests/snapshots/nanox_withdrawEL/00002.png) ![](/tests/snapshots/nanox_withdrawEL/00003.png) ![](/tests/snapshots/nanox_withdrawEL/00004.png) ![](/tests/snapshots/nanox_withdrawEL/00005.png) + +### KILN ON-CHAIN v1 - Withdraw CL + +Function `withdrawCL(bytes validatorPubkey)` +Clearsigned: + +- none as BLS key is not digest to display on device and only owner of the validator can withdraw on its behalf so no attack vector possible. ![](/tests/snapshots/nanos_withdrawCL/00000.png) ![](/tests/snapshots/nanos_withdrawCL/00001.png) ![](/tests/snapshots/nanos_withdrawCL/00002.png) ![](/tests/snapshots/nanos_withdrawCL/00003.png) ![](/tests/snapshots/nanos_withdrawCL/00004.png) ![](/tests/snapshots/nanos_withdrawCL/00005.png) -### Batch Withdraw +![](/tests/snapshots/nanox_withdrawCL/00000.png) ![](/tests/snapshots/nanox_withdrawCL/00001.png) ![](/tests/snapshots/nanox_withdrawCL/00002.png) ![](/tests/snapshots/nanox_withdrawCL/00003.png) ![](/tests/snapshots/nanox_withdrawCL/00004.png) ![](/tests/snapshots/nanox_withdrawCL/00005.png) + +### KILN ON-CHAIN v1 - Batch Withdraw + +Function `batchWithdraw(bytes validatorPubkeys)` + +- none as validatorPubkeys can represent many BLS keys that we can't store on the device. Also only owner of the validator can withdraw on its behalf so no attack vector possible. ![](/tests/snapshots/nanos_batchWithdraw/00000.png) ![](/tests/snapshots/nanos_batchWithdraw/00001.png) ![](/tests/snapshots/nanos_batchWithdraw/00002.png) ![](/tests/snapshots/nanos_batchWithdraw/00003.png) ![](/tests/snapshots/nanos_batchWithdraw/00004.png) ![](/tests/snapshots/nanos_batchWithdraw/00005.png) -### Batch Withdraw EL +![](/tests/snapshots/nanox_batchWithdraw/00000.png) ![](/tests/snapshots/nanox_batchWithdraw/00001.png) ![](/tests/snapshots/nanox_batchWithdraw/00002.png) ![](/tests/snapshots/nanox_batchWithdraw/00003.png) ![](/tests/snapshots/nanox_batchWithdraw/00004.png) ![](/tests/snapshots/nanox_batchWithdraw/00005.png) + +### KILN ON-CHAIN v1 - Batch Withdraw EL + +Function `batchWithdrawEL(bytes validatorPubkeys)` +Clearsigned: + +- none as validatorPubkeys can represent many BLS keys that we can't store on the device. Also only owner of the validator can withdraw on its behalf so no attack vector possible. ![](/tests/snapshots/nanos_batchWithdrawEL/00000.png) ![](/tests/snapshots/nanos_batchWithdrawEL/00001.png) ![](/tests/snapshots/nanos_batchWithdrawEL/00002.png) ![](/tests/snapshots/nanos_batchWithdrawEL/00003.png) ![](/tests/snapshots/nanos_batchWithdrawEL/00004.png) ![](/tests/snapshots/nanos_batchWithdrawEL/00005.png) -### Batch WithdrawCL +![](/tests/snapshots/nanox_batchWithdrawEL/00000.png) ![](/tests/snapshots/nanox_batchWithdrawEL/00001.png) ![](/tests/snapshots/nanox_batchWithdrawEL/00002.png) ![](/tests/snapshots/nanox_batchWithdrawEL/00003.png) ![](/tests/snapshots/nanox_batchWithdrawEL/00004.png) ![](/tests/snapshots/nanox_batchWithdrawEL/00005.png) + +### KILN ON-CHAIN v1 - Batch WithdrawCL + +Function `batchWithdrawCL(bytes validatorPubkeys)` +Clearsigned: + +- none as validatorPubkeys can represent many BLS keys that we can't store on the device. Also only owner of the validator can withdraw on its behalf so no attack vector possible. ![](/tests/snapshots/nanos_batchWithdrawCL/00000.png) ![](/tests/snapshots/nanos_batchWithdrawCL/00001.png) ![](/tests/snapshots/nanos_batchWithdrawCL/00002.png) ![](/tests/snapshots/nanos_batchWithdrawCL/00003.png) ![](/tests/snapshots/nanos_batchWithdrawCL/00004.png) ![](/tests/snapshots/nanos_batchWithdrawCL/00005.png) -## Request Exits +![](/tests/snapshots/nanox_batchWithdrawCL/00000.png) ![](/tests/snapshots/nanox_batchWithdrawCL/00001.png) ![](/tests/snapshots/nanox_batchWithdrawCL/00002.png) ![](/tests/snapshots/nanox_batchWithdrawCL/00003.png) ![](/tests/snapshots/nanox_batchWithdrawCL/00004.png) ![](/tests/snapshots/nanox_batchWithdrawCL/00005.png) -![](/tests/snapshots/nanos_requestValidatorsExit/00000.png) ![](/tests/snapshots/nanos_requestValidatorsExit/00001.png) ![](/tests/snapshots/nanos_requestValidatorsExit/00002.png) ![](/tests/snapshots/nanos_requestValidatorsExit/00003.png) ![](/tests/snapshots/nanos_requestValidatorsExit/00004.png) ![](/tests/snapshots/nanos_requestValidatorsExit/00005.png) +## KILN ON-CHAIN v1 - Request Exits -### Stake v2 +Function `requestExits(bytes validatorPubkeys)` +Clearsigned: -![](/tests/snapshots/nanos_stakev2/00000.png) ![](/tests/snapshots/nanos_stakev2/00001.png) ![](/tests/snapshots/nanos_stakev2/00002.png) ![](/tests/snapshots/nanos_stakev2/00003.png) ![](/tests/snapshots/nanos_stakev2/00004.png) ![](/tests/snapshots/nanos_stakev2/00005.png) +- none as validatorPubkeys can represent many BLS keys that we can't store on the device. Also only owner of the validator can request exit on its behalf so no attack vector possible. -### RequestExit V2 +![](/tests/snapshots/nanos_requestValidatorsExit/00000.png) ![](/tests/snapshots/nanos_requestValidatorsExit/00001.png) ![](/tests/snapshots/nanos_requestValidatorsExit/00002.png) ![](/tests/snapshots/nanos_requestValidatorsExit/00003.png) ![](/tests/snapshots/nanos_requestValidatorsExit/00004.png) ![](/tests/snapshots/nanos_requestValidatorsExit/00005.png) -![](/tests/snapshots/nanos_requestExitv2/00000.png) ![](/tests/snapshots/nanos_requestExitv2/00001.png) ![](/tests/snapshots/nanos_requestExitv2/00002.png) ![](/tests/snapshots/nanos_requestExitv2/00003.png) ![](/tests/snapshots/nanos_requestExitv2/00004.png) ![](/tests/snapshots/nanos_requestExitv2/00005.png) +![](/tests/snapshots/nanox_requestValidatorsExit/00000.png) ![](/tests/snapshots/nanox_requestValidatorsExit/00001.png) ![](/tests/snapshots/nanox_requestValidatorsExit/00002.png) ![](/tests/snapshots/nanox_requestValidatorsExit/00003.png) ![](/tests/snapshots/nanox_requestValidatorsExit/00004.png) ![](/tests/snapshots/nanox_requestValidatorsExit/00005.png) -### MultiClaim V2 +### KILN ON-CHAIN v2 - Stake -![](/tests/snapshots/nanos_multiClaimv2/00000.png) ![](/tests/snapshots/nanos_multiClaimv2/00001.png) ![](/tests/snapshots/nanos_multiClaimv2/00002.png) ![](/tests/snapshots/nanos_multiClaimv2/00003.png) ![](/tests/snapshots/nanos_multiClaimv2/00004.png) ![](/tests/snapshots/nanos_multiClaimv2/00005.png) +Function: `stake()` +Clearsigned: -### Claim V2 +- tx.value -![](/tests/snapshots/nanos_claimv2/00000.png) ![](/tests/snapshots/nanos_claimv2/00001.png) ![](/tests/snapshots/nanos_claimv2/00002.png) ![](/tests/snapshots/nanos_claimv2/00003.png) ![](/tests/snapshots/nanos_claimv2/00004.png) ![](/tests/snapshots/nanos_claimv2/00005.png) +![](/tests/snapshots/nanos_stakev2/00000.png) ![](/tests/snapshots/nanos_stakev2/00001.png) ![](/tests/snapshots/nanos_stakev2/00002.png) ![](/tests/snapshots/nanos_stakev2/00003.png) ![](/tests/snapshots/nanos_stakev2/00004.png) ![](/tests/snapshots/nanos_stakev2/00005.png) -### LR Deposit Into Strategy +![](/tests/snapshots/nanox_stakev2/00000.png) ![](/tests/snapshots/nanox_stakev2/00001.png) ![](/tests/snapshots/nanox_stakev2/00002.png) ![](/tests/snapshots/nanox_stakev2/00003.png) ![](/tests/snapshots/nanox_stakev2/00004.png) ![](/tests/snapshots/nanox_stakev2/00005.png) -![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00000.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00001.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00002.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00003.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00004.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00005.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00006.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00007.png) +### KILN ON-CHAIN v2 - RequestExit -### Delegate To +Function: `requestExit(uint256 shares)` +Clearsigned: -![](/tests/snapshots/nanos_delegate_to_is_kiln/00000.png) ![](/tests/snapshots/nanos_delegate_to_is_kiln/00001.png) ![](/tests/snapshots/nanos_delegate_to_is_kiln/00002.png) ![](/tests/snapshots/nanos_delegate_to_is_kiln/00003.png) ![](/tests/snapshots/nanos_delegate_to_is_kiln/00004.png) ![](/tests/snapshots/nanos_delegate_to_is_kiln/00005.png) ![](/tests/snapshots/nanos_delegate_to_is_kiln/00006.png) +- none as shares is not 1:1 with ETH value, it would confuse users -### Undelegate +![](/tests/snapshots/nanos_requestExitv2/00000.png) ![](/tests/snapshots/nanos_requestExitv2/00001.png) ![](/tests/snapshots/nanos_requestExitv2/00002.png) ![](/tests/snapshots/nanos_requestExitv2/00003.png) ![](/tests/snapshots/nanos_requestExitv2/00004.png) ![](/tests/snapshots/nanos_requestExitv2/00005.png) -![](/tests/snapshots/nanos_lr_undelegate/00000.png) ![](/tests/snapshots/nanos_lr_undelegate/00001.png) ![](/tests/snapshots/nanos_lr_undelegate/00002.png) ![](/tests/snapshots/nanos_lr_undelegate/00003.png) ![](/tests/snapshots/nanos_lr_undelegate/00004.png) ![](/tests/snapshots/nanos_lr_undelegate/00005.png) +![](/tests/snapshots/nanox_requestExitv2/00000.png) ![](/tests/snapshots/nanox_requestExitv2/00001.png) ![](/tests/snapshots/nanox_requestExitv2/00002.png) ![](/tests/snapshots/nanox_requestExitv2/00003.png) ![](/tests/snapshots/nanox_requestExitv2/00004.png) ![](/tests/snapshots/nanox_requestExitv2/00005.png) -### Queue Withdrawals +### KILN ON-CHAIN v2 - MultiClaim -![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00000.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00001.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00002.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00003.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00004.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00005.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00006.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00007.png) +Function: `multiClaim(address[] exitQueues, uint256[][] ticketIds, uint32[][] casksIds)` +Clearsigned: -### LR Complete Queued Withdrawals +- none -![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00000.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00001.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00002.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00003.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00004.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00005.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00006.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00007.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00008.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00009.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00010.png) +![](/tests/snapshots/nanos_multiClaimv2/00000.png) ![](/tests/snapshots/nanos_multiClaimv2/00001.png) ![](/tests/snapshots/nanos_multiClaimv2/00002.png) ![](/tests/snapshots/nanos_multiClaimv2/00003.png) ![](/tests/snapshots/nanos_multiClaimv2/00004.png) ![](/tests/snapshots/nanos_multiClaimv2/00005.png) -## NANO X +![](/tests/snapshots/nanox_multiClaimv2/00000.png) ![](/tests/snapshots/nanox_multiClaimv2/00001.png) ![](/tests/snapshots/nanox_multiClaimv2/00002.png) ![](/tests/snapshots/nanox_multiClaimv2/00003.png) ![](/tests/snapshots/nanox_multiClaimv2/00004.png) ![](/tests/snapshots/nanox_multiClaimv2/00005.png) -### Deposit +### KILN ON-CHAIN v2 - Claim -![](/tests/snapshots/nanox_deposit/00000.png) ![](/tests/snapshots/nanox_deposit/00001.png) ![](/tests/snapshots/nanox_deposit/00002.png) ![](/tests/snapshots/nanox_deposit/00003.png) ![](/tests/snapshots/nanox_deposit/00004.png) ![](/tests/snapshots/nanox_deposit/00005.png) +Function: `claim(uint256[] ticketIds, uint32[] caskIds, uint16 maxClaimDepth)` +Clearsigned: -### Withdraw +- none -![](/tests/snapshots/nanox_withdraw/00000.png) ![](/tests/snapshots/nanox_withdraw/00001.png) ![](/tests/snapshots/nanox_withdraw/00002.png) ![](/tests/snapshots/nanox_withdraw/00003.png) ![](/tests/snapshots/nanox_withdraw/00004.png) ![](/tests/snapshots/nanox_withdraw/00005.png) +![](/tests/snapshots/nanos_claimv2/00000.png) ![](/tests/snapshots/nanos_claimv2/00001.png) ![](/tests/snapshots/nanos_claimv2/00002.png) ![](/tests/snapshots/nanos_claimv2/00003.png) ![](/tests/snapshots/nanos_claimv2/00004.png) ![](/tests/snapshots/nanos_claimv2/00005.png) -### Withdraw EL +![](/tests/snapshots/nanox_claimv2/00000.png) ![](/tests/snapshots/nanox_claimv2/00001.png) ![](/tests/snapshots/nanox_claimv2/00002.png) ![](/tests/snapshots/nanox_claimv2/00003.png) ![](/tests/snapshots/nanox_claimv2/00004.png) ![](/tests/snapshots/nanox_claimv2/00005.png) -![](/tests/snapshots/nanox_withdrawEL/00000.png) ![](/tests/snapshots/nanox_withdrawEL/00001.png) ![](/tests/snapshots/nanox_withdrawEL/00002.png) ![](/tests/snapshots/nanox_withdrawEL/00003.png) ![](/tests/snapshots/nanox_withdrawEL/00004.png) ![](/tests/snapshots/nanox_withdrawEL/00005.png) +### EigenLayer Strategy Manager - LR Deposit Into Strategy -### Withdraw CL +Function: `depositIntoStrategy(address strategy, address erc20, uint256 amount)` +Clearsigned: -![](/tests/snapshots/nanox_withdrawCL/00000.png) ![](/tests/snapshots/nanox_withdrawCL/00001.png) ![](/tests/snapshots/nanox_withdrawCL/00002.png) ![](/tests/snapshots/nanox_withdrawCL/00003.png) ![](/tests/snapshots/nanox_withdrawCL/00004.png) ![](/tests/snapshots/nanox_withdrawCL/00005.png) +- strategy: using mapping in `contracts.c`, it is either recognized or displayed as "UNKOWN" +- erc20: using mapping in `contracts.c`, it is either recognized or displayed as "UNKOWN" +- amount -### Batch Withdraw +![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00000.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00001.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00002.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00003.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00004.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00005.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00006.png) ![](/tests/snapshots/nanos_lrDepositIntoStrategyNormal/00007.png) -![](/tests/snapshots/nanox_batchWithdraw/00000.png) ![](/tests/snapshots/nanox_batchWithdraw/00001.png) ![](/tests/snapshots/nanox_batchWithdraw/00002.png) ![](/tests/snapshots/nanox_batchWithdraw/00003.png) ![](/tests/snapshots/nanox_batchWithdraw/00004.png) ![](/tests/snapshots/nanox_batchWithdraw/00005.png) +![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00000.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00001.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00002.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00003.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00004.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00005.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00006.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00007.png) -### Batch Withdraw EL +### EigenLayer Delegation Manager - Delegate To -![](/tests/snapshots/nanox_batchWithdrawEL/00000.png) ![](/tests/snapshots/nanox_batchWithdrawEL/00001.png) ![](/tests/snapshots/nanox_batchWithdrawEL/00002.png) ![](/tests/snapshots/nanox_batchWithdrawEL/00003.png) ![](/tests/snapshots/nanox_batchWithdrawEL/00004.png) ![](/tests/snapshots/nanox_batchWithdrawEL/00005.png) +Function: -### Batch WithdrawCL +```solidity +struct QueuedWithdrawalParams { + address[] strategies; + uint256[] shares; + address withdrawer; +} -![](/tests/snapshots/nanox_batchWithdrawCL/00000.png) ![](/tests/snapshots/nanox_batchWithdrawCL/00001.png) ![](/tests/snapshots/nanox_batchWithdrawCL/00002.png) ![](/tests/snapshots/nanox_batchWithdrawCL/00003.png) ![](/tests/snapshots/nanox_batchWithdrawCL/00004.png) ![](/tests/snapshots/nanox_batchWithdrawCL/00005.png) +function queueWithdrawals( + QueuedWithdrawalParams[] queuedWithdrawalParams +) +``` -### Request Exits +Clearsigned: -![](/tests/snapshots/nanox_requestValidatorsExit/00000.png) ![](/tests/snapshots/nanox_requestValidatorsExit/00001.png) ![](/tests/snapshots/nanox_requestValidatorsExit/00002.png) ![](/tests/snapshots/nanox_requestValidatorsExit/00003.png) ![](/tests/snapshots/nanox_requestValidatorsExit/00004.png) ![](/tests/snapshots/nanox_requestValidatorsExit/00005.png) +- strategies: using mapping in `contracts.c`, they are either recognized or displayed as "UNKOWN" -### Stake V2 +Shares are confusing for users and would be hard to store properly on the device for display. -![](/tests/snapshots/nanox_stakev2/00000.png) ![](/tests/snapshots/nanox_stakev2/00001.png) ![](/tests/snapshots/nanox_stakev2/00002.png) ![](/tests/snapshots/nanox_stakev2/00003.png) ![](/tests/snapshots/nanox_stakev2/00004.png) ![](/tests/snapshots/nanox_stakev2/00005.png) +![](/tests/snapshots/nanos_delegate_to_is_kiln/00000.png) ![](/tests/snapshots/nanos_delegate_to_is_kiln/00001.png) ![](/tests/snapshots/nanos_delegate_to_is_kiln/00002.png) ![](/tests/snapshots/nanos_delegate_to_is_kiln/00003.png) ![](/tests/snapshots/nanos_delegate_to_is_kiln/00004.png) ![](/tests/snapshots/nanos_delegate_to_is_kiln/00005.png) ![](/tests/snapshots/nanos_delegate_to_is_kiln/00006.png) -### RequestExit V2 +![](/tests/snapshots/nanox_delegate_to_is_kiln/00000.png) ![](/tests/snapshots/nanox_delegate_to_is_kiln/00001.png) ![](/tests/snapshots/nanox_delegate_to_is_kiln/00002.png) ![](/tests/snapshots/nanox_delegate_to_is_kiln/00003.png) ![](/tests/snapshots/nanox_delegate_to_is_kiln/00004.png) ![](/tests/snapshots/nanox_delegate_to_is_kiln/00005.png) ![](/tests/snapshots/nanox_delegate_to_is_kiln/00006.png) -![](/tests/snapshots/nanox_requestExitv2/00000.png) ![](/tests/snapshots/nanox_requestExitv2/00001.png) ![](/tests/snapshots/nanox_requestExitv2/00002.png) ![](/tests/snapshots/nanox_requestExitv2/00003.png) ![](/tests/snapshots/nanox_requestExitv2/00004.png) ![](/tests/snapshots/nanox_requestExitv2/00005.png) +### EigenLayer Delegation Manager - Undelegate -### MultiClaim V2 +Function: `undelegate(address staker)` +Clearsigned: -![](/tests/snapshots/nanox_multiClaimv2/00000.png) ![](/tests/snapshots/nanox_multiClaimv2/00001.png) ![](/tests/snapshots/nanox_multiClaimv2/00002.png) ![](/tests/snapshots/nanox_multiClaimv2/00003.png) ![](/tests/snapshots/nanox_multiClaimv2/00004.png) ![](/tests/snapshots/nanox_multiClaimv2/00005.png) +- none as there is a staker == msg.sender requirement in the contract -### Claim V2 +![](/tests/snapshots/nanos_lr_undelegate/00000.png) ![](/tests/snapshots/nanos_lr_undelegate/00001.png) ![](/tests/snapshots/nanos_lr_undelegate/00002.png) ![](/tests/snapshots/nanos_lr_undelegate/00003.png) ![](/tests/snapshots/nanos_lr_undelegate/00004.png) ![](/tests/snapshots/nanos_lr_undelegate/00005.png) -![](/tests/snapshots/nanox_claimv2/00000.png) ![](/tests/snapshots/nanox_claimv2/00001.png) ![](/tests/snapshots/nanox_claimv2/00002.png) ![](/tests/snapshots/nanox_claimv2/00003.png) ![](/tests/snapshots/nanox_claimv2/00004.png) ![](/tests/snapshots/nanox_claimv2/00005.png) +![](/tests/snapshots/nanox_lr_undelegate/00000.png) ![](/tests/snapshots/nanox_lr_undelegate/00001.png) ![](/tests/snapshots/nanox_lr_undelegate/00002.png) ![](/tests/snapshots/nanox_lr_undelegate/00003.png) ![](/tests/snapshots/nanox_lr_undelegate/00004.png) ![](/tests/snapshots/nanox_lr_undelegate/00005.png) -# EigenLayer +### EigenLayer Strategy Manager - Queue Withdrawals -### LR Deposit Into Strategy +Function: -![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00000.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00001.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00002.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00003.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00004.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00005.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00006.png) ![](/tests/snapshots/nanox_lrDepositIntoStrategyNormal/00007.png) +```solidity +struct QueuedWithdrawalParams { + address[] strategies; + uint256[] shares; + address withdrawer; +} -### Delegate To +function queueWithdrawals( + QueuedWithdrawalParams[] queuedWithdrawalParams +) +``` -![](/tests/snapshots/nanox_delegate_to_is_kiln/00000.png) ![](/tests/snapshots/nanox_delegate_to_is_kiln/00001.png) ![](/tests/snapshots/nanox_delegate_to_is_kiln/00002.png) ![](/tests/snapshots/nanox_delegate_to_is_kiln/00003.png) ![](/tests/snapshots/nanox_delegate_to_is_kiln/00004.png) ![](/tests/snapshots/nanox_delegate_to_is_kiln/00005.png) ![](/tests/snapshots/nanox_delegate_to_is_kiln/00006.png) +Clearsigned: -### Undelegate +- strategies: using mapping in `contracts.c`, they are either recognized or displayed as "UNKOWN" -![](/tests/snapshots/nanox_lr_undelegate/00000.png) ![](/tests/snapshots/nanox_lr_undelegate/00001.png) ![](/tests/snapshots/nanox_lr_undelegate/00002.png) ![](/tests/snapshots/nanox_lr_undelegate/00003.png) ![](/tests/snapshots/nanox_lr_undelegate/00004.png) ![](/tests/snapshots/nanox_lr_undelegate/00005.png) +Shares are confusing for users and would be hard to store properly on the device for display. -### Queue Withdrawals +![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00000.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00001.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00002.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00003.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00004.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00005.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00006.png) ![](/tests/snapshots/nanos_lrQueueWithdrawals_1_2_dimension/00007.png) ![](/tests/snapshots/nanox_lrQueueWithdrawals_1_2_dimension/00000.png) ![](/tests/snapshots/nanox_lrQueueWithdrawals_1_2_dimension/00001.png) ![](/tests/snapshots/nanox_lrQueueWithdrawals_1_2_dimension/00002.png) ![](/tests/snapshots/nanox_lrQueueWithdrawals_1_2_dimension/00003.png) ![](/tests/snapshots/nanox_lrQueueWithdrawals_1_2_dimension/00004.png) ![](/tests/snapshots/nanox_lrQueueWithdrawals_1_2_dimension/00005.png) ![](/tests/snapshots/nanox_lrQueueWithdrawals_1_2_dimension/00006.png) ![](/tests/snapshots/nanox_lrQueueWithdrawals_1_2_dimension/00007.png) -### LR Complete Queued Withdrawals +### EigenLayer Strategy Manager - LR Complete Queued Withdrawals + +Function: + +```solidity +struct Withdrawal { + address staker; + address delegatedTo; + address withdrawer; + uint256 nonce; + uint32 startBlock; + address[] strategies; + uint256[] shares; +} + +function completeQueuedWithdrawals( + Withdrawal[] withdrawals, + address[][] tokens, + uint256[] middlewareTimesIndexes, + bool[] receiveAsTokens +) +``` + +Clearsigned: + +- strategies: using mapping in `contracts.c`, they are either recognized or displayed as "UNKOWN" +- if each withdrawal corresponding receiveAsTokens is true, then the corresponding token is displayed as "Withdraw" else as "Redelegation + +Shares are confusing for users and would be hard to store properly on the device for display. + +![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00000.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00001.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00002.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00003.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00004.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00005.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00006.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00007.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00008.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00009.png) ![](/tests/snapshots/nanos_lrCompleteQueuedWithdrawals/00010.png) ![](/tests/snapshots/nanox_lrCompleteQueuedWithdrawals/00000.png) ![](/tests/snapshots/nanox_lrCompleteQueuedWithdrawals/00001.png) ![](/tests/snapshots/nanox_lrCompleteQueuedWithdrawals/00002.png) ![](/tests/snapshots/nanox_lrCompleteQueuedWithdrawals/00003.png) ![](/tests/snapshots/nanox_lrCompleteQueuedWithdrawals/00004.png) ![](/tests/snapshots/nanox_lrCompleteQueuedWithdrawals/00005.png) ![](/tests/snapshots/nanox_lrCompleteQueuedWithdrawals/00006.png) ![](/tests/snapshots/nanox_lrCompleteQueuedWithdrawals/00007.png) ![](/tests/snapshots/nanox_lrCompleteQueuedWithdrawals/00008.png) ![](/tests/snapshots/nanox_lrCompleteQueuedWithdrawals/00009.png) diff --git a/tests/cal/abis/0xe8ff2a04837aac535199eecb5ece52b2735b3543.json b/tests/cal/abis/0x1e68238ce926dec62b3fbc99ab06eb1d85ce0270.json similarity index 100% rename from tests/cal/abis/0xe8ff2a04837aac535199eecb5ece52b2735b3543.json rename to tests/cal/abis/0x1e68238ce926dec62b3fbc99ab06eb1d85ce0270.json diff --git a/tests/cal/abis/0x380c7e0ec45f5b62ae5a0a6d6a0b95b532e3dd9c.json b/tests/cal/abis/0x5db5235b5c7e247488784986e58019fffd98fda4.json similarity index 100% rename from tests/cal/abis/0x380c7e0ec45f5b62ae5a0a6d6a0b95b532e3dd9c.json rename to tests/cal/abis/0x5db5235b5c7e247488784986e58019fffd98fda4.json diff --git a/tests/cal/abis/0xb0c8078af582d8b754ef35f3bdaceff8587bd914.json b/tests/cal/abis/0x8d6fd650500f82c7d978a440348e5a9b886943bf.json similarity index 100% rename from tests/cal/abis/0xb0c8078af582d8b754ef35f3bdaceff8587bd914.json rename to tests/cal/abis/0x8d6fd650500f82c7d978a440348e5a9b886943bf.json diff --git a/tests/cal/b2c.json b/tests/cal/b2c.json index 3e8fe7a..178c27f 100644 --- a/tests/cal/b2c.json +++ b/tests/cal/b2c.json @@ -2,7 +2,7 @@ "chainId": 5, "contracts": [ { - "address": "0xe8ff2a04837aac535199eecb5ece52b2735b3543", + "address": "0x1e68238ce926dec62b3fbc99ab06eb1d85ce0270", "contractName": "KilnStakingV1", "selectors": { "0xd0e30db0": { @@ -44,7 +44,7 @@ } }, { - "address": "0x380c7e0ec45f5b62ae5a0a6d6a0b95b532e3dd9c", + "address": "0x5db5235b5c7e247488784986e58019fffd98fda4", "contractName": "LedgerLiveV2", "selectors": { "0x3a4b66f1": { @@ -62,7 +62,7 @@ } }, { - "address": "0xb0c8078af582d8b754ef35f3bdaceff8587bd914", + "address": "0x8d6fd650500f82c7d978a440348e5a9b886943bf", "contractName": "KilnExitQueueV2", "selectors": { "0xadcf1163": { diff --git a/tests/src/batchWithdraw.test.js b/tests/src/batchWithdraw.test.js index 36b12c0..a9fa560 100644 --- a/tests/src/batchWithdraw.test.js +++ b/tests/src/batchWithdraw.test.js @@ -12,7 +12,7 @@ import { ethers } from 'ethers'; import { parseEther, parseUnits } from 'ethers/lib/utils'; import { ledgerService } from '@ledgerhq/hw-app-eth'; -const contractAddr = '0xe8ff2a04837aac535199eecb5ece52b2735b3543'; +const contractAddr = '0x1e68238ce926dec62b3fbc99ab06eb1d85ce0270'; const pluginName = 'Kiln'; const abi_path = `../cal/abis/${contractAddr}.json`; diff --git a/tests/src/batchWithdrawCL.test.js b/tests/src/batchWithdrawCL.test.js index 8b6df3f..91094bb 100644 --- a/tests/src/batchWithdrawCL.test.js +++ b/tests/src/batchWithdrawCL.test.js @@ -12,7 +12,7 @@ import { ethers } from 'ethers'; import { parseEther, parseUnits } from 'ethers/lib/utils'; import { ledgerService } from '@ledgerhq/hw-app-eth'; -const contractAddr = '0xe8ff2a04837aac535199eecb5ece52b2735b3543'; +const contractAddr = '0x1e68238ce926dec62b3fbc99ab06eb1d85ce0270'; const pluginName = 'Kiln'; const abi_path = `../cal/abis/${contractAddr}.json`; diff --git a/tests/src/batchWithdrawEL.test.js b/tests/src/batchWithdrawEL.test.js index 83fde3a..1e68bec 100644 --- a/tests/src/batchWithdrawEL.test.js +++ b/tests/src/batchWithdrawEL.test.js @@ -1,5 +1,5 @@ -import "core-js/stable"; -import "regenerator-runtime/runtime"; +import 'core-js/stable'; +import 'regenerator-runtime/runtime'; import { waitForAppScreen, zemu, @@ -7,25 +7,25 @@ import { nano_models, SPECULOS_ADDRESS, txFromEtherscan, -} from "./test.fixture"; -import { ethers } from "ethers"; -import { parseEther, parseUnits } from "ethers/lib/utils"; -import { ledgerService } from "@ledgerhq/hw-app-eth"; +} from './test.fixture'; +import { ethers } from 'ethers'; +import { parseEther, parseUnits } from 'ethers/lib/utils'; +import { ledgerService } from '@ledgerhq/hw-app-eth'; -const contractAddr = "0xe8ff2a04837aac535199eecb5ece52b2735b3543"; +const contractAddr = '0x1e68238ce926dec62b3fbc99ab06eb1d85ce0270'; -const pluginName = "Kiln"; +const pluginName = 'Kiln'; const abi_path = `../cal/abis/${contractAddr}.json`; const abi = require(abi_path); nano_models.forEach(function (model) { test( - "[Nano " + model.letter + "] BatchWithdrawEL", + '[Nano ' + model.letter + '] BatchWithdrawEL', zemu(model, async (sim, eth) => { const contract = new ethers.Contract(contractAddr, abi); const pubkeys = - "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; + '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'; const { data } = await contract.populateTransaction.batchWithdrawELFee( pubkeys @@ -53,8 +53,8 @@ nano_models.forEach(function (model) { await waitForAppScreen(sim); await sim.navigateAndCompareSnapshots( - ".", - model.name + "_batchWithdrawEL", + '.', + model.name + '_batchWithdrawEL', [right_clicks, 0] ); diff --git a/tests/src/claim.v2.test.js b/tests/src/claim.v2.test.js index 2312211..d284671 100644 --- a/tests/src/claim.v2.test.js +++ b/tests/src/claim.v2.test.js @@ -5,7 +5,7 @@ import { ethers } from 'ethers'; import { parseEther } from 'ethers/lib/utils'; import { ledgerService } from '@ledgerhq/hw-app-eth'; -const contractAddr = '0xb0c8078af582d8b754ef35f3bdaceff8587bd914'; +const contractAddr = '0x8d6fd650500f82c7d978a440348e5a9b886943bf'; const pluginName = 'Kiln'; const abi_path = `../cal/abis/${contractAddr}.json`; diff --git a/tests/src/deposit.test.js b/tests/src/deposit.test.js index 22a875e..348ac3b 100644 --- a/tests/src/deposit.test.js +++ b/tests/src/deposit.test.js @@ -13,7 +13,7 @@ import { ethers } from 'ethers'; import { parseEther, parseUnits } from 'ethers/lib/utils'; import { ledgerService } from '@ledgerhq/hw-app-eth'; -const contractAddr = '0xe8ff2a04837aac535199eecb5ece52b2735b3543'; +const contractAddr = '0x1e68238ce926dec62b3fbc99ab06eb1d85ce0270'; const pluginName = 'Kiln'; const abi_path = `../cal/abis/${contractAddr}.json`; diff --git a/tests/src/multiClaim.v2.test.js b/tests/src/multiClaim.v2.test.js index 2071117..dec6373 100644 --- a/tests/src/multiClaim.v2.test.js +++ b/tests/src/multiClaim.v2.test.js @@ -5,7 +5,7 @@ import { ethers } from 'ethers'; import { parseEther } from 'ethers/lib/utils'; import { ledgerService } from '@ledgerhq/hw-app-eth'; -const contractAddr = '0x380c7e0ec45f5b62ae5a0a6d6a0b95b532e3dd9c'; +const contractAddr = '0x5db5235b5c7e247488784986e58019fffd98fda4'; const pluginName = 'Kiln'; const abi_path = `../cal/abis/${contractAddr}.json`; @@ -18,7 +18,7 @@ nano_models.forEach(function (model) { const contract = new ethers.Contract(contractAddr, abi); const { data } = await contract.populateTransaction.multiClaim( - ['0x380c7e0ec45f5b62ae5a0a6d6a0b95b532e3dd9c'], + ['0x5db5235b5c7e247488784986e58019fffd98fda4'], [ [42, 47], [150, 2], diff --git a/tests/src/requestExit.test.js b/tests/src/requestExit.test.js index 017b83c..4b1ad9c 100644 --- a/tests/src/requestExit.test.js +++ b/tests/src/requestExit.test.js @@ -1,5 +1,5 @@ -import "core-js/stable"; -import "regenerator-runtime/runtime"; +import 'core-js/stable'; +import 'regenerator-runtime/runtime'; import { waitForAppScreen, zemu, @@ -7,25 +7,25 @@ import { nano_models, SPECULOS_ADDRESS, txFromEtherscan, -} from "./test.fixture"; -import { ethers } from "ethers"; -import { parseEther, parseUnits } from "ethers/lib/utils"; -import { ledgerService } from "@ledgerhq/hw-app-eth"; +} from './test.fixture'; +import { ethers } from 'ethers'; +import { parseEther, parseUnits } from 'ethers/lib/utils'; +import { ledgerService } from '@ledgerhq/hw-app-eth'; -const contractAddr = "0xe8ff2a04837aac535199eecb5ece52b2735b3543"; +const contractAddr = '0x1e68238ce926dec62b3fbc99ab06eb1d85ce0270'; -const pluginName = "Kiln"; +const pluginName = 'Kiln'; const abi_path = `../cal/abis/${contractAddr}.json`; const abi = require(abi_path); nano_models.forEach(function (model) { test( - "[Nano " + model.letter + "] RequestValidatorsExit", + '[Nano ' + model.letter + '] RequestValidatorsExit', zemu(model, async (sim, eth) => { const contract = new ethers.Contract(contractAddr, abi); const pubkeys = - "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; + '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'; const { data } = await contract.populateTransaction.requestValidatorsExit( pubkeys @@ -53,8 +53,8 @@ nano_models.forEach(function (model) { await waitForAppScreen(sim); await sim.navigateAndCompareSnapshots( - ".", - model.name + "_requestValidatorsExit", + '.', + model.name + '_requestValidatorsExit', [right_clicks, 0] ); diff --git a/tests/src/requestExit.v2.test.js b/tests/src/requestExit.v2.test.js index 26f48a3..6d75922 100644 --- a/tests/src/requestExit.v2.test.js +++ b/tests/src/requestExit.v2.test.js @@ -5,7 +5,7 @@ import { ethers } from 'ethers'; import { parseEther } from 'ethers/lib/utils'; import { ledgerService } from '@ledgerhq/hw-app-eth'; -const contractAddr = '0x380c7e0ec45f5b62ae5a0a6d6a0b95b532e3dd9c'; +const contractAddr = '0x5db5235b5c7e247488784986e58019fffd98fda4'; const pluginName = 'Kiln'; const abi_path = `../cal/abis/${contractAddr}.json`; diff --git a/tests/src/stake.v2.test.js b/tests/src/stake.v2.test.js index fd1c806..86465b8 100644 --- a/tests/src/stake.v2.test.js +++ b/tests/src/stake.v2.test.js @@ -13,7 +13,7 @@ import { ethers } from 'ethers'; import { parseEther, parseUnits } from 'ethers/lib/utils'; import { ledgerService } from '@ledgerhq/hw-app-eth'; -const contractAddr = '0x380c7e0ec45f5b62ae5a0a6d6a0b95b532e3dd9c'; +const contractAddr = '0x5db5235b5c7e247488784986e58019fffd98fda4'; const pluginName = 'Kiln'; const abi_path = `../cal/abis/${contractAddr}.json`; diff --git a/tests/src/withdraw.test.js b/tests/src/withdraw.test.js index d2de4d9..f7b6576 100644 --- a/tests/src/withdraw.test.js +++ b/tests/src/withdraw.test.js @@ -12,7 +12,7 @@ import { ethers } from 'ethers'; import { parseEther, parseUnits } from 'ethers/lib/utils'; import { ledgerService } from '@ledgerhq/hw-app-eth'; -const contractAddr = '0xe8ff2a04837aac535199eecb5ece52b2735b3543'; +const contractAddr = '0x1e68238ce926dec62b3fbc99ab06eb1d85ce0270'; const pluginName = 'Kiln'; const abi_path = `../cal/abis/${contractAddr}.json`; diff --git a/tests/src/withdrawCL.test.js b/tests/src/withdrawCL.test.js index 855fca9..b770f9e 100644 --- a/tests/src/withdrawCL.test.js +++ b/tests/src/withdrawCL.test.js @@ -12,7 +12,7 @@ import { ethers } from 'ethers'; import { parseEther, parseUnits } from 'ethers/lib/utils'; import { ledgerService } from '@ledgerhq/hw-app-eth'; -const contractAddr = '0xe8ff2a04837aac535199eecb5ece52b2735b3543'; +const contractAddr = '0x1e68238ce926dec62b3fbc99ab06eb1d85ce0270'; const pluginName = 'Kiln'; const abi_path = `../cal/abis/${contractAddr}.json`; diff --git a/tests/src/withdrawEL.test.js b/tests/src/withdrawEL.test.js index 70a22c4..9a0de19 100644 --- a/tests/src/withdrawEL.test.js +++ b/tests/src/withdrawEL.test.js @@ -12,7 +12,7 @@ import { ethers } from 'ethers'; import { parseEther, parseUnits } from 'ethers/lib/utils'; import { ledgerService } from '@ledgerhq/hw-app-eth'; -const contractAddr = '0xe8ff2a04837aac535199eecb5ece52b2735b3543'; +const contractAddr = '0x1e68238ce926dec62b3fbc99ab06eb1d85ce0270'; const pluginName = 'Kiln'; const abi_path = `../cal/abis/${contractAddr}.json`;