add swap calc helper
This commit is contained in:
@@ -32,6 +32,7 @@ const SmartApprove = require(`${jsonPath2}DODOApprove.json`)
|
||||
const DODOSellHelper = require(`${jsonPath2}DODOSellHelper.json`)
|
||||
const WETH = require(`${jsonPath2}WETH9.json`)
|
||||
const CHI = require(`${jsonPath2}ChiToken.json`)
|
||||
const DODOSwapCalcHelper = require(`${jsonPath2}DODOSwapCalcHelper.json`)
|
||||
/******/
|
||||
|
||||
import { getDefaultWeb3 } from './EVM';
|
||||
@@ -57,6 +58,7 @@ export const SMART_SWAP = "DODOV1Proxy01"
|
||||
export const SMART_APPROVE = "DODOApprove"
|
||||
export const DODO_SELL_HELPER = "DODOSellHelper"
|
||||
export const CHI_TOKEN = "ChiToken"
|
||||
export const DODO_SWAP_CALC_HELPER = "DODOSwapCalcHelper"
|
||||
/******/
|
||||
|
||||
var contractMap: { [name: string]: any } = {}
|
||||
@@ -79,6 +81,7 @@ contractMap[SMART_SWAP] = SmartSwap
|
||||
contractMap[SMART_APPROVE] = SmartApprove
|
||||
contractMap[DODO_SELL_HELPER] = DODOSellHelper
|
||||
contractMap[CHI_TOKEN] = CHI
|
||||
contractMap[DODO_SWAP_CALC_HELPER] = DODOSwapCalcHelper
|
||||
/******/
|
||||
|
||||
interface ContractJson {
|
||||
|
||||
@@ -74,6 +74,8 @@ export class DODOContext {
|
||||
DODOProxyV1: Contract;
|
||||
DODOApprove: Contract;
|
||||
DODOSellHelper: Contract;
|
||||
//Helper
|
||||
DODOSwapCalcHelper: Contract;
|
||||
|
||||
constructor() { }
|
||||
|
||||
@@ -238,6 +240,10 @@ export class DODOContext {
|
||||
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));
|
||||
|
||||
this.DODOSwapCalcHelper = await contracts.newContract(
|
||||
contracts.DODO_SWAP_CALC_HELPER,[this.DODOSellHelper.options.address]
|
||||
);
|
||||
|
||||
console.log(log.blueText("[Init dodo context]"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user