mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
changed contract name
This commit is contained in:
parent
9b6c759ce8
commit
ac3ef0f071
|
@ -54,6 +54,6 @@ abstract contract ParaswapResolver is Helpers {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contract ConnectV2ParaswapMainnet is ParaswapResolver {
|
contract ConnectV2ParaswapV5 is ParaswapResolver {
|
||||||
string public name = "Paraswap-v1";
|
string public name = "Paraswap-v5";
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,8 @@ import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnable
|
||||||
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner";
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner";
|
||||||
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2";
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2";
|
||||||
import {
|
import {
|
||||||
ConnectV2ParaswapMainnet,
|
ConnectV2ParaswapV5__factory,
|
||||||
ConnectV2ParaswapMainnet__factory,
|
} from "../../../typechain"
|
||||||
} from "../../../typechain";
|
|
||||||
import { parseEther } from "@ethersproject/units";
|
import { parseEther } from "@ethersproject/units";
|
||||||
import { encodeSpells } from "../../../scripts/tests/encodeSpells";
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells";
|
||||||
import { tokens } from "../../../scripts/tests/mainnet/tokens";
|
import { tokens } from "../../../scripts/tests/mainnet/tokens";
|
||||||
|
@ -27,31 +26,28 @@ describe("Paraswap", function() {
|
||||||
const wallets = provider.getWallets();
|
const wallets = provider.getWallets();
|
||||||
const [wallet0, wallet1, wallet2, wallet3] = wallets;
|
const [wallet0, wallet1, wallet2, wallet3] = wallets;
|
||||||
before(async () => {
|
before(async () => {
|
||||||
// await hre.network.provider.request({
|
await hre.network.provider.request({
|
||||||
// method: "hardhat_reset",
|
method: "hardhat_reset",
|
||||||
// params: [
|
params: [
|
||||||
// {
|
{
|
||||||
// forking: {
|
forking: {
|
||||||
// jsonRpcUrl: hre.config.networks.hardhat.forking.url,
|
// @ts-ignore
|
||||||
// blockNumber: 13300000,
|
jsonRpcUrl: hre.config.networks.hardhat.forking.url,
|
||||||
// },
|
// blockNumber: 13300000,
|
||||||
// },
|
},
|
||||||
// ],
|
},
|
||||||
// });
|
],
|
||||||
|
});
|
||||||
masterSigner = await getMasterSigner();
|
masterSigner = await getMasterSigner();
|
||||||
const erc20 = abis.basic.erc20;
|
const erc20 = abis.basic.erc20;
|
||||||
instaConnectorsV2 = await ethers.getContractAt(
|
instaConnectorsV2 = await ethers.getContractAt(
|
||||||
abis.core.connectorsV2,
|
abis.core.connectorsV2,
|
||||||
addresses.core.connectorsV2
|
addresses.core.connectorsV2
|
||||||
);
|
);
|
||||||
const iusdc = await ethers.getContractAt(
|
|
||||||
erc20,
|
|
||||||
"0xc2132D05D31c914a87C6611C10748AEb04B58e8F"
|
|
||||||
);
|
|
||||||
// console.log("instance = ", iusdc);
|
|
||||||
connector = await deployAndEnableConnector({
|
connector = await deployAndEnableConnector({
|
||||||
connectorName,
|
connectorName,
|
||||||
contractArtifact: ConnectV2ParaswapMainnet__factory,
|
contractArtifact: ConnectV2ParaswapV5__factory,
|
||||||
signer: masterSigner,
|
signer: masterSigner,
|
||||||
connectors: instaConnectorsV2,
|
connectors: instaConnectorsV2,
|
||||||
});
|
});
|
||||||
|
@ -126,7 +122,6 @@ describe("Paraswap", function() {
|
||||||
const calldata = await axios
|
const calldata = await axios
|
||||||
.post(url2, txConfig)
|
.post(url2, txConfig)
|
||||||
.then((data) => data.data.data);
|
.then((data) => data.data.data);
|
||||||
// console.log(calldata);
|
|
||||||
|
|
||||||
function caculateUnitAmt(
|
function caculateUnitAmt(
|
||||||
buyAmount: any,
|
buyAmount: any,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user