initializeFactory
| Parameter | Description |
|---|---|
| template | Ethereum address of exchange template |
Smart Contract#
initializeFactory(template: address)Web3#
factoryContract.methods.initializeFactory(template).send();createExchange
| Parameter | Type | Description |
|---|---|---|
| token | address | Ethereum address of an ERC20 token |
| Returns | |
|---|---|
| address | Ethereum address of a Uniswap exchange |
Smart Contract#
createExchange(token: address): addressWeb3#
factoryContract.methods.createExchange(token).send();getExchange
| Parameter | Type | Description |
|---|---|---|
| token | address | Ethereum address of an ERC20 token |
| Returns | |
|---|---|
| address | Ethereum address of a Uniswap exchange |
Smart Contract#
@constantgetExchange(token: address): addressfactoryContract.methods.getExchange(token).call();getToken
| Parameter | Type | Description |
|---|---|---|
| exchange | address | Ethereum address of a Uniswap exchange |
| Returns | |
|---|---|
| address | Ethereum address of an ERC20 token |
Smart Contract#
@constantgetToken(exchange: address): addressWeb3#
factoryContract.methods.getToken(exchange).call();getTokenWithId
| Parameter | Type | Description |
|---|---|---|
| token_id | uint256 | Uniswap ID for an ERC20 token |
| Returns | |
|---|---|
| address | Ethereum address of an ERC20 token |
Smart Contract#
@constantgetTokenWithId(token_id: uint256): addressWeb3#
factoryContract.methods.getTokenWithId(token_id).call();