IV0Pair
Table of contents
Constructors
Properties
Methods
- burn
- getBlockTimestampLast
- getFactory
- getPrice0CumulativeLast
- getPrice1CumulativeLast
- getReserves
- init
- mint
- skim
- swap
- sync
- token0
- token1
Constructors
constructor
• new IV0Pair(_origin
): IV0Pair
Parameters
Name | Type |
---|---|
_origin | Address |
Returns
Defined in
assembly/interfaces/IV0Pair.ts:22
Properties
_origin
• _origin: Address
Defined in
assembly/interfaces/IV0Pair.ts:20
Methods
burn
▸ burn(to
): Amounts
Burn liquidity tokens. This low-level function should be called from a contract which performs important safety checks.
Parameters
Name | Type | Description |
---|---|---|
to | Address | The address to send the underlying assets to. |
Returns
Amounts
- The amounts of token0 and token1 burned.
Defined in
assembly/interfaces/IV0Pair.ts:51
getBlockTimestampLast
▸ getBlockTimestampLast(): u64
Returns
u64
Defined in
assembly/interfaces/IV0Pair.ts:88
getFactory
▸ getFactory(): IFactory
Returns
Defined in
assembly/interfaces/IV0Pair.ts:84
getPrice0CumulativeLast
▸ getPrice0CumulativeLast(): u256
Returns
u256
Defined in
assembly/interfaces/IV0Pair.ts:94
getPrice1CumulativeLast
▸ getPrice1CumulativeLast(): u256
Returns
u256
Defined in
assembly/interfaces/IV0Pair.ts:100
getReserves
▸ getReserves(): Amounts
Returns
Amounts
Defined in
assembly/interfaces/IV0Pair.ts:106
init
▸ init(tokenA
, tokenB
): StaticArray
<u8
>
Parameters
Name | Type |
---|---|
tokenA | Address |
tokenB | Address |
Returns
StaticArray
<u8
>
Defined in
assembly/interfaces/IV0Pair.ts:26
mint
▸ mint(to
, fee
): u256
Mint liquidity tokens. This low-level function should be called from a contract which performs important safety checks.
Parameters
Name | Type | Description |
---|---|---|
to | Address | The address to mint the liquidity tokens to. |
fee | u64 | The fee to be paid for storage. |
Returns
u256
- The amount of liquidity minted.
Defined in
assembly/interfaces/IV0Pair.ts:39
skim
▸ skim(to
): void
Parameters
Name | Type |
---|---|
to | Address |
Returns
void
Defined in
assembly/interfaces/IV0Pair.ts:113
swap
▸ swap(amount0Out
, amount1Out
, to
, data
): void
Swap tokens on a Uniswap V2-like DEX. This function should be called from a contract which performs important safety checks.
Parameters
Name | Type | Description |
---|---|---|
amount0Out | u256 | The amount of token0 to be sent. |
amount1Out | u256 | The amount of token1 to be sent. |
to | Address | The address to send the tokens to. |
data | StaticArray <u8 > | Additional data to pass to the recipient. |
Returns
void
Defined in
assembly/interfaces/IV0Pair.ts:66
sync
▸ sync(): void
Returns
void
Defined in
assembly/interfaces/IV0Pair.ts:118
token0
▸ token0(): IERC20
Returns
Defined in
assembly/interfaces/IV0Pair.ts:76
token1
▸ token1(): IERC20