Factory API

initializeFactory

Smart Contract
Web3
initializeFactory(template: address)
factoryContract.methods.initializeFactory(template).send()

Parameter

Description

template

Ethereum address of exchange template

createExchange

Smart Contract
Web3
createExchange(token: address): address
factoryContract.methods.initializeFactory(token).send()

Parameter

Type

Description

token

address

Ethereum address of an ERC20 token

Returns

address

Ethereum address of a Uniswap exchange

getExchange

Smart Contract
Web3
@constant
getExchange(token: address): address
factoryContract.methods.getExchange(token).call()

Parameter

Type

Description

token

address

Ethereum address of an ERC20 token

Returns

address

Ethereum address of a Uniswap exchange

getToken

Smart Contract
Web3
@constant
getToken(exchange: address): address
factoryContract.methods.getToken(exchange).call()

Parameter

Type

Description

exchange

address

Ethereum address of a Uniswap exchange

Returns

address

Ethereum address of an ERC20 token

getTokenWithId

Smart Contract
Web3
@constant
getTokenWithId(token_id: uint256): address
factoryContract.methods.getToken(exchange).call()

Parameter

Type

Description

token_id

uint256

Uniswap ID for an ERC20 token

Returns

address

Ethereum address of an ERC20 token