Please visit our website at zondax.ch
This is a plugin for the Ethereum application which helps parsing and displaying relevant information when signing a Morpho smart contract.
- Ledger Nano S/S+/X/Stax Morpho plugin
- Specs / Documentation
- Ragger tests
Please:
- Do not use in production
- Do not use a Ledger device with funds for development purposes.
- Have a separate and marked device that is used ONLY for development and testing
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.
Smart contracts covered by the plugin shall be described here:
Network |
Smart Contract |
Address |
Ethereum |
Public Allocator |
0xfd32fA2ca22c76dD6E550706Ad913FC6CE91c75D |
Base |
Public Allocator |
0xA090dD1a701408Df1d4d0B85b716c87565f90467 |
Ethereum |
MorphoBlue |
0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb |
Base |
MorphoBlue |
0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb |
Ethereum |
MetaMorpho Factory* |
0xA9c3D3a366466Fa809d1Ae982Fb2c46E5fC41101 |
Base |
MetaMorpho Factory* |
0xA9c3D3a366466Fa809d1Ae982Fb2c46E5fC41101 |
*Plugin will support methods for the vaults created by the factory.
For the smart contracts implemented, the functions covered by the plugin shall be described here:
Function |
Selector |
Displayed Parameters |
reallocateTo |
0x833947fd |
|
repay |
0x20b76e81 |
uint256 assets | uint256 shares | address onBehalf | |
supplyCollateral |
0x238d6579 |
uint256 assets | address onBehalf | |
borrow |
0x50d8cd4b |
uint256 assets | uint256 shares | address onBehalf | |
withdraw |
0x5c2bea49 |
uint256 assets | uint256 shares | address onBehalf | |
setAuthorizationWithSig |
0x8069218f |
address authorizer | address authorized | bool isAuthorized | |
withdrawCollateral |
0x8720316d |
uint256 assets | address onBehalf | |
createMarket |
0x8c1358a2 |
address loan_token | address collateral_token | |
supply |
0xa99aad89 |
uint256 assets | uint256 shares | address onBehalf | |
flashLoan |
0xe0232b42 |
address token | uint256 assets | |
setAuthorization |
0xeecea000 |
address authorized | bool isAuthorized |
|
deposit |
0x6e553f65 |
uint256 assets | address receiver |
|
mint |
0x94bf804d |
uint256 shares | address receiver |
|
redeem |
0xba087652 |
uint256 shares | address receiver | address owner |
|
withdraw |
0xb460af94 |
uint256 assets | address receiver | address owner |
|
approve |
0x095ea7b3 |
uint256 shares | address spender |
|
Ledger's recommended plugin guide is out-dated and doesn't work since they introduced a lot of new changes. Here's a simple way to get started with this repo:
- Clone this repo (along with git submodules)
- Install Xquartz and make sure you have enabled "Allow connections from network clients" enabled under "Security" settings.
- Install and start Docker (Note: If Docker is already running, quit and start it after starting Xquartz, otherwise docker cannot connect to Xquartz).
- Install the Ledger Dev Tools VS Code plugin and makes sure it's enabled
- Once you have installed the plugin and open the repo, the plugin should by default try to create and start the containers. If it doesn't, you can simply click "Update Container" under "Ledger Dev Tools" in the Activity Side Bar on VS Code.
- On the "Ledger Dev Tools" side bar, Select a target and then click on Build.
- Once build is complete, click on "Run tests" to run the tests