Skip to content

Commit

Permalink
updated spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
snreynolds committed Mar 18, 2021
1 parent 9fd6753 commit 4dd0a12
Show file tree
Hide file tree
Showing 30 changed files with 297 additions and 100 deletions.
10 changes: 8 additions & 2 deletions contract.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
### {{name}}
```solidity
function {{name}}(
{{args}}
{{#natspec.params}}
{{#lookup ../args.types @index}}{{/lookup}} {{param}}{{#if @last}}{{else}},{{/if}}
{{/natspec.params}}
) {{visibility}}{{#if outputs}} returns ({{outputs}}){{/if}}
```
{{#if natspec.userdoc}}{{natspec.userdoc}}{{/if}}
Expand All @@ -32,7 +34,11 @@
{{#ownEvents}}
### {{name}}
```solidity
event {{name}}({{args}})
event {{name}}(
{{#natspec.params}}
{{#lookup ../args.types @index}}{{/lookup}} {{param}}{{#if @last}}{{else}},{{/if}}
{{/natspec.params}}
)
```
{{#if natspec.userdoc}}{{natspec.userdoc}}{{/if}}
{{#if natspec.devdoc}}{{natspec.devdoc}}{{/if}}
Expand Down
1 change: 0 additions & 1 deletion docs/V3/reference/NoDelegateCall.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Base contract that provides a modifier for preventing delegatecall to methods in
### constructor
```solidity
function constructor(
) internal
```

Expand Down
7 changes: 5 additions & 2 deletions docs/V3/reference/UniswapV3Factory.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ Deploys Uniswap V3 pools and manages ownership and control over pool protocol fe
### createPool
```solidity
function createPool(
address tokenA, address tokenB, uint24 fee
address tokenA,
address tokenB,
uint24 fee
) external returns (address pool)
```
Creates a pool for the given two tokens and fee
Expand Down Expand Up @@ -43,7 +45,8 @@ Must be called by the current owner
### enableFeeAmount
```solidity
function enableFeeAmount(
uint24 fee, int24 tickSpacing
uint24 fee,
int24 tickSpacing
) public
```
Enables a fee amount with the given tickSpacing
Expand Down
38 changes: 29 additions & 9 deletions docs/V3/reference/UniswapV3Pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
### _blockTimestamp
```solidity
function _blockTimestamp(
) internal returns (uint32)
```

Expand All @@ -15,7 +14,8 @@ Returns the block timestamp truncated to 32 bits, i.e. mod 2**32. This method is
### secondsInside
```solidity
function secondsInside(
int24 tickLower, int24 tickUpper
int24 tickLower,
int24 tickUpper
) external returns (uint32)
```
Returns a relative timestamp value representing how long, in seconds, the pool has spent between
Expand Down Expand Up @@ -93,7 +93,11 @@ not locked because it initializes unlocked
### mint
```solidity
function mint(
address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes data
address recipient,
int24 tickLower,
int24 tickUpper,
uint128 amount,
bytes data
) external returns (uint256 amount0, uint256 amount1)
```
Adds liquidity for the given recipient/tickLower/tickUpper position
Expand All @@ -116,7 +120,11 @@ noDelegateCall is applied indirectly via _modifyPosition
### collect
```solidity
function collect(
address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested
address recipient,
int24 tickLower,
int24 tickUpper,
uint128 amount0Requested,
uint128 amount1Requested
) external returns (uint128 amount0, uint128 amount1)
```
Collects fees owed to a position
Expand All @@ -142,7 +150,9 @@ pass any value greater than the fees owed.
### burn
```solidity
function burn(
int24 tickLower, int24 tickUpper, uint128 amount
int24 tickLower,
int24 tickUpper,
uint128 amount
) external returns (uint256 amount0, uint256 amount1)
```
Burn liquidity from the sender and account tokens owed for the liquidity to the position
Expand All @@ -163,7 +173,11 @@ noDelegateCall is applied indirectly via _modifyPosition
### swap
```solidity
function swap(
address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes data
address recipient,
bool zeroForOne,
int256 amountSpecified,
uint160 sqrtPriceLimitX96,
bytes data
) external returns (int256 amount0, int256 amount1)
```
Swap token0 for token1, or token1 for token0
Expand All @@ -188,7 +202,10 @@ value after the swap. If one for zero, the price cannot be greater than this val
### flash
```solidity
function flash(
address recipient, uint256 amount0, uint256 amount1, bytes data
address recipient,
uint256 amount0,
uint256 amount1,
bytes data
) external
```
Receive token0 and/or token1 and pay it back, plus a fee, in the callback
Expand All @@ -208,7 +225,8 @@ with 0 amount{0,1} and sending the donation amount(s) from the callback
### setFeeProtocol
```solidity
function setFeeProtocol(
uint8 feeProtocol0, uint8 feeProtocol1
uint8 feeProtocol0,
uint8 feeProtocol1
) external
```
Set the denominator of the protocol's % share of the fees
Expand All @@ -223,7 +241,9 @@ Set the denominator of the protocol's % share of the fees
### collectProtocol
```solidity
function collectProtocol(
address recipient, uint128 amount0Requested, uint128 amount1Requested
address recipient,
uint128 amount0Requested,
uint128 amount1Requested
) external returns (uint128 amount0, uint128 amount1)
```
Collect the protocol fee accrued to the pool
Expand Down
1 change: 0 additions & 1 deletion docs/V3/reference/UniswapV3PoolDeployer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
### deploy
```solidity
function deploy(
address factory, address token0, address token1, uint24 fee, int24 tickSpacing
) internal returns (address pool)
```

Expand Down
25 changes: 19 additions & 6 deletions docs/V3/reference/interfaces/IERC20Minimal.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ Returns the balance of a token
### transfer
```solidity
function transfer(
address recipient, uint256 amount
address recipient,
uint256 amount
) external returns (bool)
```
Transfers the amount of token from the `msg.sender` to the recipient
Expand All @@ -42,7 +43,8 @@ Transfers the amount of token from the `msg.sender` to the recipient
### allowance
```solidity
function allowance(
address owner, address spender
address owner,
address spender
) external returns (uint256)
```
Returns the current allowance given to a spender by an owner
Expand All @@ -61,7 +63,8 @@ Returns the current allowance given to a spender by an owner
### approve
```solidity
function approve(
address spender, uint256 amount
address spender,
uint256 amount
) external returns (bool)
```
Sets the allowance of a spender from the `msg.sender` to the value `amount`
Expand All @@ -80,7 +83,9 @@ Sets the allowance of a spender from the `msg.sender` to the value `amount`
### transferFrom
```solidity
function transferFrom(
address sender, address recipient, uint256 amount
address sender,
address recipient,
uint256 amount
) external returns (bool)
```
Transfers `amount` tokens from `sender` to `recipient` up to the allowance given to the `msg.sender`
Expand All @@ -100,7 +105,11 @@ Transfers `amount` tokens from `sender` to `recipient` up to the allowance given
## Events
### Transfer
```solidity
event Transfer(address from, address to, uint256 value)
event Transfer(
address from,
address to,
uint256 value
)
```
Event emitted when tokens are transferred from one address to another, either via `#transfer` or `#transferFrom`.

Expand All @@ -113,7 +122,11 @@ Event emitted when tokens are transferred from one address to another, either vi
|`value`| uint256 | The amount of tokens that were transferred
### Approval
```solidity
event Approval(address owner, address spender, uint256 value)
event Approval(
address owner,
address spender,
uint256 value
)
```
Event emitted when the approval amount for the spender of a given owner's tokens changes.

Expand Down
28 changes: 20 additions & 8 deletions docs/V3/reference/interfaces/IUniswapV3Factory.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over
### owner
```solidity
function owner(
) external returns (address)
```
Returns the current owner of the factory
Expand All @@ -20,7 +19,6 @@ Can be changed by the current owner via setOwner
### feeAmountTickSpacing
```solidity
function feeAmountTickSpacing(
uint24 fee
) external returns (int24)
```
Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled
Expand All @@ -35,7 +33,6 @@ A fee amount can never bee removed, so this value should be hard coded or cached
### getPool
```solidity
function getPool(
address tokenA, address tokenB, uint24 fee
) external returns (address pool)
```
Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist
Expand All @@ -50,7 +47,9 @@ tokenA and tokenB may be passed in either token0/token1 or token1/token0 order
### createPool
```solidity
function createPool(
address tokenA, address tokenB, uint24 fee
address tokenA,
address tokenB,
uint24 fee
) external returns (address pool)
```
Creates a pool for the given two tokens and fee
Expand Down Expand Up @@ -88,7 +87,8 @@ Must be called by the current owner
### enableFeeAmount
```solidity
function enableFeeAmount(
uint24 fee, int24 tickSpacing
uint24 fee,
int24 tickSpacing
) external
```
Enables a fee amount with the given tickSpacing
Expand All @@ -104,7 +104,10 @@ Fee amounts may never be removed once enabled
## Events
### OwnerChanged
```solidity
event OwnerChanged(address oldOwner, address newOwner)
event OwnerChanged(
address oldOwner,
address newOwner
)
```
Emitted when the owner of the factory is changed

Expand All @@ -116,7 +119,13 @@ Emitted when the owner of the factory is changed
|`newOwner`| address | The owner after the owner was changed
### PoolCreated
```solidity
event PoolCreated(address token0, address token1, uint24 fee, int24 tickSpacing, address pool)
event PoolCreated(
address token0,
address token1,
uint24 fee,
int24 tickSpacing,
address pool
)
```
Emitted when a pool is created

Expand All @@ -131,7 +140,10 @@ Emitted when a pool is created
|`pool`| address | The address of the created pool
### FeeAmountEnabled
```solidity
event FeeAmountEnabled(uint24 fee, int24 tickSpacing)
event FeeAmountEnabled(
uint24 fee,
int24 tickSpacing
)
```
Emitted when a new fee amount is enabled for pool creation via the factory

Expand Down
1 change: 0 additions & 1 deletion docs/V3/reference/interfaces/IUniswapV3PoolDeployer.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ without storing the entire init code of the pool.
### parameters
```solidity
function parameters(
) external returns (address factory, address token0, address token1, uint24 fee, int24 tickSpacing)
```
Get the parameters to be used in constructing the pool, set transiently during pool creation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ Any contract that calls IUniswapV3PoolActions#flash must implement this interfac
### uniswapV3FlashCallback
```solidity
function uniswapV3FlashCallback(
uint256 fee0, uint256 fee1, bytes data
uint256 fee0,
uint256 fee1,
bytes data
) external
```
Called after transferring tokens to the `msg.sender`, allows the sender to perform any actions and then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ Any contract that calls IUniswapV3PoolActions#mint must implement this interface
### uniswapV3MintCallback
```solidity
function uniswapV3MintCallback(
uint256 amount0Owed, uint256 amount1Owed, bytes data
uint256 amount0Owed,
uint256 amount1Owed,
bytes data
) external
```
Called on `msg.sender` after making updates to a position. Allows the sender to pay the tokens
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ Any contract that calls IUniswapV3PoolActions#swap must implement this interface
### uniswapV3SwapCallback
```solidity
function uniswapV3SwapCallback(
int256 amount0Delta, int256 amount1Delta, bytes data
int256 amount0Delta,
int256 amount1Delta,
bytes data
) external
```
Called on `msg.sender` after performing a swap and transferring any output tokens to the recipient
Expand Down
Loading

0 comments on commit 4dd0a12

Please sign in to comment.