Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Liquid Restaking + Qlabs audit #24

Merged
merged 43 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e6f1092
feat(lr): add delegateTo support
loicttn Apr 17, 2024
0569102
feat(lr): complete delegate to testsuite
loicttn Apr 18, 2024
95d5034
feat(lr): add undelegate support
loicttn Apr 18, 2024
fc04874
feat(lr): add queueWithdrawals support
loicttn Apr 18, 2024
19537ac
fix(lr/queueWithdrawal): invalid state transitions
loicttn Apr 22, 2024
e9b75c6
fix(lr/queueWithdrawals): invalid state transition
loicttn Apr 22, 2024
4c36e96
feat(lr): add completeQueuedWithdrawals support
loicttn Apr 24, 2024
7d3b45a
chore: file split + headers
loicttn Apr 25, 2024
6480747
fix(lr): invalid state transitions + tests
loicttn Apr 28, 2024
ca5885b
fix(lr): deposit parsing
loicttn Apr 29, 2024
6878559
fix(lr): undelegate test
loicttn Apr 29, 2024
b66a7ce
fix: better contract ids
loicttn Apr 29, 2024
3c6f4fd
fix(lr): test for complete queued withdrawal
loicttn Apr 29, 2024
dd471cf
fix(lr): depositIntoStrategy tests
loicttn Apr 29, 2024
c707fa1
fix(lr): test for lrQueueWithdrawals
loicttn Apr 29, 2024
596c711
fix(v2): tests with new contract id
loicttn Apr 29, 2024
9af476e
feat: bump plugin version
loicttn Apr 29, 2024
05701c1
fix: v1 tests
loicttn Apr 29, 2024
217684a
fix: v1 tests
loicttn Apr 29, 2024
5135e0b
fix(lr): provide parameter missing comments
loicttn Apr 29, 2024
dd29450
fix: review useless overflow check
loicttn Apr 29, 2024
54cf56a
fix: nits
loicttn Apr 29, 2024
6b61c81
fix(lr): remove withdrawer uncomplete clear signing
loicttn Apr 29, 2024
df7b9b2
fix: readme
loicttn Apr 29, 2024
bbb3f4c
fix: sdk version to match ci requirements
loicttn Apr 29, 2024
7e7ccb1
feat: docs + fix cal placeholders
loicttn Apr 29, 2024
438163a
fix: I1-documentation-issues
loicttn May 12, 2024
4afc561
fix: I4-typographical-error
loicttn May 12, 2024
dcca922
fix: I3 for lrQueueWithdrawals
loicttn May 16, 2024
7ea7e66
fix: I3 for lrDelegateTo
loicttn May 16, 2024
bcc283d
fix: I3 for lrDelegateTo
loicttn May 16, 2024
c38a68c
fix: I3 for lrCompleteQueuedWithdrawals
loicttn May 23, 2024
0e7bdc7
fix: I7
loicttn May 23, 2024
4f21dd6
fix: I5-1
loicttn May 23, 2024
40b139c
fix: I5-3
loicttn May 23, 2024
e5b032d
fix: I5-4
loicttn May 28, 2024
25a8ba1
fix: doc nt
loicttn May 28, 2024
157b0fa
fix: I5-2
loicttn May 28, 2024
6eaf9d9
fix: I5-4 off by one issue
loicttn May 29, 2024
8d41f09
fix: I5-2
loicttn May 29, 2024
ad0d5dd
fix: I1
loicttn May 29, 2024
46ea305
fix: I2
loicttn May 29, 2024
ca1cdc3
fix: ethereum plugin sdk version
loicttn May 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "ethereum-plugin-sdk"]
path = ethereum-plugin-sdk
url = [email protected]:LedgerHQ/ethereum-plugin-sdk.git
[submodule "app-ethereum"]
path = app-ethereum
url = [email protected]:LedgerHQ/app-ethereum.git
34 changes: 16 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
# ****************************************************************************
# Ledger Ethereum Plugin Boilerplate
# (c) 2023 Ledger SAS.
#
# 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.
# ****************************************************************************
# *******************************************************************************
# *
# * ██╗ ██╗██╗██╗ ███╗ ██╗
# * ██║ ██╔╝██║██║ ████╗ ██║
# * █████╔╝ ██║██║ ██╔██╗ ██║
# * ██╔═██╗ ██║██║ ██║╚██╗██║
# * ██║ ██╗██║███████╗██║ ╚████║
# * ╚═╝ ╚═╝╚═╝╚══════╝╚═╝ ╚═══╝
# *
# * Kiln Ethereum Ledger App
# * (c) 2022-2024 Kiln
# *
# * [email protected]
# ********************************************************************************

