Megaton Finance
中文(繁體)
中文(繁體)
  • 入门
    • Megaton Finance
    • TON網絡
    • 參與者
  • products
    • WTON網關
    • 交換(Swap)
    • 收益農場(Yield Farm)
  • TOKENOMICS
    • MEGA
      • 代币经济学(至2023年 8月 31日 03:00 UTC)
      • 代币经济学(当前)
      • 分配(至2023年 8月 31日 03:00 UTC)
      • 分配(当前)
  • Guides
    • 創建錢包
    • 如何存入資產
    • 如何通過WTON網關將TON轉換為WTON
    • 如何在Orbit Bridge上獲取跨鏈資產
  • DEVELOPERS
    • 合約
      • MEGA
      • 路由器(Router)
      • 交換(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. 合約

路由器(Router)

路由器合約監督令牌對註冊的全部功能,並支持前端產品交易的所有基本要求。

Code

Github鏈接:(待更新)

Address

  • 主網:EQAxC3GzQBgjlvW6CJAwgaHvarTfVxo8p7Be_6RMSjsPki6s

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_de

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()
});
PreviousMEGANext交換(Exchange)

Last updated 1 year ago