Global

Methods

# add(params) → {Promise.<uint256>}

Add/enable new pool, only owner mode

Parameters:
Name Type Description
params Object
token address

Token address as IERC20

allocPoint uint256

Pool allocation point/share distributed to this pool from mining rewards

View Source models/custom/Loophole/Loophole.js, line 140

pid added token pool index

Promise.<uint256>

# addPauser(params) → {Promise.<void>}

Add pauser role to given address.

Parameters:
Name Type Description
params Object
account address

Address to assign pauser role to.

View Source models/Sablier/Sablier.js, line 21

Promise.<void>

# async balanceOf(params) → {Promise.<uint256>}

Returns the available funds for the given stream id and address. Throws if the id does not point to a valid stream.

Parameters:
Name Type Description
params Object
streamId uint256

The id of the stream for which to query the balance.

who address

The address for which to query the balance.

View Source models/Sablier/Sablier.js, line 169

balance The total funds allocated to who as uint256.

Promise.<uint256>

# async blockNumber() → {Promise.<uint256>}

Get block number

View Source utils/ETHUtils.js, line 55

Promise.<uint256>

# async blockNumberAndTimestamp() → {Promise.<uint256, uint256>}

Get block number and timestamp

View Source utils/ETHUtils.js, line 63

Promise.<uint256, uint256>

# async blockTimestamp() → {Promise.<uint256>}

Get block timestamp

View Source utils/ETHUtils.js, line 46

Promise.<uint256>

# async burn(params) → {Promise.<UniswapV3Pool~burn>}

Parameters:
Name Type Description
params Object
tickLower int24
tickUpper int24
amount uint128

View Source models/Uniswap/UniswapV3Pool.js, line 26

Promise.<UniswapV3Pool~burn>

# cancelStream(params) → {Promise.<bool>}

Cancels the stream and transfers the tokens back on a pro rata basis. Throws if the id does not point to a valid stream. Throws if the caller is not the sender or the recipient of the stream. Throws if there is a token transfer failure.

Parameters:
Name Type Description
params Object
streamId uint256

The id of the stream to cancel.

View Source models/Sablier/Sablier.js, line 364

True if success, otherwise false.

Promise.<bool>

# async collect(params) → {Promise.<UniswapV3Pool~collect>}

Parameters:
Name Type Description
params Object
recipient address
tickLower int24
tickUpper int24
amount0Requested uint128
amount1Requested uint128

View Source models/Uniswap/UniswapV3Pool.js, line 51

Promise.<UniswapV3Pool~collect>

# async collectProtocol(params) → {Promise.<UniswapV3Pool~collectProtocol>}

Parameters:
Name Type Description
params Object
recipient address
amount0Requested uint128
amount1Requested uint128

View Source models/Uniswap/UniswapV3Pool.js, line 76

Promise.<UniswapV3Pool~collectProtocol>

# collectRewards(params) → {Promise.<uint256>}

User collects his share of LP tokens reward

Parameters:
Name Type Description
params Object
pid uint256

Pool id

View Source models/custom/Loophole/Loophole.js, line 228

LP reward tokens amount sent to user address

Promise.<uint256>

# async collectRewardsCall(params) → {Promise.<uint256>}

Parameters:
Name Type Description
params Object
pid uint256

View Source models/custom/Loophole/Loophole.js, line 241

Promise.<uint256>

# async createCompoundingStream(params) → {Promise.<uint256>}

Creates a new compounding stream funded by msg.sender and paid towards recipient. Inherits all security checks from createStream. Throws if the cToken is not whitelisted. Throws if the sender share percentage and the recipient share percentage do not sum up to 100. Throws if the the sender share mantissa calculation has a math error. Throws if the the recipient share mantissa calculation has a math error.

Parameters:
Name Type Description
params Object
recipient address

The address towards which the money is streamed.

deposit uint256

The amount of money to be streamed.

tokenAddress address

The ERC20 token to use as streaming currency.

