Getters
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
Name | Type | Description |
---|---|---|
creator | address | The address of the creator. |
getVersion
Public getter function to get the contract version.
function getVersion() public pure returns (string memory version);
Returns
Name | Type | Description |
---|---|---|
version | string | The 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
Name | Type | Description |
---|---|---|
_identifier | string | The identifier for the token address. |
Returns
Name | Type | Description |
---|---|---|
balance | uint256 | The 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
Name | Type | Description |
---|---|---|
eventBlockNumbers | uint64[] | 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
Name | Type | Description |
---|---|---|
_identifier | string | The identifier for the contract address. |
Returns
Name | Type | Description |
---|---|---|
contractAddress | address | The 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
Name | Type | Description |
---|---|---|
_identifier | string | The identifier for the contract address. |
Returns
Name | Type | Description |
---|---|---|
tokenAddress | address | The 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
Name | Type | Description |
---|---|---|
_identifier | string | The identifier for the UniswapV3 pool. |
Returns
Name | Type | Description |
---|---|---|
uniswapV3PoolAddress | address | The UniswapV3 pool address. |
uniswapV3PoolFee | uint24 | The 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
Name | Type | Description |
---|---|---|
slippageTolerance | uint16 | The 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
Name | Type | Description |
---|---|---|
slippageToleranceMaximum | uint16 | The 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
Name | Type | Description |
---|---|---|
_roleString | string | The identifier for the role. |
Returns
Name | Type | Description |
---|---|---|
members | address[] | The array of addresses that are members of the role. |