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

Approval

event Approval(address indexed holder, address indexed spender, uint amount);

ChangeCreateFee

event ChangeCreateFee(uint _createFee);
  • An event to change the Pool Contract Creation Fee when adding a new liquidity pool pair

ChangeTeamWallet

event ChangeTeamWallet(address _teamWallet);
  • Event to change the development team wallet

ClaimTeamAward

event ClaimTeamAward(uint award, uint totalAward);
  • Event to claim the development and stabilization commission

ChangeNextOwner

event ChangeNextOwner(address nextOwner);
  • Event to pre-register new owner

  • owner will be governance smart contract (In Intial period before KSP distributed, DEV team have owner permission)

ChangeOwner

event ChangeOwner(address owner);
  • Event that completes changing the owner

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 ExchangeNeg(address tokenA, uint amountA, address tokenB, uint amountB);
  • Negative exchange Event

  • parameters

    • tokenA : User input tokenA address

    • amountA : User input tokenA amount

    • tokenB : User get tokenB address

    • amountB : User get tokenB amountB

Last updated