FACTORY
Deploying FACTORY contract manually
Entry point methods
FACTORY's entry point methods are detailed below:
create_pair
Creates a pair for token_a
and token_b
if one doesn't exist already.
Note: token_a
and token_b
are interchangeable and require the user to deploy the pair contract before calling the create pair method so that he can pass the Pair contract
hash as a parameter, allowing the Factory contract
to call the initialize
method of thePair Contract
.
Parameters table:
This method returns nothing.
get_pair
Returns the pair's hash for token0
and token1
if it has been created, else “Hash-0000000000000000000000000000000000000000000000000000000000000000” is returned
.
Note: token0
and token1
are interchangeable.
Parameters table:
This method returns a Key.
fee_to
Returns the hash of fee_to
.
Parameters table:
This method returns a Key.
fee_to_setter
Returns the hash of fee_to_setter
.
Parameters table:
This method returns a Key.
all_pairs
Returns a list of all pairs created.
Parameters table:
This method returns a list of Keys.
all_pairs_length
Returns the total number of pairs created through the factory
.
Parameters table:
This method returns a U256.
set_fee_to
Sets the hash of fee_to
Note: Only fee_to_setter
can set fee_to
Parameters table:
This method returns nothing.
set_fee_to_setter
Sets the Hash of fee_to_setter
Note: Only fee_to_setter
can setfee_to_setter
Parameters table:
This method returns nothing.
Last updated