Chain ID where Vanilla resides
Conservative gas limit to use for Uniswap v2/v3 trades.
Conservative gas limit to use for $VNL token migration
Addresses of deployed Vanilla contracts
The block number of the first Vanilla v1.0 deployment. Used for calculating HTRS
Ethersjs overrides if estimates fail
Vanilla v1.0 hidden tokens. Currently: Ampleforth
A network definition used in ethersjs
Equals USDC from getAllTokens if found, defaultUsdc if not
The Uniswap v3 pool address for checking WETH/USDC price
Latest $VNL token in Vanilla's token format
Decimal points used in $VNL
$VNL pools on Uniswap with the most liquidity
Equals wETH from getAllTokens if found, defaultWeth if not
Adds a reasonable threshold on top of estimated gas limits to guarantee execution
estimated gas limit
gas limit with added threshold in wei
Converts a token from Vanilla token format into Uniswap token format
a Vanilla token
a Uniswap SDK compatible token
Estimates gas for given trade
Vanilla version
A Vanilla trade object
an ethersjs signer(read/write) or provider(readonly)
Buy/Sell
The bought token (Buy) or the sold token (Sell)
Allowed slippage for the trade
Estimated gas limit in wei
Queries the Vanilla router for eligible rewards if given token was sold now and with given price
Vanilla version
token owner address
an ethersjs signer(read/write) or provider(readonly)
The sold token in Vanilla's token format
The received token in Vanilla's token format
Unparsed amount sold as a decimal string
Unparsed amount received as a decimal string
the amount of rewards ($VNL) the trade would result in
Returns the list of tokens available in Vanilla's trade UI based on given Vanilla version.
Vanilla version
A list of tokens in Vanilla's token format.
Returns the ETH balance of given Ethereum address as a BigNumber (wei)
Ethereum address
an ethersjs provider with readonly access
the ETH balance of given Ethereum address in wei as BigNumber
Fetches the $VNL and $ETH balances for given address
Vanilla version
ethereum address
an ethersjs provider (readonly)
addresses $VNL and $ETH balance
Helper function for constructing arbitrary ethersjs contract instances
contract address
The application binary interface of the contract
an ethersjs signer(read/write) or provider(readonly)
a Contract instance with transactional capabilities
Matches a given Uniswap v3 pool fee tier with an enum and returns it
, the default fee tiers of Uniswap v3 pools.
enum FeeAmount.[LOW, MEDIUM, HIGH] | undefined
Get the pricedata struct that contains the average price and block number of a token, together with the owned amount.
Vanilla version
token owner address
an ethersjs signer(read/write) or provider(readonly)
token contract address
Vanilla token data for given owner
Gets user positions with embedded price data in Vanilla's token format
Vanilla version
user address
list of tokens to query in Vanilla's token format
an ethersjs provider (readonly)
tokens with price data
Gets all addresses that have purchased tokens via Vanilla
an ethersjs provider (readonly)
list of addresses that have interacted with Vanilla
Returns an instance of a Vanilla trade router contract based on the Vanilla version.
Version of Vanilla, so that interfacing with legacy tokens is possible.
ethersjs signer(read/write) or provider(readonly).
Vanilla router contract instance with transactional capability
Returns an instance of a $VNL ERC-20 token contract based on the Vanilla version.
Version of Vanilla, so that interfacing with legacy tokens is possible.
ethersjs signer(read/write) or provider(readonly).
ERC-20 token contract instance with transactional capability
Gets a list of $VNL holders
an ethersjs provider (readonly)
list of addresses that hold $VNL
Returns a checksummed version of the given address if it exists, false if the given address is not correct.
an Ethereum address
a checksummed address or false
Pads Uniswap SDK token format into Vanilla token format
a UniSwapToken instance with less info than Vanilla's Token format
a padded token with all required fields of Vanilla token format
Generated using TypeDoc
A trade deadline for submitted trades. 10 minutes by default.