交換(Exchange)
這是一個擴展Jetton的智能合約,它是用每個流動性對創建的。路由器在請求創建新池時部署它。儘管路由器實際上存儲了一對中的兩個代幣並通過它進行交換,但必須調用交換合約才能提供或獲取流動性。
Code
Github鏈接:(待更新)
Read-Only Functions
Exchange Minter
get_jetton_data
int totalSupply
int mintable
slice admin_address
cell exchange_content
cell exchange_wallet_code
get_lp_swap_data
int swap_fee
int min_amount
slice router_address
slice jettonA_address
slice jettonA_wallet_address
int jettonA_balance
int jettonA_pending_balance
slice jettonB_address
slice jettonB_wallet_address
int jettonB_balance
int jettonB_pending_balance
get_lp_mining_data
int mining_amount
int datetime_amount
int minable_time
int half_life
int last_index
int last_mined
cell mining_rate_cell
get_lp_user_info_dict
cell ( dict ) total_user_info_dict
get_lp_user_info
int find
int balance
int user_reward_sum
int last_user_index
get_wallet_address
slice user_wallet_address
Exchange Wallet
get_wallet_data
int balance
slice owner_address
slice lp_minter_address
cell lp_wallet_code
get_wallet_extra_data
int jettonA_pending_balance
int jettonB_pending_balance
slice jettonA_address
slice jettonB_address
Last updated