import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/main.css'
import './assets/fonts/font.css'
import walletMgr from './wallet/WalletMgr.js'
import erc20 from './wallet/contract/Erc20'
import address from './wallet/Address'
import uniswapV2Router02 from './wallet/contract/UniswapV2Router02'
import UniswapV2Library from './wallet/contract/UniswapV2Library'



import vueSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
walletMgr.changeWalletType(1,(x)=>{
    console.log(x)
    //erc20.setApprovalForAll(address.address.MMB,"0x6d5B551736D15BD83Edd66a13771929633a241E5",null,null)
    //uniswapV2Router02.addLiquidity("0xd094FE68Ab1196a644A80a2A5687ed42c7B9d2e9","0x563629bA101745864271Bc2cdD6C575Dd68393Fd",1000000,1000000,1000,10000,'0xAf40Bd1870b5A56FE86403acD434A91D7517dBB6',100000000000000,
    // (x)=>{
    //     console.log("fun1:",x);
    // },(x)=>{
    //     console.log("fun2:",x);
    // })
   // walletMgr.addTokensToMetaMask("0x975a6eE5B33CB29B0fF5d5F3CE238f31D19643EE");
    // erc20.isApprovalForAll(address.address.MMB,"0x6d5B551736D15BD83Edd66a13771929633a241E5",(x)=>{
    //     console.log("bool:",x);
    // })
    //uniswapV2Router02.getAmountsOut(1000000,['0xd094FE68Ab1196a644A80a2A5687ed42c7B9d2e9','0x563629bA101745864271Bc2cdD6C575Dd68393Fd']);
    //uniswapV2Router02.getAmountsIn(996999,['0x563629bA101745864271Bc2cdD6C575Dd68393Fd','0xd094FE68Ab1196a644A80a2A5687ed42c7B9d2e9']);
    
    //UniswapV2Library.pairFor('0x563629bA101745864271Bc2cdD6C575Dd68393Fd','0xd094FE68Ab1196a644A80a2A5687ed42c7B9d2e9')
    //UniswapV2Library.getReserves('0x563629bA101745864271Bc2cdD6C575Dd68393Fd','0xd094FE68Ab1196a644A80a2A5687ed42c7B9d2e9')
    // uniswapV2Router02.swapExactTokensForTokens(1000000,1000,['0x563629bA101745864271Bc2cdD6C575Dd68393Fd','0xd094FE68Ab1196a644A80a2A5687ed42c7B9d2e9'],'0x6d5B551736D15BD83Edd66a13771929633a241E5',100000000000000,
    // (x)=>{
    //     console.log("fun1:",x);
    // },(x)=>{
    //     console.log("fun2:",x);
    // })
});


createApp(App).use(store).use(router).use(vueSwiper).mount('#app')
