From fd3827902310c409c1f07bf9177e68271a1b1cd2 Mon Sep 17 00:00:00 2001 From: futreall <86553580+futreall@users.noreply.github.com> Date: Wed, 12 Mar 2025 22:27:00 +0200 Subject: [PATCH 1/2] Update staking-implementation.md --- documentation/staking-implementation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/staking-implementation.md b/documentation/staking-implementation.md index 6f118d57..b6309d39 100644 --- a/documentation/staking-implementation.md +++ b/documentation/staking-implementation.md @@ -1,6 +1,6 @@ # Staking Implementation -Implementation of L2 staking functionality is separated into, +Implementation of L2 staking functionality is separated into. - `L2LockingPosition` contract maintains locking positions and allows owner to manipulate their positions. The contract is an implementation of ERC721 based NFT and interacts with L2VotingPower contract to adjust the voting power of the owner of the locking position when consumed by `L2Staking` contract. @@ -59,4 +59,4 @@ This contract exposes the public API to retrieve information about locking posit ## Representing Time Contracts involved in L2 Lisk staking maintains (UNIX epoch) time at the granularity of a day, instead of seconds. -The day 19740, will be 19740 x 60 x 60 x 24 i.e. 1705536000 epoch seconds, any interactions at other higher-level environment must convert days to epoch time. \ No newline at end of file +The day 19740, will be 19740 x 60 x 60 x 24 i.e. 1705536000 epoch seconds, any interactions at other higher-level environment must convert days to epoch time. From bd45ef2bb601e6e986f21a5b37eaec689e755392 Mon Sep 17 00:00:00 2001 From: futreall <86553580+futreall@users.noreply.github.com> Date: Wed, 12 Mar 2025 22:27:18 +0200 Subject: [PATCH 2/2] Update swap-and-bridge.md --- documentation/swap-and-bridge.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/swap-and-bridge.md b/documentation/swap-and-bridge.md index 9f96d871..89b8c1b2 100644 --- a/documentation/swap-and-bridge.md +++ b/documentation/swap-and-bridge.md @@ -43,7 +43,7 @@ The `SwapAndBridge` contract exposes the following public/external functions: - `receive() external payable`: Convenience function allowing users to interact with the contract just by sending ETH. It redirects to `swapAndBridgeTo(msg.sender)`; - `swapAndBridgeTo(address recipient) public payable`: Convenience function to swap ETH for LST without specifying the minimum amount of LST to be received. It redirects to `swapAndBridgeToWithMinimumAmount(recipient, 0)`; -- `swapAndBridgeToWithMinimumAmount(address recipient, uint256 minL1Tokens) public payable`: The core function performing boht ETH-->LST conversion (by sending ETH to the LST contract) and the L1 LST-->L2 LST bridging (by calling the bridge contract `depositERC20To` function). Several checks are included to ensure that the conversion is succesfull. It is possible to specify a `uint256 minL1Tokens` value larger than 0, in which case the contract will also check that swap resulted in an amount of LST larger than the specified minimum. A value of 0 passed to this function skips this check, allowing for any (non-zero) value to be accepted. +- `swapAndBridgeToWithMinimumAmount(address recipient, uint256 minL1Tokens) public payable`: The core function performing boht ETH-->LST conversion (by sending ETH to the LST contract) and the L1 LST-->L2 LST bridging (by calling the bridge contract `depositERC20To` function). Several checks are included to ensure that the conversion is successful. It is possible to specify a `uint256 minL1Tokens` value larger than 0, in which case the contract will also check that swap resulted in an amount of LST larger than the specified minimum. A value of 0 passed to this function skips this check, allowing for any (non-zero) value to be accepted. ## Integrations