forked from LedgerHQ/app-plugin-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge staking feature branch into develop (#19)
Add support for staking contract (#12) * :WIP: Implement handler for staking lockAmount function * :WIP: Revert and implement handler for reward createPosition function * 🌱 Add a new unit test for create position for reward contract * 🐛 Fix implementation and generate snapshots * Implement handler for fast unlock * 🌱 Add a new unit test for the fast unlock method * Fix handler for initFastUnlock * Add handlers for claimRewards, pauseUnlocking and resumeUnlocking * 🔨 Code refactoring * 🐛 Fix CI * 🌱 Update to support the increaseLockingAmount method - Also add a new unit test for that * 🌱 Update to support the extendDuration method - Also add a new unit test for that * Update Readme * 💅 Rename a method name * 🌱 Update to support the deletePositions method - Add a new unit test for that - Generate snapshots * 💅 Rename some consts * 🌱 Update to support the addUnusedRewards method - Add a new unit test for that - Generate snapshots * 🌱 Update to support fundStakingRewards method - Add a new unit test for that - Generate snapshots * 👌 Applied suggestions * 🐛 Fix the Makefile --------- Co-authored-by: hatef <[email protected]>
- Loading branch information
1 parent
43ae173
commit 4976964
Showing
341 changed files
with
1,844 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
# Technical Specification | ||
|
||
## Smart Contracts | ||
|
||
Smart contracts covered by this plugin are: | ||
|
||
| Network | Version | Smart Contract | Address | | ||
| ---- | --- | ---- | --- | | ||
| Lisk Sepolia Testnet | - | TokenClaim | `0x5c3a68B5C635Ce0DA7648C30A1B83A61C376bd87` | | ||
| Network | Version | Smart Contract | Address | | ||
| -------------------- | ------- | -------------- | -------------------------------------------- | | ||
| Lisk Sepolia Testnet | - | TokenClaim | `0x3D4190b08E3E30183f5AdE3A116f2534Ee3a4f94` | | ||
| Lisk Sepolia Testnet | - | Reward | `0xFd322B4724C497E59D48fff8f79c16b4D48837f5` | | ||
| Lisk Mainnet | - | TokenClaim | `0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994` | | ||
| Lisk Mainnet | - | Reward | `0xD35ca9577a9DADa7624a35EC10C2F55031f0Ab1f` | | ||
|
||
## Functions | ||
|
||
Following functions are covered by this plugins: | ||
|
||
|Contract | Function | Selector | Displayed Parameters | | ||
| --- | --- | --- | --- | | ||
|ERC1967Proxy | claimRegularAccount | `0xf6de242d`| <table> <tbody> <tr><td><code>uint256 claimAmount</code></td></tr> <tr><td><code>bytes senderPublicKey</code></td></tr> <tr><td><code>address recipientAddress</code></td></tr> </tbody> </table> | | ||
|ERC1967Proxy | claimMultisigAccount | `0x2f559f68`| <table> <tbody> <tr><td><code>uint256 claimAmount</code></td></tr> <tr><td><code>bytes senderAddress</code></td></tr> <tr><td><code>address recipientAddress</code></td></tr> </tbody> </table> | | ||
| Contract | Function | Selector | Displayed Parameters | | ||
| ---------- | ------------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| TokenClaim | claimRegularAccount | `0xf6de242d` | <table> <tbody> <tr><td><code>uint256 claimAmount</code></td></tr> <tr><td><code>bytes senderPublicKey</code></td></tr> <tr><td><code>address recipientAddress</code></td></tr> </tbody> </table> | | ||
| TokenClaim | claimMultisigAccount | `0x2f559f68` | <table> <tbody> <tr><td><code>uint256 claimAmount</code></td></tr> <tr><td><code>bytes senderAddress</code></td></tr> <tr><td><code>address recipientAddress</code></td></tr> </tbody> </table> | | ||
| Reward | createPosition | `0xd1aaef05` | <table> <tbody> <tr><td><code>uint256 lockAmount</code></td></tr> <tr><td><code>uint256 lockDuration</code></td></tr> </tbody> </table> | | ||
| Reward | initiateFastUnlock | `0x864c8725` | <table> <tbody> <tr><td><code>uint256[] lockIDs</code></td></tr> </tbody> </table> | | ||
| Reward | claimRewards | `0x5eac6239` | <table> <tbody> <tr><td><code>uint256[] lockIDs</code></td></tr> </tbody> </table> | | ||
| Reward | pauseUnlocking | `0xfe042b5b` | <table> <tbody> <tr><td><code>uint256[] lockIDs</code></td></tr> </tbody> </table> | | ||
| Reward | resumeUnlockingCountdown | `0x82d4ae58` | <table> <tbody> <tr><td><code>uint256[] lockIDs</code></td></tr> </tbody> </table> | | ||
| Reward | increaseLockingAmount | `0xf94415ca` | <table> <tbody> <tr><td><code>(uint256 lockID, uint256 amountIncrease)[]</code></td></tr> </tbody> </table> | | ||
| Reward | extendDuration | `0x2d412a71` | <table> <tbody> <tr><td><code>(uint256 lockID, uint256 durationExtension)[]</code></td></tr> </tbody> </table> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.