dodo route logic fix
This commit is contained in:
@@ -57,7 +57,6 @@ export class DODOContext {
|
||||
lpFeeRate: string;
|
||||
mtFeeRate: string;
|
||||
k: string;
|
||||
|
||||
//token
|
||||
DODO:Contract;
|
||||
USDT:Contract;
|
||||
@@ -73,6 +72,7 @@ export class DODOContext {
|
||||
//SmartRoute
|
||||
SmartSwap: Contract;
|
||||
SmartApprove: Contract;
|
||||
DODOSellHelper: Contract;
|
||||
|
||||
constructor() {}
|
||||
|
||||
@@ -213,13 +213,17 @@ export class DODOContext {
|
||||
.send(this.sendParam(this.Deployer));
|
||||
await this.WETH_USDC.methods.enableTrading().send(this.sendParam(this.Deployer));
|
||||
|
||||
this.DODOSellHelper = await contracts.newContract(
|
||||
contracts.DODO_SELL_HELPER
|
||||
);
|
||||
|
||||
this.SmartApprove = await contracts.newContract(
|
||||
contracts.SMART_APPROVE
|
||||
);
|
||||
|
||||
this.SmartSwap = await contracts.newContract(
|
||||
contracts.SMART_SWAP,
|
||||
[this.SmartApprove.options.address]
|
||||
[this.SmartApprove.options.address,this.DODOSellHelper.options.address]
|
||||
);
|
||||
|
||||
await this.SmartApprove.methods.setSmartSwap(this.SmartSwap.options.address).send(this.sendParam(this.Deployer));
|
||||
|
||||
@@ -30,6 +30,7 @@ const LockedTokenVault = require(`${jsonPath}LockedTokenVault.json`)
|
||||
/*v1.5*/
|
||||
const SmartSwap = require(`${jsonPath2}SmartSwap.json`)
|
||||
const SmartApprove = require(`${jsonPath2}SmartApprove.json`)
|
||||
const DODOSellHelper = require(`${jsonPath2}DODOSellHelper.json`)
|
||||
/******/
|
||||
|
||||
import { getDefaultWeb3 } from './EVM';
|
||||
@@ -53,6 +54,7 @@ export const DODO_MINE_READER_NAME = "DODOMineReader"
|
||||
/*v1.5*/
|
||||
export const SMART_SWAP = "SmartSwap"
|
||||
export const SMART_APPROVE = "SmartApprove"
|
||||
export const DODO_SELL_HELPER = "DODOSellHelper"
|
||||
/******/
|
||||
|
||||
var contractMap: { [name: string]: any } = {}
|
||||
@@ -73,6 +75,7 @@ contractMap[DODO_MINE_READER_NAME] = DODOMineReader
|
||||
/*v1.5*/
|
||||
contractMap[SMART_SWAP] = SmartSwap
|
||||
contractMap[SMART_APPROVE] = SmartApprove
|
||||
contractMap[DODO_SELL_HELPER] = DODOSellHelper
|
||||
/******/
|
||||
|
||||
interface ContractJson {
|
||||
|
||||
Reference in New Issue
Block a user