Skip to main content

NevellusFoundry

NevellusFoundry handles rewards for sNVLS holders by trading tokens collected from fees for NVLS.

The full contract can be found here.

Functions​

bridgeFor​

function bridgeFor(address token) public view returns (address bridge)

Checks and returns address for a bridge to use. !!!

Parameters​

NameTypeDescription
tokenaddressaddress of token you wish to check bridge for

setBridge​

function setBridge(address token, address bridge) external onlyOwner

Sets the bridge to use. Can only be called by the owner of the contract. !!!

Parameters​

NameTypeDescription
tokenaddressaddress of token you wish to bridge
bridgeaddressaddress of token bridge you wish to use

_convert​

function _convert(address token0, address token1) internal

Internal function called by convert, which converts tokens to NVLS for sNVLS holders. !!!

Parameters​

NameTypeDescription
token0addressaddress of token you wish to convert
token1addressaddress of token you wish to convert to

convert​

function convert(address token0, address token1) external onlyEOA()

Calls the above internal _convert function to convert tokens to NVLS for sNVLS holders. !!!

Parameters​

NameTypeDescription
token0addressaddress of token you wish to convert
token1addressaddress of token you wish to convert to

convertMultiple​

function convertMultiple(
address[] calldata token0,
address[] calldata token1
) external onlyEOA()

Allows batch conversion of tokens to NVLS for sNVLS holders. !!!

Parameters​

NameTypeDescription
token0address[]array of addresses of tokens you wish to convert
token1address[]array of addresses of tokens you wish to convert to

_convertStep​

 function _convertStep(
address token0,
address token1,
uint256 amount0,
uint256 amount1
) internal returns (uint256 nvlsOut)

Private function that calculates and returns the amount of NVLS to be given after conversion. !!!

Parameters​

NameTypeDescription
token0addressaddress of token you wish to convert
token1addressaddress of token you wish to convert to
amount0uint256amount of token to convert
amount1uint256amount of token to convert

_swap​

function _swap(
address fromToken,
address toToken,
uint256 amountIn,
address to
) internal returns (uint256 amountOut)

Internal function to swap tokens to NVLS for sNVLS holders. !!!

Parameters​

NameTypeDescription
fromTokenaddressaddress of token you wish to convert
toTokenaddressaddress of token you wish to convert to
amountInuint256amount of token to convert
addressToaddressaddress to send converted tokens to

Returns​

NameTypeDescription
amountOutuint256amount of tokens converted

_toNVLS​

function _toNVLS(address token, uint256 amountIn)
internal
returns (uint256 amountOut)

Internal function that converts a given token to NVLS.

Parameters​

NameTypeDescription
tokenaddressaddress of token you wish to convert to NVLS
amountInuint256amount of tokens to convert to NVLS

Returns​

NameTypeDescription
amountOutuint256amount of NVLS converted