startTime uint256

The unix timestamp for when the stream starts.

stopTime uint256

The unix timestamp for when the stream stops.

senderSharePercentage uint256

The sender's share of the interest, as a percentage.

recipientSharePercentage uint256

The recipient's share of the interest, as a percentage.

View Source models/Sablier/Sablier.js, line 316

The uint256 id of the newly created compounding stream.

Promise.<uint256>

# createPool(params) → {Promise.<address>}

Parameters:
Name Type Description
params Object
tokenA address
tokenB address
fee uint24

View Source models/Uniswap/UniswapV3Factory.js, line 21

pool

Promise.<address>

# async createStream(params) → {Promise.<uint256>}

Creates a new stream funded by msg.sender and paid towards recipient. Throws if paused. Throws if the recipient is the zero address, the contract itself or the caller. Throws if the deposit is 0. Throws if the start time is before block.timestamp. Throws if the stop time is before the start time. Throws if the duration calculation has a math error. Throws if the deposit is smaller than the duration. Throws if the deposit is not a multiple of the duration. Throws if the rate calculation has a math error. Throws if the next stream id calculation has a math error. Throws if the contract is not allowed to transfer enough tokens. Throws if there is a token transfer failure.

Parameters:
Name Type Description
params Object
recipient address

The address towards which the money is streamed.

deposit uint256

The amount of money to be streamed.

tokenAddress address

The ERC20 token to use as streaming currency.

startTime uint256

The unix timestamp for when the stream starts.

stopTime uint256

The unix timestamp for when the stream stops.

View Source models/Sablier/Sablier.js, line 288

The uint256 id of the newly created stream.

Promise.<uint256>

# async currentStake(params) → {Promise.<uint256>}

Current total user stake in a given pool

Parameters:
Name Type Description
params Object
pid uint256

Pool id

user address

The user address

View Source models/custom/Loophole/Loophole.js, line 270

stake tokens amount

Promise.<uint256>

# async decimals(tokenAddress) → {Promise.<uint8>}

Get token decimals given token address

Parameters:
Name Type Description
tokenAddress address

View Source utils/ETHUtils.js, line 38

Promise.<uint8>

# deltaOf(params) → {Promise.<uint256>}

