-
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.
- Loading branch information
1 parent
16a27fa
commit 31bfdd6
Showing
12 changed files
with
1,096 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
# Summary | ||
- [Home](README.md) | ||
# src | ||
- [❱ interfaces](src/interfaces/README.md) | ||
- [IThunderSwapPool](src/interfaces/IThunderSwapPool.sol/interface.IThunderSwapPool.md) | ||
- [IThunderSwapReceiver](src/interfaces/IThunderSwapReceiver.sol/interface.IThunderSwapReceiver.md) | ||
- [LiquidityProviderToken](src/LiquidityProviderToken.sol/contract.LiquidityProviderToken.md) | ||
- [ThunderSwapPool](src/ThunderSwapPool.sol/contract.ThunderSwapPool.md) | ||
- [ThunderSwapPoolFactory](src/ThunderSwapPoolFactory.sol/contract.ThunderSwapPoolFactory.md) | ||
- [❱ ThunderSwapReceiver](src/ThunderSwapReceiver/README.md) | ||
- [❱ interfaces](src/ThunderSwapReceiver/interfaces/README.md) | ||
- [IThunderSwapHooks](src/ThunderSwapReceiver/interfaces/IThunderSwapHooks.sol/interface.IThunderSwapHooks.md) | ||
- [IThunderSwapReceiver](src/ThunderSwapReceiver/interfaces/IThunderSwapReceiver.sol/interface.IThunderSwapReceiver.md) | ||
- [❱ core](src/core/README.md) | ||
- [❱ interfaces](src/core/interfaces/README.md) | ||
- [IThunderSwapPool](src/core/interfaces/IThunderSwapPool.sol/interface.IThunderSwapPool.md) | ||
- [LiquidityProviderToken](src/core/LiquidityProviderToken.sol/contract.LiquidityProviderToken.md) | ||
- [ThunderSwapPool](src/core/ThunderSwapPool.sol/contract.ThunderSwapPool.md) | ||
- [ThunderSwapPoolFactory](src/core/ThunderSwapPoolFactory.sol/contract.ThunderSwapPoolFactory.md) |
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,7 +1,5 @@ | ||
|
||
|
||
# Contents | ||
- [interfaces](/src/interfaces) | ||
- [LiquidityProviderToken](LiquidityProviderToken.sol/contract.LiquidityProviderToken.md) | ||
- [ThunderSwapPool](ThunderSwapPool.sol/contract.ThunderSwapPool.md) | ||
- [ThunderSwapPoolFactory](ThunderSwapPoolFactory.sol/contract.ThunderSwapPoolFactory.md) | ||
- [ThunderSwapReceiver](/src/ThunderSwapReceiver) | ||
- [core](/src/core) |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
|
||
# Contents | ||
- [interfaces](/src/ThunderSwapReceiver/interfaces) |
53 changes: 53 additions & 0 deletions
53
...derSwapReceiver/interfaces/IThunderSwapHooks.sol/interface.IThunderSwapHooks.md
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# IThunderSwapHooks | ||
[Git Source](https://github.com/Sahil-Gujrati/thunder-swap/blob/65d96eb516be89fd9526025068582cb68137dd6f/src/ThunderSwapReceiver/interfaces/IThunderSwapHooks.sol) | ||
|
||
|
||
## Functions | ||
### beforeThunderSwapReceived | ||
|
||
Called by the ThunderSwapPool before your swap | ||
|
||
|
||
```solidity | ||
function beforeThunderSwapReceived( | ||
IERC20 _inputToken, | ||
uint256 _inputAmount, | ||
IERC20 _outputToken, | ||
uint256 _outputAmount | ||
) | ||
external; | ||
``` | ||
**Parameters** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`_inputToken`|`IERC20`|The input token| | ||
|`_inputAmount`|`uint256`|The input token amount| | ||
|`_outputToken`|`IERC20`|The output token| | ||
|`_outputAmount`|`uint256`|The output token amount| | ||
|
||
|
||
### afterThunderSwapReceived | ||
|
||
Called by the ThunderSwapPool after your swap | ||
|
||
|
||
```solidity | ||
function afterThunderSwapReceived( | ||
IERC20 _inputToken, | ||
uint256 _inputAmount, | ||
IERC20 _outputToken, | ||
uint256 _outputAmount | ||
) | ||
external; | ||
``` | ||
**Parameters** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`_inputToken`|`IERC20`|The input token| | ||
|`_inputAmount`|`uint256`|The input token amount| | ||
|`_outputToken`|`IERC20`|The output token| | ||
|`_outputAmount`|`uint256`|The output token amount| | ||
|
||
|
32 changes: 32 additions & 0 deletions
32
...pReceiver/interfaces/IThunderSwapReceiver.sol/interface.IThunderSwapReceiver.md
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# IThunderSwapReceiver | ||
[Git Source](https://github.com/Sahil-Gujrati/thunder-swap/blob/65d96eb516be89fd9526025068582cb68137dd6f/src/ThunderSwapReceiver/interfaces/IThunderSwapReceiver.sol) | ||
|
||
**Inherits:** | ||
[IThunderSwapHooks](/src/ThunderSwapReceiver/interfaces/IThunderSwapHooks.sol/interface.IThunderSwapHooks.md) | ||
|
||
|
||
## Functions | ||
### onThunderSwapReceived | ||
|
||
This function is invoked on each flash swap if `_callContract` was set to true | ||
|
||
|
||
```solidity | ||
function onThunderSwapReceived( | ||
IERC20 _inputToken, | ||
uint256 _inputAmount, | ||
IERC20 _outputToken, | ||
uint256 _outputAmount | ||
) | ||
external; | ||
``` | ||
**Parameters** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`_inputToken`|`IERC20`|The input token| | ||
|`_inputAmount`|`uint256`|The input token amount| | ||
|`_outputToken`|`IERC20`|The output token| | ||
|`_outputAmount`|`uint256`|The output token amount| | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
|
||
# Contents | ||
- [IThunderSwapHooks](IThunderSwapHooks.sol/interface.IThunderSwapHooks.md) | ||
- [IThunderSwapReceiver](IThunderSwapReceiver.sol/interface.IThunderSwapReceiver.md) |
47 changes: 47 additions & 0 deletions
47
docs/src/src/core/LiquidityProviderToken.sol/contract.LiquidityProviderToken.md
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# LiquidityProviderToken | ||
[Git Source](https://github.com/Sahil-Gujrati/thunder-swap/blob/65d96eb516be89fd9526025068582cb68137dd6f/src/core/LiquidityProviderToken.sol) | ||
|
||
**Inherits:** | ||
ERC20, Ownable | ||
|
||
|
||
## Functions | ||
### constructor | ||
|
||
|
||
```solidity | ||
constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) Ownable(msg.sender); | ||
``` | ||
|
||
### mint | ||
|
||
Mints the specified amount of LP tokens to the specified account | ||
|
||
|
||
```solidity | ||
function mint(address _account, uint256 _amount) external onlyOwner; | ||
``` | ||
**Parameters** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`_account`|`address`|The receiver of LP tokens| | ||
|`_amount`|`uint256`|The amount of LP tokens to mint| | ||
|
||
|
||
### burn | ||
|
||
Burns the specified amount of LP tokens held by the specified account | ||
|
||
|
||
```solidity | ||
function burn(address _account, uint256 _amount) external onlyOwner; | ||
``` | ||
**Parameters** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`_account`|`address`|The account whose LP tokens are to be burnt| | ||
|`_amount`|`uint256`|The amount of LP tokens to burn| | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
|
||
# Contents | ||
- [interfaces](/src/core/interfaces) | ||
- [LiquidityProviderToken](LiquidityProviderToken.sol/contract.LiquidityProviderToken.md) | ||
- [ThunderSwapPool](ThunderSwapPool.sol/contract.ThunderSwapPool.md) | ||
- [ThunderSwapPoolFactory](ThunderSwapPoolFactory.sol/contract.ThunderSwapPoolFactory.md) |
Oops, something went wrong.