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 pair

    • amountA : A token amount in pool

    • tokenB : B token address in pair

    • amountB : B token amount in pool

    • fee : pool fee rate exchange :

    • exchange : contract address of this pool

    • exid : exchange id

ExchangePos

event ExchangePos(address tokenA, uint amountA, address tokenB, uint amountB);
  • Positive exchange Event

  • parameters

    • tokenA : User input tokenA address

    • amountA : User input tokenA amount

    • tokenB : User get tokenB address

    • amountB : User get tokenB amount

ExchangeNeg

event ExchangePos(address tokenA, uint amountA, address tokenB, uint amountB);
  • Positive exchange Event

  • parameters

    • tokenA : User input tokenA address

    • amountA : User input tokenA amount

    • tokenB : User get tokenB address

    • amountB : User get tokenB amount

Last updated