jediswap_v2_factory
Last updated
Last updated
Deploys JediSwap V2 pools and manages ownership and control over protocol fees
Creates a pool for the given two tokens and fee
token_a and token_b may be passed in either order: token0/token1 or token1/token0. tick_spacing is retrieved from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments are invalid.
Emits PoolCreated.
Parameters:
Name | Type | Description |
---|---|---|
Return Values:
Type | Description |
---|---|
Enables a fee amount with the given tick_spacing
Fee amounts may never be removed once enabled
Caller is the owner
Emits FeeAmountEnabled.
Parameters:
Sets the denominator of the protocol's share of the fees
Caller is the owner
Emits SetFeeProtocol.
Parameters:
Transfers ownership of the contract to a new address
Caller it the owner
Emits OwnershipTransferred.
Parameters:
Leaves the contract without the owner. It will not be possible to call the owner only functions anymore. It can only be called by the current owner.
Emits OwnershipTransferred.
Parameters:
Parameters:
Parameters:
Parameters:
Parameters:
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
token_a
ContractAddress
One of the two tokens in the desired pool
token_b
ContractAddress
The other of the two tokens in the desired pool
fee
u32
The desired fee for the pool
ContractAddress
The address of the newly created pool
fee
u32
The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)
tick_spacing
u32
The spacing between ticks to be enforced for all pools created with the given fee amount
fee_protocol
u8
New protocol fee
new_owner
ContractAddress
The new owner of the contract
fee_protocol
u8
New protocol fee
token0
ContractAddress
The first token of the pool by address sort order
token1
ContractAddress
The second token of the pool by address sort order
fee
u32
The fee collected upon every swap in the pool, denominated in hundredths of a bip
tick_spacing
u32
The minimum number of ticks between initialized ticks
pool
ContractAddress
The address of the created pool
fee
u32
The enabled fee, denominated in hundredths of a bip
tick_spacing
u32
The minimum number of ticks between initialized ticks for pools created with the given fee
old_fee_protocol
u8
The previous value of the protocol fee
new_fee_protocol
u8
The updated value of the protocol fee
previous_owner
ContractAddress
The previous owner of the contract
new_owner
ContractAddress
The new owner of the contract. Can be 0 while renouncing.