Getters

Git Source

Inherits: Variables

This getters contract has all the custom getter functions for the SimpleSwap contract.

Functions

getCreator

Public getter function to get the address of the contract creator.

function getCreator() public view returns (address creator);

Returns

NameTypeDescription
creatoraddressThe address of the creator.

getVersion

Public getter function to get the contract version.

function getVersion() public pure returns (string memory version);

Returns

NameTypeDescription
versionstringThe contract version.

getBalance

Public getter function to get the balance of the provided identifier.

function getBalance(string memory _identifier) public view returns (uint256 balance);

Parameters

NameTypeDescription
_identifierstringThe identifier for the token address.

Returns

NameTypeDescription
balanceuint256The balance of the specified token identifier.

getEventBlockNumbers

Public getter function to get the block numbers of all the contract events.

function getEventBlockNumbers() public view returns (uint64[] memory eventBlockNumbers);

Returns

NameTypeDescription
eventBlockNumbersuint64[]The array of event block numbers.

getContractAddress

Public getter function to get the contract address for a given identifier.

function getContractAddress(string memory _identifier) public view returns (address contractAddress);

Parameters

NameTypeDescription
_identifierstringThe identifier for the contract address.

Returns

NameTypeDescription
contractAddressaddressThe contract address corresponding to the given identifier.

getTokenAddress

Public getter function to get the token address for a given identifier.

function getTokenAddress(string memory _identifier) public view returns (address tokenAddress);

Parameters

NameTypeDescription
_identifierstringThe identifier for the contract address.

Returns

NameTypeDescription
tokenAddressaddressThe token address corresponding to the given identifier.

getUniswapV3Pool

Public getter function to get the UniswapV3 pool address and fee.

function getUniswapV3Pool(string memory _identifier)
    public
    view
    returns (address uniswapV3PoolAddress, uint24 uniswapV3PoolFee);

Parameters

NameTypeDescription
_identifierstringThe identifier for the UniswapV3 pool.

Returns

NameTypeDescription
uniswapV3PoolAddressaddressThe UniswapV3 pool address.
uniswapV3PoolFeeuint24The UniswapV3 pool fee.

getSlippageTolerance

Getter function to get the Slippage Tolerance.

Public function to allow anyone to view the Slippage Tolerance value.

function getSlippageTolerance() public view returns (uint16 slippageTolerance);

Returns

NameTypeDescription
slippageToleranceuint16The Slippage Tolerance value.

getSlippageToleranceMaximum

Getter function to get the Slippage Tolerance maximum.

Public function to allow anyone to view the Slippage Tolerance maximum value.

function getSlippageToleranceMaximum() public pure returns (uint16 slippageToleranceMaximum);

Returns

NameTypeDescription
slippageToleranceMaximumuint16The Slippage Tolerance maximum value.

getRoleMembers

Public getter function to get all the members of a role.

function getRoleMembers(string memory _roleString) public view returns (address[] memory members);

Parameters

NameTypeDescription
_roleStringstringThe identifier for the role.

Returns

NameTypeDescription
membersaddress[]The array of addresses that are members of the role.