Skip to content

DexFactoryViews ​

Git Source

Inherits:Variables

Abstract contract providing view functions for DEX factory-related operations

Functions ​

getDexAddress ​

Get the address of a DEX given its ID

solidity
function getDexAddress(uint256 dexId_) public view returns (address dex_);

Parameters

NameTypeDescription
dexId_uint256The ID of the DEX

Returns

NameTypeDescription
dex_addressThe address of the DEX

getDexId ​

Get the ID of a DEX given its address

solidity
function getDexId(address dex_) public view returns (uint256 id_);

Parameters

NameTypeDescription
dex_addressThe address of the DEX

Returns

NameTypeDescription
id_uint256The ID of the DEX

getTotalDexes ​

Get the total number of DEXes

solidity
function getTotalDexes() public view returns (uint256);

Returns

NameTypeDescription
<none>uint256The total number of DEXes

getAllDexAddresses ​

Get an array of all DEX addresses

solidity
function getAllDexAddresses() public view returns (address[] memory dexes_);

Returns

NameTypeDescription
dexes_address[]An array containing all DEX addresses