Megaton Finance
한국어
한국어
  • GETTING STARTED
    • 메가톤 파이낸스
    • TON 네트워크
    • 참여자
    • FAQ
  • products
    • WTON 게이트웨이
    • 스왑
    • 페어 예치
    • MEGA 스테이킹
      • 개요
      • 스테이킹
      • 멤버십 혜택
      • 언스테이킹
      • 중도 해지
      • NFT 거래
  • TOKENOMICS
    • MEGA
      • 토크노믹스(~2023년 8월 31일 12:00 KST)
      • 토크노믹스(현재)
      • 분배(2023년 8월 31일 12:00 KST)
      • 분배(현재)
  • Guides
    • 지갑 생성
    • 활용할 자산 입금하기
    • WTON 게이트웨이 사용하기
    • 오르빗 브릿지 기반 크로스체인 자산 전환하기
    • 자산 예치하기(페어 예치)
  • DEVELOPERS
    • Contract
      • MEGA
      • Router/Factory
      • Exchange
  • MORE
    • 리스크 & 보안
    • 컨트랙트 & 보안 감사
    • 지원 & 팀
  • OFFICIAL LINKS
    • Megaton Finance
    • WTON Gateway
    • Orbit Bridge
    • Discord
Powered by GitBook
On this page
  • Code
  • Address
  • Read-Only Functions
  1. DEVELOPERS
  2. Contract

Router/Factory

The Router contract oversees the full functionality of token pair registration and supports all the basic requirements of a front-end offering trading

Code

Github Link: (Will be updated)

Address

  • Mainnet Router: EQAxC3GzQBgjlvW6CJAwgaHvarTfVxo8p7Be_6RMSjsPki6s

  • Mainnet Factory: EQDp3uMnOuXF2rurDd47BGtGKW88iSNraS8fuP0GElT6G_39

Read-Only Functions

get_address_data

(slice, slice, slice, slice, slice, slice) get_address_data() method_id
  • slice admin_address

  • slice pool_creator_address

  • slice governance_jetton_address

  • slice mining_rate_admin_address

  • slice lp_policy_admin_address

  • slice next_admin_address

get_mining_data

(int, int, int, int, int, int) get_mining_data()
  • int total_mining_amount

  • int total_mining_rate

  • int mining_amount_per_sec

  • int half_life

  • int total_reward

get_lp_data

(int, cell, cell) get_lp_data() method_id
  • int pool_count

  • cell ( dict ) jetton_pair_to_lp

  • cell ( dict ) lp_to_jetton_pair

get_jetton_pair_to_lp_address

(slice, int) get_jetton_pair_to_lp_address(slice jettonA_address, slice jettonB_address) method_id
  • slice lp_address

  • int exist

get_code_data

(cell, cell, cell) get_code_data() method_id
  • cell lp_minter_code

  • cell lp_wallet_code

  • cell mega_wallet_code

get_lp_default_content_data

(cell) get_lp_default_content_data() method_id
  • cell lp_default_content

How to build transaction

  • Swap

await sendInternalMessageWithWallet({
    walletContract,
    secretKey,
    to: userJettonWalletAddress,
    value: toNano(0.4),
    body: beginCell()
        .storeUint(0xf8a7ea5, 32)
        .storeUint(queryId, 64)
        .storeCoins(fromAmount)
        .storeAddress(routerAddress)
        .storeAddress(responseAddress)
        .storeDict(beginCell().endCell())
        .storeCoins(toNano(0.3))
        .storeDict(beginCell()
            .storeAddress(fromJettonAddress)
            .storeAddress(toJettonAddress)
            .storeCoins(minAmount)
        .endCell())
    .endCell()
});
PreviousMEGANextExchange

Last updated 1 year ago