Skip to content

Commit

Permalink
docs: Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mgnfy-view committed Mar 27, 2024
1 parent 16a27fa commit 31bfdd6
Show file tree
Hide file tree
Showing 12 changed files with 1,096 additions and 10 deletions.
16 changes: 10 additions & 6 deletions docs/src/SUMMARY.md
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)
6 changes: 2 additions & 4 deletions docs/src/src/README.md
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)
4 changes: 4 additions & 0 deletions docs/src/src/ThunderSwapReceiver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@


# Contents
- [interfaces](/src/ThunderSwapReceiver/interfaces)
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|


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|


5 changes: 5 additions & 0 deletions docs/src/src/ThunderSwapReceiver/interfaces/README.md
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)
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|


7 changes: 7 additions & 0 deletions docs/src/src/core/README.md
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)
Loading

0 comments on commit 31bfdd6

Please sign in to comment.