Factory
The Factory smart contract oversees the full functionality of token pair registration and transactions in KLAYswap. It is also a token contract for KLAYswap's KSP governance token that complies with the KIP7 standard, and a smart contract that implements all functions related to KSP mining.
Code
Github Link: (Will be updated after official launch)
Address
Events, Read-Only Functions, and State-Changing Functions
Events
Transfer
event Transfer(address indexed from, address indexed to, uint amount);
Event for the movement and burning of KSP tokens
A KIP7 Standard Event
Approval
event Approval(address indexed holder, address indexed spender, uint amount);
Event for KSP token approval
A KIP7 Standard Event
ChangeCreateFee
event ChangeCreateFee(uint _createFee);
An event to change the Pool Contract Creation Fee when adding a new liquidity pool pair
CreatePool
event CreatePool(address tokenA, uint amountA, address tokenB, uint amountB, uint fee, address exchange, uint exid);
Event to create new liquidity pool
parameters
tokenA
: A token address in pairamountA
: A token amount in pooltokenB
: B token address in pairamountB
: B token amount in poolfee
: pool fee rate exchange :exchange
: contract address of this poolexid
: exchange id
ExchangePos
event ExchangePos(address tokenA, uint amountA, address tokenB, uint amountB);
Positive exchange Event
parameters
tokenA
: User input tokenA addressamountA
: User input tokenA amounttokenB
: User get tokenB addressamountB
: User get tokenB amount
ExchangeNeg
event ExchangePos(address tokenA, uint amountA, address tokenB, uint amountB);
Positive exchange Event
parameters
tokenA
: User input tokenA addressamountA
: User input tokenA amounttokenB
: User get tokenB addressamountB
: User get tokenB amount
Last updated
Was this helpful?