{"version":3,"sources":["webpack:///./src/assets/abi/egtSwap.js","webpack:///./src/plugins/egtSwap.js","webpack:///./src/plugins/erc.js","webpack:///./src/views/Swap/eth.vue?799c","webpack:///src/views/Swap/eth.vue","webpack:///./src/views/Swap/eth.vue?2dfd","webpack:///./src/views/Swap/eth.vue?9164","webpack:///../../../src/components/VForm/VForm.ts","webpack:///./src/assets/abi/egt.js","webpack:///./src/views/Swap/eth.vue?fc89","webpack:///./src/plugins/egt.js","webpack:///./src/components/inputBlock.vue?60fa","webpack:///src/components/inputBlock.vue","webpack:///./src/components/inputBlock.vue?9cd6","webpack:///./src/components/inputBlock.vue"],"names":["abi","Contract","require","EGTSwap","setProvider","store","state","rpcUrl","this","contract","ABI","EGTSwapAddress","walletAddress","methods","isMember","call","refererAddress","register","extraData","data","encodeABI","sendTransaction","amount","num","numString","toLocaleString","useGrouping","buy","sell","transactionParameters","to","from","window","ethereum","selectedAddress","request","method","params","txHash","Web3","ERC","token","decimals","parseInt","tokenaddress","balanceOf","balance","parseFloat","toFixed","allowance","DefiAddress","EGTAddress","approve","value","providers","HttpProvider","web3","utils","toHex","render","_vm","_h","$createElement","_c","_self","staticClass","attrs","scopedSlots","_u","key","fn","ref","$t","ethBalance","concat","TokenAmountRules","on","$event","swap","$router","push","name","proxy","loadingShow","loadingText","staticRenderFns","mixins","base","egtSwapContract","egtContract","ercContract","timer","components","inputBlock","loading","borderWrapCard","titleBlock","imgBtn","component","VCol","VForm","VRow","provide","form","inheritAttrs","props","disabled","lazyValidation","readonly","Boolean","inputs","watchers","errorBag","watch","handler","errors","Object","deep","immediate","watchInput","watcher","input","val","_uid","valid","shouldValidate","validate","filter","reset","resetErrorBag","setTimeout","resetValidation","unregister","found","find","i","unwatch","h","novalidate","attrs$","submit","e","$slots","EGT","staticStyle","_v","_s","title","mode","rules","model","callback","$$v","text","expression","toUpperCase","balanceRule","darkBg","selectItems","class","inputText","_e","unit","type","String","default","Number","Array","$emit","newVal","mounted","JSON","parse","stringify","VSel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a,SAAnB,sDAGE3C,MAAF,CACIwC,KADJ,SACA,GACMjJ,KAAKgK,MAAM,mBAAoBC,IAEjCT,UAJJ,SAIA,GACMxJ,KAAKiJ,KAAOgB,IAGhBC,QAnFF,WAoFIlK,KAAKiJ,KAAOkB,KAAKC,MAAMD,KAAKE,UAAUrK,KAAKwJ,eCjJqS,I,yDCOhV9D,EAAY,eACd,EACAvC,EACA0B,GACA,EACA,KACA,KACA,MAIa,OAAAa,EAAiB,QAMhC,IAAkBA,EAAW,CAAC4E,UAAA,KAAQC,aAAA","file":"js/chunk-05c6cdbc.f3bc1bfe.js","sourcesContent":["const abi = [\r\n\t{\r\n\t\t'inputs': [],\r\n\t\t'stateMutability': 'nonpayable',\r\n\t\t'type': 'constructor'\r\n\t},\r\n\t{\r\n\t\t'anonymous': false,\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'indexed': true,\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': 'owner',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t'indexed': true,\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': 'spender',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t'indexed': false,\r\n\t\t\t\t'internalType': 'uint256',\r\n\t\t\t\t'name': 'value',\r\n\t\t\t\t'type': 'uint256'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'Approval',\r\n\t\t'type': 'event'\r\n\t},\r\n\t{\r\n\t\t'anonymous': false,\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'indexed': true,\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': 'client',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t'indexed': true,\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': 'referrer',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'Register',\r\n\t\t'type': 'event'\r\n\t},\r\n\t{\r\n\t\t'anonymous': false,\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'indexed': true,\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': 'from',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t'indexed': true,\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': 'to',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t'indexed': false,\r\n\t\t\t\t'internalType': 'uint256',\r\n\t\t\t\t'name': 'value',\r\n\t\t\t\t'type': 'uint256'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'Transfer',\r\n\t\t'type': 'event'\r\n\t},\r\n\t{\r\n\t\t'inputs': [],\r\n\t\t'name': 'agt1',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'contract AGT1',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'view',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': 'owner',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': 'spender',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'allowance',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'uint256',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'uint256'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'view',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': 'spender',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'uint256',\r\n\t\t\t\t'name': 'value',\r\n\t\t\t\t'type': 'uint256'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'approve',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'bool',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'bool'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'nonpayable',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': 'owner',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'balanceOf',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'uint256',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'uint256'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'view',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [],\r\n\t\t'name': 'bsc_eth_token',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'contract ERC20',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'view',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'uint256',\r\n\t\t\t\t'name': 'amount',\r\n\t\t\t\t'type': 'uint256'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'buy',\r\n\t\t'outputs': [],\r\n\t\t'stateMutability': 'nonpayable',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [],\r\n\t\t'name': 'decimals',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'uint8',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'uint8'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'view',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [],\r\n\t\t'name': 'defaultRef',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'view',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'isMember',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'bool',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'bool'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'view',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [],\r\n\t\t'name': 'name',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'string',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'string'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'view',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'ref',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'view',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': '_referrer',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'register',\r\n\t\t'outputs': [],\r\n\t\t'stateMutability': 'nonpayable',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'uint256',\r\n\t\t\t\t'name': 'amount',\r\n\t\t\t\t'type': 'uint256'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'sell',\r\n\t\t'outputs': [],\r\n\t\t'stateMutability': 'nonpayable',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'setbefore',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'bool',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'bool'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'view',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [],\r\n\t\t'name': 'symbol',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'string',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'string'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'view',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [],\r\n\t\t'name': 'totalSupply',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'uint256',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'uint256'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'view',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': 'to',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'uint256',\r\n\t\t\t\t'name': 'value',\r\n\t\t\t\t'type': 'uint256'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'transfer',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'bool',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'bool'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'nonpayable',\r\n\t\t'type': 'function'\r\n\t},\r\n\t{\r\n\t\t'inputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': 'from',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'address',\r\n\t\t\t\t'name': 'to',\r\n\t\t\t\t'type': 'address'\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'uint256',\r\n\t\t\t\t'name': 'value',\r\n\t\t\t\t'type': 'uint256'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'name': 'transferFrom',\r\n\t\t'outputs': [\r\n\t\t\t{\r\n\t\t\t\t'internalType': 'bool',\r\n\t\t\t\t'name': '',\r\n\t\t\t\t'type': 'bool'\r\n\t\t\t}\r\n\t\t],\r\n\t\t'stateMutability': 'nonpayable',\r\n\t\t'type': 'function'\r\n\t}\r\n]\r\n\r\nexport default abi","import ABI from '@/assets/abi/egtSwap.js'\r\nimport store from '../store'\r\nconst Contract = require('web3-eth-contract')\r\n\r\nexport default class EGTSwap {\r\n constructor() {\r\n Contract.setProvider(store.state.rpcUrl)\r\n this.contract = new Contract(ABI, store.state.EGTSwapAddress);\r\n }\r\n\r\n async isMember(walletAddress){\r\n let isMember = await this.contract.methods.isMember(walletAddress).call();\r\n return isMember\r\n }\r\n\r\n async register(refererAddress){\r\n let extraData = await this.contract.methods.register(refererAddress)\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data)\r\n }\r\n\r\n async buy(amount){\r\n const num = amount * 10 ** 18;\r\n const numString = num.toLocaleString('fullwide', {useGrouping:false})\r\n let extraData = await this.contract.methods.buy(numString)\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data)\r\n }\r\n\r\n async sell(amount){\r\n const num = amount * 10 ** 18;\r\n const numString = num.toLocaleString('fullwide', {useGrouping:false})\r\n let extraData = await this.contract.methods.sell(numString)\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data)\r\n }\r\n\r\n async sendTransaction(data){\r\n const transactionParameters = {\r\n to: store.state.EGTSwapAddress,\r\n from: window.ethereum.selectedAddress,\r\n data: data,\r\n };\r\n \r\n try{\r\n let txHash = await window.ethereum.request({\r\n method: 'eth_sendTransaction',\r\n params: [transactionParameters],\r\n })\r\n return {txHash: txHash}\r\n }catch(error){\r\n // console.log('error', error)\r\n return error\r\n }\r\n }\r\n}","// register the plugin on vue\r\nimport ABI from '@/assets/abi/egt.js'\r\nimport store from '../store'\r\nconst Web3 = require(\"web3\")\r\nconst Contract = require('web3-eth-contract')\r\n\r\nexport default class ERC {\r\n constructor(token) {\r\n Contract.setProvider(store.state.rpcUrl)\r\n this.token = token\r\n this.decimals = parseInt(token.decimals)\r\n this.contract = new Contract(ABI, this.token.tokenaddress);\r\n }\r\n\r\n async getBalance(walletAddress) {\r\n let balance = await this.contract.methods.balanceOf(walletAddress).call();\r\n return parseFloat((parseInt(balance) / (10 ** this.decimals)).toFixed(10));\r\n }\r\n\r\n async getAllowance(walletAddress){\r\n let allowance = await this.contract.methods.allowance(walletAddress, store.state.DefiAddress).call();\r\n return parseInt(allowance) / (10 ** this.decimals)\r\n }\r\n\r\n async getEgtAllowance(walletAddress){\r\n let allowance = await this.contract.methods.allowance(walletAddress, store.state.EGTAddress).call();\r\n return parseInt(allowance) / (10 ** 18)\r\n }\r\n\r\n async getOtherAllowance(walletAddress, contract){\r\n let allowance = await this.contract.methods.allowance(walletAddress, contract).call();\r\n return parseInt(allowance) / (10 ** 18)\r\n }\r\n\r\n async isMember(walletAddress){\r\n let isMember = await this.contract.methods.isMember(walletAddress).call();\r\n return isMember\r\n }\r\n\r\n async register(refererAddress){\r\n let extraData = await this.contract.methods.register(refererAddress)\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data)\r\n }\r\n\r\n async buy(amount){\r\n const num = amount * 10 ** 18;\r\n const numString = num.toLocaleString('fullwide', {useGrouping:false})\r\n let extraData = await this.contract.methods.buy()\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data, numString)\r\n }\r\n\r\n async sell(amount){\r\n const num = amount * 10 ** 18;\r\n const numString = num.toLocaleString('fullwide', {useGrouping:false})\r\n let extraData = await this.contract.methods.sell(numString)\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data)\r\n }\r\n\r\n async approve(){\r\n const num = 1000000000 * 10 ** this.decimals;\r\n const numString = num.toLocaleString('fullwide', {useGrouping:false})\r\n\r\n let extraData = await this.contract.methods.approve(store.state.DefiAddress, numString)\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data)\r\n }\r\n\r\n async approveEgt(){\r\n const num = 1000000000 * 10 ** 18;\r\n const numString = num.toLocaleString('fullwide', {useGrouping:false})\r\n\r\n let extraData = await this.contract.methods.approve(store.state.EGTAddress, numString)\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data)\r\n }\r\n\r\n async approveOther(contract){\r\n const num = 1000000000 * 10 ** 18;\r\n const numString = num.toLocaleString('fullwide', {useGrouping:false})\r\n\r\n let extraData = await this.contract.methods.approve(contract, numString)\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data)\r\n }\r\n\r\n async sendTransaction(data, value){\r\n let web3\r\n if (value){\r\n web3 = await new Web3(new Web3.providers.HttpProvider(store.state.rpcUrl))\r\n }\r\n const transactionParameters = {\r\n to: this.token.tokenaddress,\r\n value: value ? web3.utils.toHex(value) : 0,\r\n from: window.ethereum.selectedAddress,\r\n data: data,\r\n };\r\n \r\n try{\r\n let txHash = await window.ethereum.request({\r\n method: 'eth_sendTransaction',\r\n params: [transactionParameters],\r\n })\r\n return {txHash: txHash}\r\n }catch(error){\r\n // console.log('error', error)\r\n return error\r\n }\r\n }\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"defi-swap-eth-page\"},[_c('v-row',{staticClass:\"my-15\",attrs:{\"justify\":\"center\"}},[_c('v-col',{attrs:{\"cols\":\"11\",\"sm\":\"9\"}},[_c('borderWrapCard',{staticClass:\"mb-13\",scopedSlots:_vm._u([{key:\"content\",fn:function(){return [_c('titleBlock',{staticClass:\"mb-7\",attrs:{\"title\":\"ETH / EGT\"}}),_c('v-form',{ref:\"form\",staticClass:\"mb-5 w-100\",attrs:{\"lazy-validation\":\"\"}},[_c('inputBlock',{attrs:{\"title\":\"tokenBalance\",\"mode\":\"onlyText\",\"inputText\":_vm.$t('tokenBalanceAmount', {amount: _vm.ethBalance.toFixed(2).toLocaleString(), token: 'ETH'})}}),_c('inputBlock',{attrs:{\"title\":\"swapAmount\",\"unit\":_vm.$t('piece'),\"mode\":\"balance\",\"token\":'egt',\"inputText\":_vm.amount,\"disabled\":_vm.allowance<_vm.balance,\"balance\":_vm.balance,\"rules\":[].concat( _vm.TokenAmountRules )},on:{\"update:inputText\":function($event){_vm.amount=$event},\"update:input-text\":function($event){_vm.amount=$event}}})],1),(_vm.allowance===0 || _vm.allowance<_vm.balance)?_c('imgBtn',{staticClass:\"mb-3\",attrs:{\"dark\":\"\",\"type\":\"bg-black-sloped\",\"buttonText\":\"approve\"},on:{\"clickBtn\":function($event){return _vm.approve()}}}):_c('imgBtn',{staticClass:\"mb-3\",attrs:{\"dark\":\"\",\"type\":\"bg-black-sloped\",\"buttonText\":\"apply\"},on:{\"clickBtn\":function($event){return _vm.swap()}}}),_c('imgBtn',{staticClass:\"mb-3\",attrs:{\"type\":\"border-black-sloped\",\"buttonText\":\"backToIndex\"},on:{\"clickBtn\":function($event){return _vm.$router.push({name: 'Home'})}}})]},proxy:true}])})],1)],1),_c('loading',{attrs:{\"loadingShow\":_vm.loadingShow,\"content\":_vm.loadingText}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./eth.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./eth.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./eth.vue?vue&type=template&id=389a74e4&scoped=true&\"\nimport script from \"./eth.vue?vue&type=script&lang=js&\"\nexport * from \"./eth.vue?vue&type=script&lang=js&\"\nimport style0 from \"./eth.vue?vue&type=style&index=0&id=389a74e4&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"389a74e4\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VForm } from 'vuetify/lib/components/VForm';\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VCol,VForm,VRow})\n","// Components\nimport VInput from '../VInput/VInput'\n\n// Mixins\nimport mixins from '../../util/mixins'\nimport BindsAttrs from '../../mixins/binds-attrs'\nimport { provide as RegistrableProvide } from '../../mixins/registrable'\n\n// Helpers\nimport { VNode } from 'vue'\n\ntype ErrorBag = Record\ntype VInputInstance = InstanceType\ntype Watchers = {\n _uid: number\n valid: () => void\n shouldValidate: () => void\n}\n\n/* @vue/component */\nexport default mixins(\n BindsAttrs,\n RegistrableProvide('form')\n /* @vue/component */\n).extend({\n name: 'v-form',\n\n provide (): object {\n return { form: this }\n },\n\n inheritAttrs: false,\n\n props: {\n disabled: Boolean,\n lazyValidation: Boolean,\n readonly: Boolean,\n value: Boolean,\n },\n\n data: () => ({\n inputs: [] as VInputInstance[],\n watchers: [] as Watchers[],\n errorBag: {} as ErrorBag,\n }),\n\n watch: {\n errorBag: {\n handler (val) {\n const errors = Object.values(val).includes(true)\n\n this.$emit('input', !errors)\n },\n deep: true,\n immediate: true,\n },\n },\n\n methods: {\n watchInput (input: any): Watchers {\n const watcher = (input: any): (() => void) => {\n return input.$watch('hasError', (val: boolean) => {\n this.$set(this.errorBag, input._uid, val)\n }, { immediate: true })\n }\n\n const watchers: Watchers = {\n _uid: input._uid,\n valid: () => {},\n shouldValidate: () => {},\n }\n\n if (this.lazyValidation) {\n // Only start watching inputs if we need to\n watchers.shouldValidate = input.$watch('shouldValidate', (val: boolean) => {\n if (!val) return\n\n // Only watch if we're not already doing it\n if (this.errorBag.hasOwnProperty(input._uid)) return\n\n watchers.valid = watcher(input)\n })\n } else {\n watchers.valid = watcher(input)\n }\n\n return watchers\n },\n /** @public */\n validate (): boolean {\n return this.inputs.filter(input => !input.validate(true)).length === 0\n },\n /** @public */\n reset (): void {\n this.inputs.forEach(input => input.reset())\n this.resetErrorBag()\n },\n resetErrorBag () {\n if (this.lazyValidation) {\n // Account for timeout in validatable\n setTimeout(() => {\n this.errorBag = {}\n }, 0)\n }\n },\n /** @public */\n resetValidation () {\n this.inputs.forEach(input => input.resetValidation())\n this.resetErrorBag()\n },\n register (input: VInputInstance) {\n this.inputs.push(input)\n this.watchers.push(this.watchInput(input))\n },\n unregister (input: VInputInstance) {\n const found = this.inputs.find(i => i._uid === input._uid)\n\n if (!found) return\n\n const unwatch = this.watchers.find(i => i._uid === found._uid)\n if (unwatch) {\n unwatch.valid()\n unwatch.shouldValidate()\n }\n\n this.watchers = this.watchers.filter(i => i._uid !== found._uid)\n this.inputs = this.inputs.filter(i => i._uid !== found._uid)\n this.$delete(this.errorBag, found._uid)\n },\n },\n\n render (h): VNode {\n return h('form', {\n staticClass: 'v-form',\n attrs: {\n novalidate: true,\n ...this.attrs$,\n },\n on: {\n submit: (e: Event) => this.$emit('submit', e),\n },\n }, this.$slots.default)\n },\n})\n","const abi = [\r\n\t{\r\n\t\t\"inputs\": [],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"nonpayable\",\r\n\t\t\"type\": \"constructor\"\r\n\t},\r\n\t{\r\n\t\t\"anonymous\": false,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"indexed\": true,\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"owner\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"indexed\": true,\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"spender\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"indexed\": false,\r\n\t\t\t\t\"internalType\": \"uint256\",\r\n\t\t\t\t\"name\": \"value\",\r\n\t\t\t\t\"type\": \"uint256\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"Approval\",\r\n\t\t\"type\": \"event\"\r\n\t},\r\n\t{\r\n\t\t\"anonymous\": false,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"indexed\": true,\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"client\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"indexed\": true,\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"referrer\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"Register\",\r\n\t\t\"type\": \"event\"\r\n\t},\r\n\t{\r\n\t\t\"anonymous\": false,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"indexed\": true,\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"from\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"indexed\": true,\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"to\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"indexed\": false,\r\n\t\t\t\t\"internalType\": \"uint256\",\r\n\t\t\t\t\"name\": \"value\",\r\n\t\t\t\t\"type\": \"uint256\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"Transfer\",\r\n\t\t\"type\": \"event\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": true,\r\n\t\t\"inputs\": [],\r\n\t\t\"name\": \"ETH\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"contract ERC20\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"view\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": true,\r\n\t\t\"inputs\": [],\r\n\t\t\"name\": \"GTDAO\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"contract AGT\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"view\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": true,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"owner\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"spender\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"allowance\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"uint256\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"uint256\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"view\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": false,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"spender\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"uint256\",\r\n\t\t\t\t\"name\": \"value\",\r\n\t\t\t\t\"type\": \"uint256\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"approve\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"bool\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"bool\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"nonpayable\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": true,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"owner\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"balanceOf\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"uint256\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"uint256\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"view\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": false,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"uint256\",\r\n\t\t\t\t\"name\": \"amount\",\r\n\t\t\t\t\"type\": \"uint256\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"buy\",\r\n\t\t\"outputs\": [],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"nonpayable\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": true,\r\n\t\t\"inputs\": [],\r\n\t\t\"name\": \"decimals\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"uint8\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"uint8\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"view\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": true,\r\n\t\t\"inputs\": [],\r\n\t\t\"name\": \"defaultRef\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"view\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": true,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"isMember\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"bool\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"bool\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"view\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": true,\r\n\t\t\"inputs\": [],\r\n\t\t\"name\": \"name\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"string\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"string\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"view\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": true,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"ref\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"view\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": false,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"_referrer\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"register\",\r\n\t\t\"outputs\": [],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"nonpayable\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": false,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"uint256\",\r\n\t\t\t\t\"name\": \"amount\",\r\n\t\t\t\t\"type\": \"uint256\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"sell\",\r\n\t\t\"outputs\": [],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"nonpayable\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": false,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"_agt\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"setagt\",\r\n\t\t\"outputs\": [],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"nonpayable\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": true,\r\n\t\t\"inputs\": [],\r\n\t\t\"name\": \"symbol\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"string\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"string\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"view\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": true,\r\n\t\t\"inputs\": [],\r\n\t\t\"name\": \"totalSupply\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"uint256\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"uint256\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"view\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": false,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"to\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"uint256\",\r\n\t\t\t\t\"name\": \"value\",\r\n\t\t\t\t\"type\": \"uint256\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"transfer\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"bool\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"bool\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"nonpayable\",\r\n\t\t\"type\": \"function\"\r\n\t},\r\n\t{\r\n\t\t\"constant\": false,\r\n\t\t\"inputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"from\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"address\",\r\n\t\t\t\t\"name\": \"to\",\r\n\t\t\t\t\"type\": \"address\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"uint256\",\r\n\t\t\t\t\"name\": \"value\",\r\n\t\t\t\t\"type\": \"uint256\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"name\": \"transferFrom\",\r\n\t\t\"outputs\": [\r\n\t\t\t{\r\n\t\t\t\t\"internalType\": \"bool\",\r\n\t\t\t\t\"name\": \"\",\r\n\t\t\t\t\"type\": \"bool\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"payable\": false,\r\n\t\t\"stateMutability\": \"nonpayable\",\r\n\t\t\"type\": \"function\"\r\n\t}\r\n]\r\n\r\nexport default abi","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/sass-resources-loader/lib/loader.js??ref--8-oneOf-1-4!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./eth.vue?vue&type=style&index=0&id=389a74e4&lang=scss&scoped=true&\"","// register the plugin on vue\r\nimport ABI from '@/assets/abi/egt.js'\r\nimport store from '../store'\r\nconst Web3 = require(\"web3\")\r\nconst Contract = require('web3-eth-contract')\r\n\r\nexport default class EGT {\r\n constructor() {\r\n Contract.setProvider(store.state.rpcUrl)\r\n this.contract = new Contract(ABI, store.state.EGTAddress);\r\n // console.log('this.contract', this.contract)\r\n }\r\n\r\n async getBalance(walletAddress) {\r\n let balance = await this.contract.methods.balanceOf(walletAddress).call();\r\n return parseFloat((parseInt(balance) / (10 ** 18)).toFixed(10));\r\n }\r\n\r\n async getAllowance(walletAddress){\r\n let allowance = await this.contract.methods.allowance(walletAddress, store.state.DefiAddress).call();\r\n return parseInt(allowance) / (10 ** 18)\r\n }\r\n\r\n async getOtherAllowance(walletAddress, contract){\r\n let allowance = await this.contract.methods.allowance(walletAddress, contract).call();\r\n return parseInt(allowance) / (10 ** 18)\r\n }\r\n\r\n async isMember(walletAddress){\r\n let isMember = await this.contract.methods.isMember(walletAddress).call();\r\n return isMember\r\n }\r\n\r\n async register(refererAddress){\r\n let extraData = await this.contract.methods.register(refererAddress)\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data)\r\n }\r\n\r\n async buy(amount){\r\n const num = amount * 10 ** 18;\r\n const numString = num.toLocaleString('fullwide', {useGrouping:false})\r\n let extraData = await this.contract.methods.buy(numString)\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data)\r\n }\r\n\r\n async sell(amount){\r\n const num = amount * 10 ** 18;\r\n const numString = num.toLocaleString('fullwide', {useGrouping:false})\r\n let extraData = await this.contract.methods.sell(numString)\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data)\r\n }\r\n\r\n async approve(){\r\n const num = 1000000000 * 10 ** 18;\r\n const numString = num.toLocaleString('fullwide', {useGrouping:false})\r\n // console.log('numString', numString)\r\n\r\n let extraData = await this.contract.methods.approve(store.state.DefiAddress, numString)\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data)\r\n }\r\n\r\n async approveOther(contract){\r\n const num = 1000000000 * 10 ** 18;\r\n const numString = num.toLocaleString('fullwide', {useGrouping:false})\r\n\r\n let extraData = await this.contract.methods.approve(contract, numString)\r\n let data = extraData.encodeABI()\r\n return this.sendTransaction(data)\r\n }\r\n\r\n async sendTransaction(data, value){\r\n let web3\r\n if (value){\r\n web3 = await new Web3(new Web3.providers.HttpProvider(store.state.rpcUrl));\r\n }\r\n const transactionParameters = {\r\n to: store.state.EGTAddress,\r\n value: value ? web3.utils.toHex(value) : 0,\r\n from: window.ethereum.selectedAddress,\r\n data: data,\r\n };\r\n \r\n try{\r\n let txHash = await window.ethereum.request({\r\n method: 'eth_sendTransaction',\r\n params: [transactionParameters],\r\n })\r\n return {txHash: txHash}\r\n }catch(error){\r\n // console.log('error', error)\r\n return error\r\n }\r\n }\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-block d-flex justify-start align-center\"},[_c('div',{staticClass:\"mb-5\",staticStyle:{\"min-width\":\"80px\"}},[_vm._v(_vm._s(_vm.$t(_vm.title)))]),(_vm.mode==='input')?_c('v-text-field',{staticClass:\"mr-4 rounded-0\",attrs:{\"outlined\":\"\",\"dense\":\"\",\"disabled\":_vm.disabled,\"rules\":_vm.rules,\"color\":\"secondary\"},model:{value:(_vm.text),callback:function ($$v) {_vm.text=$$v},expression:\"text\"}}):(_vm.mode==='balance')?_c('v-text-field',{staticClass:\"mr-4 rounded-0\",attrs:{\"outlined\":\"\",\"dense\":\"\",\"persistent-hint\":\"\",\"hint\":(\"Balance: \" + _vm.balance + \" \" + (_vm.token.toUpperCase())),\"color\":\"secondary\",\"disabled\":_vm.disabled,\"rules\":_vm.rules.concat( [_vm.balanceRule])},scopedSlots:_vm._u([{key:\"append\",fn:function(){return [_c('div',{on:{\"click\":function($event){_vm.text=_vm.balance}}},[_vm._v(\"Max\")])]},proxy:true}]),model:{value:(_vm.text),callback:function ($$v) {_vm.text=$$v},expression:\"text\"}}):(_vm.mode==='select')?_c('v-select',{staticClass:\"mr-4 rounded-0\",attrs:{\"outlined\":\"\",\"dense\":\"\",\"dark\":_vm.darkBg,\"items\":_vm.selectItems,\"item-text\":'name',\"item-value\":'value',\"disabled\":_vm.disabled,\"rules\":_vm.rules,\"background-color\":_vm.darkBg ? 'secondary' : 'white',\"color\":\"secondary\",\"item-color\":\"secondary\"},model:{value:(_vm.text),callback:function ($$v) {_vm.text=$$v},expression:\"text\"}}):(_vm.mode==='onlyText')?_c('div',{staticClass:\"mr-4 mb-5 w-100\",class:[_vm.darkBg ? 'secondary white--text' : 'white', (_vm.inputText !== null && _vm.inputText !== '') ? 'py-2' : 'py-4']},[_vm._v(_vm._s(_vm.inputText))]):_vm._e(),_c('div',{staticClass:\"mb-5\",staticStyle:{\"min-width\":\"30px\"}},[_vm._v(_vm._s(_vm.unit))])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./inputBlock.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./inputBlock.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./inputBlock.vue?vue&type=template&id=3349d702&\"\nimport script from \"./inputBlock.vue?vue&type=script&lang=js&\"\nexport * from \"./inputBlock.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VSelect } from 'vuetify/lib/components/VSelect';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VSelect,VTextField})\n"],"sourceRoot":""}