Returns either the delta in seconds between block.timestamp and startTime or between stopTime and startTime, whichever is smaller. If block.timestampis before startTime`, it returns 0. Throws if the id does not point to a valid stream.

Parameters:
Name Type Description
params Object
streamId uint256

The id of the stream for which to query the delta.

View Source models/Sablier/Sablier.js, line 157

delta The time delta in seconds.

Promise.<uint256>

# async earnings(params) → {Promise.<uint256>}

Percentage of how much a user has earned so far from the other users exit, would be just a statistic

Parameters:
Name Type Description
params Object
pid uint256

Pool id

user address

The user address

View Source models/custom/Loophole/Loophole.js, line 282

earnings percent as integer

Promise.<uint256>

# enableFeeAmount(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
fee uint24
tickSpacing int24

View Source models/Uniswap/UniswapV3Factory.js, line 34

Promise.<void>

# ETHUtils()

View Source models/custom/Loophole/Loophole.js, line 650

ETHUtils|undefined

# exactInput(params) → {Promise.<uint256>}

Parameters:
Name Type Description
params Object
tuple tuple

View Source models/Uniswap/SwapRouter.js, line 44

amountOut

Promise.<uint256>

# exactInputSingle(params) → {Promise.<uint256>}

Parameters:
Name Type Description
params Object
tuple tuple

View Source models/Uniswap/SwapRouter.js, line 56

amountOut

Promise.<uint256>

# exactOutput(params) → {Promise.<uint256>}

Parameters:
Name Type Description
params Object
tuple tuple

View Source models/Uniswap/SwapRouter.js, line 68

amountIn

Promise.<uint256>

# exactOutputSingle(params) → {Promise.<uint256>}

Parameters:
Name Type Description
params Object
tuple tuple

View Source models/Uniswap/SwapRouter.js, line 80

amountIn

Promise.<uint256>

# async exit(params) → {Promise.<uint256>}

User exit staking amount from main pool, require main pool only

Parameters:
Name Type Description
params Object
pid uint256

Pool id

amount uint256

The token amount user wants to exit/unstake from the pool.

amountOutMinimum uint256

The min LP token amount expected to be received from exchange, needed from outside for security reasons, using zero value in production is discouraged.

View Source models/custom/Loophole/Loophole.js, line 187

net tokens amount sent to user address

Promise.<uint256>

# exitLP(params) → {Promise.<uint256>}

User exit staking amount from LOOP pool, require LOOP pool only

Parameters:
Name Type Description
params Object
amount uint256

The token amount user wants to exit/unstake from the pool.

View Source models/custom/Loophole/Loophole.js, line 201

net tokens amount sent to user address

Promise.<uint256>

# async exitPenalty() → {Promise.<uint256>}

View Source models/custom/Loophole/Loophole.js, line 94

Promise.<uint256>

# async exitPenaltyLP() → {Promise.<uint256>}

View Source models/custom/Loophole/Loophole.js, line 103

Promise.<uint256>

# factory() → {Promise.<address>}

View Source models/Uniswap/UniswapV3Pool.js, line 90

Promise.<address>

# fee() → {Promise.<uint24>}

View Source models/Uniswap/UniswapV3Pool.js, line 97

Promise.<uint24>

# feeAmountTickSpacing(params) → {Promise.<int24>}

Parameters:
Name Type Description
params Object
fee uint24

View Source models/Uniswap/UniswapV3Factory.js, line 46

Promise.<int24>

# feeGrowthGlobal0X128() → {Promise.<uint256>}

View Source models/Uniswap/UniswapV3Pool.js, line 104

Promise.<uint256>

# feeGrowthGlobal1X128() → {Promise.<uint256>}

View Source models/Uniswap/UniswapV3Pool.js, line 111

Promise.<uint256>

# flash(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
recipient address
amount0 uint256
amount1 uint256
data bytes

View Source models/Uniswap/UniswapV3Pool.js, line 123

Promise.<void>

# async fromBNToDecimals(amount, pid) → {Promise.<number>}

Convert float number with decimals from UI to tokens amount integer for smart contract function.

Parameters:
Name Type Description
amount number

Tokens float amount to convert

pid number

Pool id

View Source models/custom/Loophole/Loophole.js, line 395

tokensAmount

Promise.<number>

# async fromDecimalsToBN(amount, pid) → {Promise.<number>}

Convert given tokens amount integer to float number with decimals for UI.

Parameters:
Name Type Description
amount number

Tokens amount to convert

pid number

Pool id

View Source models/custom/Loophole/Loophole.js, line 381

tokensAmount

Promise.<number>

# getBlockNumber() → {Promise.<uint256>}

Get current block number

View Source models/custom/Loophole/Loophole.js, line 414

current block number

Promise.<uint256>

# async getBlocksFromRange(params) → {Promise.<uint256>}

Get blocks range given two block numbers, usually computes blocks elapsed since last mining reward block.

Parameters:
Name Type Description
params Object
from uint256

block start

to uint256

block end

View Source models/custom/Loophole/Loophole.js, line 295

blocks count

Promise.<uint256>

# getBlockTimestamp() → {Promise.<uint256>}

Get current block timestamp

View Source models/custom/Loophole/Loophole.js, line 406

current block timestamp

Promise.<uint256>

# async getCompoundingStream(params) → {Promise.<Sablier~getCompoundingStream>}

Returns the compounding stream object with all its properties. Throws if the id does not point to a valid compounding stream.

Parameters:
Name Type Description
params Object
streamId uint256

The id of the compounding stream to query.

View Source models/Sablier/Sablier.js, line 207

The compounding stream object.

Promise.<Sablier~getCompoundingStream>

# async getCurrentEntryStakeUser(params) → {Promise.<uint256>}

Get 'entry stake adjusted' for a given user address in a pool id

Parameters:
Name Type Description
params Object
pid uint256

Pool id

user address

User address

View Source models/custom/Loophole/Loophole.js, line 530

user entry stake adjusted amount in given pool

Promise.<uint256>

# async getEarnings(params) → {Promise.<uint256>}

Returns the amount of interest that has been accrued for the given token address.

Parameters:
Name Type Description
params Object
tokenAddress address

The address of the token to get the earnings for.

View Source models/Sablier/Sablier.js, line 260

The amount of interest as uint256.

Promise.<uint256>

# async getEntryStakeAdjusted(params) → {Promise.<uint256>}

Get 'entry stake adjusted' for a given user address in a pool id

Parameters:
Name Type Description
params Object
pid uint256

Pool id

user address

User address

View Source models/custom/Loophole/Loophole.js, line 562

user entry stake adjusted amount in given pool

Promise.<uint256>

# getFunctionSelector() → {Promise.<bytes4>}

Get function selector from function signature NOTE: function selector is first 4 bytes of keccak256 for bytes of string of a function signature

View Source utils/ETHUtils.js, line 79

Promise.<bytes4>

# async getGasCostOfGetSqrtRatioAtTick(params) → {Promise.<uint256>}

Parameters:
Name Type Description
params Object
tick int24

View Source models/Uniswap/TickMathTest.js, line 37

Promise.<uint256>

# async getGasCostOfGetTickAtSqrtRatio(params) → {Promise.<uint256>}

Parameters:
Name Type Description
params Object
sqrtPriceX96 uint160

View Source models/Uniswap/TickMathTest.js, line 55

Promise.<uint256>

# async getPool(params) → {Promise.<Loophole~PoolInfo>}

Get pool attributes

Parameters:
Name Type Description
params Object
pid uint256

Pool id

View Source models/custom/Loophole/Loophole.js, line 434

Promise.<Loophole~PoolInfo>

# getPoolInfo(params) → {Promise.<Loophole~PoolInfo>}

Get pool attributes, raw with no conversion.

Parameters:
Name Type Description
params Object
pid uint256

View Source models/custom/Loophole/Loophole.js, line 459

Promise.<Loophole~PoolInfo>

# async getPoolReward(params) → {Promise.<uint256>}

Get LP tokens reward for given pool id, only MAIN pool, LOOP pool reward will always be zero

Parameters:
Name Type Description
params Object
pid uint256

Pool id

View Source models/custom/Loophole/Loophole.js, line 355

tokensReward Tokens amount as reward based on last mining block

Promise.<uint256>

# async getPoolTokenDecimals(params) → {Promise.<uint256>}

Get pool token decimals given pool id

Parameters:
Name Type Description
params Object
pid uint256

Pool id

View Source models/custom/Loophole/Loophole.js, line 368

poolTokenDecimals

Promise.<uint256>

# async getSqrtRatioAtTick(params) → {Promise.<uint160>}

Parameters:
Name Type Description
params Object
tick int24

View Source models/Uniswap/TickMathTest.js, line 28

Promise.<uint160>

# async getStream(params) → {Promise.<Sablier~getStream>}

Returns the compounding stream with all its properties. Throws if the id does not point to a valid stream.

Parameters:
Name Type Description
params Object
streamId uint256

The id of the stream to query.

View Source models/Sablier/Sablier.js, line 131

The stream object.

Promise.<Sablier~getStream>

# async getTickAtSqrtRatio(params) → {Promise.<int24>}

Parameters:
Name Type Description
params Object
sqrtPriceX96 uint160

View Source models/Uniswap/TickMathTest.js, line 46

Promise.<int24>

# getTokenDecimalsFromStream(streamId)

Get token decimals given a stream id. This is an utility function for DApp layer when converting to float numbers.

Parameters:
Name Type Description
streamId

The id of the stream.

View Source models/Sablier/Sablier.js, line 376

# async getTotalEntryStakeUser(params) → {Promise.<uint256>}

Get total accumulated 'entry stake' so far for a given user address in a pool id

Parameters:
Name Type Description
params Object
pid uint256

Pool id

user address

User address

View Source models/custom/Loophole/Loophole.js, line 503

user entry stake amount in a given pool

Promise.<uint256>

# async getTotalUnstakeUser(params) → {Promise.<uint256>}

Get total accumulated 'unstake' so far for a given user address in a pool id

Parameters:
Name Type Description
params Object
pid uint256

Pool id

user address

User address

View Source models/custom/Loophole/Loophole.js, line 515

user unstake amount in a given pool

Promise.<uint256>

# async getUserInfo(params) → {Promise.<Loophole~UserInfo>}

Get pool attributes as struct

Parameters:
Name Type Description
params Object
pid uint256

Pool id

user address

User address

View Source models/custom/Loophole/Loophole.js, line 485

Promise.<Loophole~UserInfo>

# async getUserReward(params) → {Promise.<uint256>}

View pending LP token rewards for user

Parameters:
Name Type Description
params Object
pid uint256

Pool id of main pool

user address

User address to check pending rewards for

View Source models/custom/Loophole/Loophole.js, line 217

Pending LP token rewards for user

Promise.<uint256>

# increaseObservationCardinalityNext(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
observationCardinalityNext uint16

View Source models/Uniswap/UniswapV3Pool.js, line 137

Promise.<void>

# initialize(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
sqrtPriceX96 uint160

View Source models/Uniswap/UniswapV3Pool.js, line 149

Promise.<void>

# async interestOf(params) → {Promise.<Sablier~interestOf>}

Computes the interest accrued while the money has been streamed. Returns (0, 0, 0) if the stream is either not a compounding stream or it does not exist. Throws if there is a math error. We do not assert the calculations which involve the current exchange rate, because we can't know what value we'll get back from the cToken contract.

Parameters:
Name Type Description
params Object
streamId uint256

The id of the compounding stream for which to calculate the interest.

amount uint256

The amount of money with respect to which to calculate the interest.

View Source models/Sablier/Sablier.js, line 243

The interest accrued by the sender, the recipient and sablier, respectively, as uint256s.

Promise.<Sablier~interestOf>

# isCompoundingStream(params) → {Promise.<bool>}

Checks if the provided id points to a valid compounding stream.

Parameters:
Name Type Description
params Object
streamId uint256

The id of the compounding stream to check.

View Source models/Sablier/Sablier.js, line 181

True if it is a compounding stream, otherwise false.

Promise.<bool>

# isLoopPoolId(pid) → {Boolean}

Returns true if given pis is a LOOP pool id, false otherwise.

Parameters:
Name Type Description
pid uint256

Pool id

View Source models/custom/Loophole/Loophole.js, line 551

Boolean

# isPauser(params) → {Promise.<bool>}

Check if the given address has pauser role.

Parameters:
Name Type Description
params Object
account address

Address to check.

View Source models/Sablier/Sablier.js, line 56

Promise.<bool>

# liquidity() → {Promise.<uint128>}

View Source models/Uniswap/UniswapV3Pool.js, line 159

Promise.<uint128>

# async lpToken() → {Promise.<address>}

View Source models/custom/Loophole/Loophole.js, line 54

Promise.<address>

# LPTokenContract()

View Source models/custom/Loophole/Loophole.js, line 642

LPTokenContract|undefined

# async lpTokensPerBlock() → {Promise.<uint256>}

View Source models/custom/Loophole/Loophole.js, line 62

Promise.<uint256>

# massUpdatePools() → {Promise.<void>}

Update all pools for mining rewards

View Source models/custom/Loophole/Loophole.js, line 305

Promise.<void>

# async MAX_SQRT_RATIO() → {Promise.<uint160>}

View Source models/Uniswap/TickMathTest.js, line 69

Promise.<uint160>

# maxLiquidityPerTick() → {Promise.<uint128>}

View Source models/Uniswap/UniswapV3Pool.js, line 166

Promise.<uint128>

# async MIN_SQRT_RATIO() → {Promise.<uint160>}

View Source models/Uniswap/TickMathTest.js, line 62

Promise.<uint160>

# async mint(params) → {Promise.<UniswapV3Pool~mint>}

Parameters:
Name Type Description
params Object
recipient address
tickLower int24
tickUpper int24
amount uint128
data bytes

View Source models/Uniswap/UniswapV3Pool.js, line 184

Promise.<UniswapV3Pool~mint>

# multicall(data) → {Promise.<Array.<bytes>>}

Parameters:
Name Type Description
data Array.<bytes>

View Source models/Uniswap/SwapRouter.js, line 99

results

Promise.<Array.<bytes>>

# name(tokenAddress) → {Promise.<string>}

Get token name given token address

Parameters:
Name Type Description
tokenAddress address

View Source utils/ETHUtils.js, line 20

Promise.<string>

# nextStreamId() → {Promise.<uint256>}

Counter for new stream ids.

View Source models/Sablier/Sablier.js, line 64

Promise.<uint256>

# observe(params) → {Promise.<UniswapV3Pool~observe>}

Parameters:
Name Type Description
params Object
secondsAgos Array.<uint32>

View Source models/Uniswap/UniswapV3Pool.js, line 222

Promise.<UniswapV3Pool~observe>

# owner() → {Promise.<address>}

View Source models/Uniswap/UniswapV3Factory.js, line 64

Promise.<address>

# async parameters() → {Promise.<UniswapV3Factory~parameters>}

View Source models/Uniswap/UniswapV3Factory.js, line 79

Promise.<UniswapV3Factory~parameters>

# pause() → {Promise.<void>}

Pause contract.

View Source models/Sablier/Sablier.js, line 32

Promise.<void>

# poolExists(address) → {Promise.<bool>}

Parameters:
Name Type Description
address address

View Source models/custom/Loophole/Loophole.js, line 72

Promise.<bool>

# poolFee() → {Promise.<uint24>}

View Source models/custom/Loophole/Loophole.js, line 79

Promise.<uint24>

# poolsCount() → {Promise.<uint256>}

Get pools array length

View Source models/custom/Loophole/Loophole.js, line 467

pools count

Promise.<uint256>

# async protocolFees() → {Promise.<UniswapV3Pool~protocolFees>}

View Source models/Uniswap/UniswapV3Pool.js, line 253

Promise.<UniswapV3Pool~protocolFees>

# refundETH() → {Promise.<void>}

View Source models/Uniswap/SwapRouter.js, line 109

Promise.<void>

# selfPermit(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
token address
value uint256
deadline uint256
v uint8
r bytes32
s bytes32

View Source models/Uniswap/SwapRouter.js, line 126

Promise.<void>

# selfPermitAllowed(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
token address
nonce uint256
expiry uint256
v uint8
r bytes32
s bytes32

View Source models/Uniswap/SwapRouter.js, line 145

Promise.<void>

# selfPermitAllowedIfNecessary(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
token address
nonce uint256
expiry uint256
v uint8
r bytes32
s bytes32

View Source models/Uniswap/SwapRouter.js, line 164

Promise.<void>

# selfPermitIfNecessary(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
token address
value uint256
deadline uint256
v uint8
r bytes32
s bytes32

View Source models/Uniswap/SwapRouter.js, line 183

Promise.<void>

# set(params) → {Promise.<void>}

Update pool allocation point/share

Parameters:
Name Type Description
params Object
pid uint256

Pool id

allocPoint uint256

Set allocation point/share for pool id

withUpdate bool

Update all pools and distribute mining reward for all

View Source models/custom/Loophole/Loophole.js, line 156

Promise.<void>

# setFeeProtocol(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
feeProtocol0 uint8
feeProtocol1 uint8

View Source models/Uniswap/UniswapV3Pool.js, line 267

Promise.<void>

# setOwner(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
owner address

View Source models/Uniswap/UniswapV3Factory.js, line 95

Promise.<void>

# async slot0() → {Promise.<UniswapV3Pool~slot0>}

View Source models/Uniswap/UniswapV3Pool.js, line 287

Promise.<UniswapV3Pool~slot0>

# async snapshotCumulativesInside(params) → {Promise.<UniswapV3Pool~snapshotCumulativesInside>}

Parameters:
Name Type Description
params Object
tickLower int24
tickUpper int24

View Source models/Uniswap/UniswapV3Pool.js, line 312

Promise.<UniswapV3Pool~snapshotCumulativesInside>

# async stake(params) → {Promise.<void>}

Stake tokens on given pool id

Parameters:
Name Type Description
params Object
pid uint256

Pool id

amount uint256

The token amount user wants to stake to the pool.

View Source models/custom/Loophole/Loophole.js, line 170

Promise.<void>

# startBlock() → {Promise.<uint256>}

View Source models/custom/Loophole/Loophole.js, line 87

Promise.<uint256>

# async swap(params) → {Promise.<UniswapV3Pool~swap>}

Parameters:
Name Type Description
params Object
recipient address
zeroForOne bool
amountSpecified int256
sqrtPriceLimitX96 uint160
data bytes

View Source models/Uniswap/UniswapV3Pool.js, line 338

Promise.<UniswapV3Pool~swap>

# swap0ForExact1(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
pool address
amount1Out uint256
recipient address
sqrtPriceLimitX96 uint160

View Source models/Uniswap/TestUniswapV3Callee.js, line 39

Promise.<void>

# swap1ForExact0(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
pool address
amount0Out uint256
recipient address
sqrtPriceLimitX96 uint160

View Source models/Uniswap/TestUniswapV3Callee.js, line 73

Promise.<void>

# swapExact0For1(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
pool address
amount0In uint256
recipient address
sqrtPriceLimitX96 uint160

View Source models/Uniswap/TestUniswapV3Callee.js, line 22

Promise.<void>

# swapExact1For0(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
pool address
amount1In uint256
recipient address
sqrtPriceLimitX96 uint160

View Source models/Uniswap/TestUniswapV3Callee.js, line 56

Promise.<void>

# swapExactInputSingleEx(params) → {Promise.<uint256>}

Parameters:
Name Type Description
params Object
tokenIn address
tokenOut address
poolFee uint24
amountIn uint256
amountOutMinimum uint256

View Source models/Uniswap/TestUniswapV3RouterBridge.js, line 44

amountOut

Promise.<uint256>

# swapExactOutputSingleEx(params) → {Promise.<uint256>}

Parameters:
Name Type Description
params Object
tokenIn address
tokenOut address
poolFee uint24
amountOut uint256
amountInMaximum uint256

View Source models/Uniswap/TestUniswapV3RouterBridge.js, line 62

amountIn

Promise.<uint256>

# async swapRouter() → {Promise.<address>}

View Source models/custom/Loophole/Loophole.js, line 112

Promise.<address>

# swapToHigherSqrtPrice(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
pool address
sqrtPriceX96 uint160
recipient address

View Source models/Uniswap/TestUniswapV3Callee.js, line 103

Promise.<void>

# swapToLowerSqrtPrice(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
pool address
sqrtPriceX96 uint160
recipient address

View Source models/Uniswap/TestUniswapV3Callee.js, line 89

Promise.<void>

# sweepToken(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
token address
amountMinimum uint256
recipient address

View Source models/Uniswap/SwapRouter.js, line 199

Promise.<void>

# sweepTokenWithFee(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
token address
amountMinimum uint256
recipient address
feeBips uint256
feeRecipient address

View Source models/Uniswap/SwapRouter.js, line 215

Promise.<void>

# symbol(tokenAddress) → {Promise.<string>}

Get token symbol given token address

Parameters:
Name Type Description
tokenAddress address

View Source utils/ETHUtils.js, line 29

Promise.<string>

# async takeEarnings(params) → {Promise.<void>}

Withdraws the earnings for the given token address. Throws if amount exceeds the available balance.

Parameters:
Name Type Description
params Object
tokenAddress address

The address of the token to withdraw earnings for.

amount uint256

The amount of tokens to withdraw.

View Source models/Sablier/Sablier.js, line 100

Promise.<void>

# async ticks(i) → {Promise.<UniswapV3Pool~ticks>}

Parameters:
Name Type Description
i int24

View Source models/Uniswap/UniswapV3Pool.js, line 381

Promise.<UniswapV3Pool~ticks>

# tickSpacing() → {Promise.<int24>}

View Source models/Uniswap/UniswapV3Pool.js, line 362

Promise.<int24>

# token0() → {Promise.<address>}

View Source models/Uniswap/UniswapV3Pool.js, line 398

Promise.<address>

# token1() → {Promise.<address>}

View Source models/Uniswap/UniswapV3Pool.js, line 405

Promise.<address>

# totalAllocPoint() → {Promise.<uint256>}

View Source models/custom/Loophole/Loophole.js, line 120

Promise.<uint256>

# unpause() → {Promise.<void>}

Unpause/resume contract.

View Source models/Sablier/Sablier.js, line 43

Promise.<void>

# unwrapWETH9(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
amountMinimum uint256
recipient address

View Source models/Uniswap/SwapRouter.js, line 244

Promise.<void>

# unwrapWETH9WithFee(params) → {Promise.<void>}

Parameters:
Name Type Description
params Object
amountMinimum uint256
recipient address
feeBips uint256
feeRecipient address

View Source models/Uniswap/SwapRouter.js, line 259

Promise.<void>

# updateFee(params) → {Promise.<void>}

Updates the Sablier fee. Throws if the caller is not the owner of the contract.

Parameters:
Name Type Description
params Object
feePercentage uint256

The new fee as a percentage, for example 75 means 75%.

View Source models/Sablier/Sablier.js, line 85

Promise.<void>

# updatePool(params) → {Promise.<void>}

Update pool to trigger LP tokens reward since last reward mining block

Parameters:
Name Type Description
params Object
pid uint256

Pool id

View Source models/custom/Loophole/Loophole.js, line 319

Promise.<void>

# async updatePoolCall(params) → {Promise.<uint256>|Promise.<uint256>|Promise.<uint256>}

Update pool to trigger LP tokens reward since last reward mining block, function call for results and no transaction

Parameters:
Name Type Description
params Object
pid uint256

Pool id

View Source models/custom/Loophole/Loophole.js, line 335

blocksElapsed Blocks elapsed since last reward block

Promise.<uint256>

lpTokensReward Amount of LP tokens reward since last reward block

Promise.<uint256>

accLPtokensPerShare Pool accumulated LP tokens per pool token (per share)

Promise.<uint256>

# WETH9() → {Promise.<address>}

View Source models/Uniswap/SwapRouter.js, line 34

Promise.<address>

# async withdrawFromStream(params) → {Promise.<bool>}

Withdraws from the contract to the recipient's account. Throws if the id does not point to a valid stream. Throws if the caller is not the sender or the recipient of the stream. Throws if the amount exceeds the available balance. Throws if there is a token transfer failure.

Parameters:
Name Type Description
params Object
streamId uint256

The id of the stream to withdraw tokens from.

amount uint256

The amount of tokens to withdraw.

View Source models/Sablier/Sablier.js, line 346

True if success, otherwise false.

Promise.<bool>

Type Definitions

provider~Optional

# opt Optional

Connect to Web3 injected in the constructor

View Source Web3Connection.js, line 74