APPNAME = "Kiln"

# Application version
APPVERSION_M = 1
APPVERSION_N = 4
APPVERSION_M = 2
APPVERSION_N = 0
APPVERSION_P = 0

include ethereum-plugin-sdk/standard_plugin.mk
41 changes: 41 additions & 0 deletions PLUGIN_SPECIFICATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Technical Specification

## About

This documentation describes the smart contracts and functions supported by the kiln plugin.

## Smart Contracts

Smart contracts covered by the plugin:

| Network | Version | Smart Contract | Address |
| ------- | ------- | ------------------------------------- | -------------------------------------------- |
| Mainnet | v1.2 | OCV1 - Kiln On-Chain v1 | `0x1e68238ce926dec62b3fbc99ab06eb1d85ce0270` |
| Mainnet | v2.2 | OCV2-N20 - Kiln On-Chain v2 Native 20 | `0x5db5235b5c7e247488784986e58019fffd98fda4` |
| Mainnet | v2.2 | OCV2-EQ - Kiln On-Chain v2 Exit Queue | `0x8d6fd650500f82c7d978a440348e5a9b886943bf` |
| Mainnet | M2 | EL-SM - EigenLayer Strategy Manager | `0x858646372cc42e1a627fce94aa7a7033e7cf075a` |
| Mainnet | M2 | EL-DM - EigenLayer Delegation Manager | `0x39053d51b77dc0d36036fc1fcc8cb819df8ef37a` |

## Functions

For the smart contracts implemented, the functions covered by the plugin are:

| Contract | Function | Selector | Displayed Parameters |
| -------- | ------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| OCV1 | deposit | `0xd0e30db0` | <table><tbody> <tr><td><code>uint tx.value</code></td></tr> </tbody></table> |
| OCV1 | withdraw | `0x0968f264` | <table><tbody> <tr><td>n/r</td></tr> </tbody></table> |
| OCV1 | withdrawELFee | `0xbf509bd4` | <table><tbody> <tr><td>n/r</td></tr> </tbody></table> |
| OCV1 | withdrawCLFee | `0x2ba03a79` | <table><tbody> <tr><td>n/r</td></tr> </tbody></table> |
| OCV1 | batchWithdraw | `0xe8a0c121` | <table><tbody> <tr><td>n/r</td></tr> </tbody></table> |
| OCV1 | batchWithdrawELFee | `0xef5e4682` | <table><tbody> <tr><td>n/r</td></tr> </tbody></table> |
| OCV1 | batchWithdrawCLFee | `0x0ffab6c2` | <table><tbody> <tr><td>n/r</td></tr> </tbody></table> |
| OCV1 | requestValidatorsExit | `0xb6b06dec` | <table><tbody> <tr><td>n/r</td></tr> </tbody></table> |
| OCV2-N20 | stake | `0x3a4b66f1` | <table><tbody> <tr><td><code>uint tx.value</code></td></tr> </tbody></table> |
| OCV2-N20 | requestExit | `0x721c6513` | <table><tbody> <tr><td>n/r</td></tr> </tbody></table> |
| OCV2-N20 | multiClaim | `0xb7ba18c7` | <table><tbody> <tr><td>n/r</td></tr> </tbody></table> |
| OCV2-EQ | claim | `0xadcf1163` | <table><tbody> <tr><td>n/r</td></tr> </tbody></table> |
| EL-SM | depositIntoStrategy | `0xe7a050aa` | <table><tbody> <tr><td><code>address strategy</code></td></tr> <tr><td><code>address ERC20</code></td></tr><tr><td><code>deposited amount</code></td></tr></tbody></table> |
| EL-SM | queueWithdrawals | `0x0dd8dd02` | <table><tbody> <tr><td><code>queuedWithdrawalParams.strategies[]</code> as string using an internal mapping</td></tr><tr><td><code>queuedWithdrawalParams.withdrawer</code></td></tr> </tbody></table> |
| EL-SM | completeQueuedWithdrawals | `0x33404396` | <table><tbody> <tr><td>strategies as string using an internal mapping</td></tr> <tr><td>redelegated or withdrawal action</tr></td> </tbody></table> |
| EL-DM | delegateTo | `0xeea9064b` | <table><tbody> <tr><td><code>address operator</code> or <code>"KILN"</code></td></tr> </tbody></table> |
| EL-DM | undelegate | `0xda8be864` | <table><tbody> </tbody></table> |
Loading
Loading