add gas token && deploy kovan script
This commit is contained in:
@@ -31,6 +31,7 @@ const SmartSwap = require(`${jsonPath2}DODOV1Proxy01.json`)
|
||||
const SmartApprove = require(`${jsonPath2}DODOApprove.json`)
|
||||
const DODOSellHelper = require(`${jsonPath2}DODOSellHelper.json`)
|
||||
const WETH = require(`${jsonPath2}WETH9.json`)
|
||||
const CHI = require(`${jsonPath2}ChiToken.json`)
|
||||
/******/
|
||||
|
||||
import { getDefaultWeb3 } from './EVM';
|
||||
@@ -55,6 +56,7 @@ export const DODO_MINE_READER_NAME = "DODOMineReader"
|
||||
export const SMART_SWAP = "DODOV1Proxy01"
|
||||
export const SMART_APPROVE = "DODOApprove"
|
||||
export const DODO_SELL_HELPER = "DODOSellHelper"
|
||||
export const CHI_TOKEN = "ChiToken"
|
||||
/******/
|
||||
|
||||
var contractMap: { [name: string]: any } = {}
|
||||
@@ -76,6 +78,7 @@ contractMap[DODO_MINE_READER_NAME] = DODOMineReader
|
||||
contractMap[SMART_SWAP] = SmartSwap
|
||||
contractMap[SMART_APPROVE] = SmartApprove
|
||||
contractMap[DODO_SELL_HELPER] = DODOSellHelper
|
||||
contractMap[CHI_TOKEN] = CHI
|
||||
/******/
|
||||
|
||||
interface ContractJson {
|
||||
|
||||
@@ -62,6 +62,8 @@ export class DODOContext {
|
||||
USDT: Contract;
|
||||
USDC: Contract;
|
||||
WETH: Contract;
|
||||
CHI: Contract;
|
||||
GST2: Contract;
|
||||
//pair
|
||||
DODO_USDT: Contract;
|
||||
USDT_USDC: Contract;
|
||||
@@ -220,13 +222,23 @@ export class DODOContext {
|
||||
contracts.SMART_APPROVE
|
||||
);
|
||||
|
||||
//Gas Token
|
||||
this.CHI = await contracts.newContract(
|
||||
contracts.CHI_TOKEN
|
||||
);
|
||||
|
||||
// await this.CHI.methods.mint(140).send(this.sendParam(this.Deployer));
|
||||
|
||||
this.DODOProxyV1 = await contracts.newContract(
|
||||
contracts.SMART_SWAP,
|
||||
[this.DODOApprove.options.address, this.DODOSellHelper.options.address, this.WETH.options.address]
|
||||
[this.DODOApprove.options.address, this.DODOSellHelper.options.address, this.WETH.options.address, this.CHI.options.address]
|
||||
// [this.DODOApprove.options.address, this.DODOSellHelper.options.address, this.WETH.options.address, "0x0000000000000000000000000000000000000000"]
|
||||
);
|
||||
|
||||
await this.DODOApprove.methods.setDODOProxy(this.DODOProxyV1.options.address).send(this.sendParam(this.Deployer));
|
||||
|
||||
// await this.CHI.methods.transfer(this.DODOProxyV1.options.address,140).send(this.sendParam(this.Deployer));
|
||||
|
||||
console.log(log.blueText("[Init dodo context]"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user