- Changed ganache version

This commit is contained in:
eboado 2020-06-10 12:31:08 +02:00
parent 84466f11b5
commit 466fa2cafc
4 changed files with 24 additions and 11 deletions

View File

@ -62,7 +62,7 @@ const config: BuidlerConfig = {
url: "https://api-kovan.etherscan.io/api",
apiKey: ETHERSCAN_KEY,
},
defaultNetwork: "buidlerevm",
defaultNetwork: "ganache",
mocha: {
timeout: 0,
},

View File

@ -10,7 +10,7 @@ services:
- ./:/src
ganache:
image: trufflesuite/ganache-cli:next
image: trufflesuite/ganache-cli:latest
ports:
- "8545:8545"
command: [

View File

@ -453,6 +453,20 @@ export const getAaveProtocolTestHelpers = async (
);
};
export const getInterestRateStrategy = async (address?: tEthereumAddress) => {
return await getContract<DefaultReserveInterestRateStrategy>(
eContractid.DefaultReserveInterestRateStrategy,
address ||
(
await getDb()
.get(
`${eContractid.DefaultReserveInterestRateStrategy}.${BRE.network.name}`
)
.value()
).address
);
};
const linkBytecode = (artifact: Artifact, libraries: any) => {
let bytecode = artifact.bytecode;

View File

@ -19,8 +19,7 @@ import {
getLendingPool,
} from "../helpers/contracts-helpers";
import {expect} from "chai";
import {Signer} from "ethers";
import {BigNumber as EthersBigNumber} from "ethers/utils";
import {Signer, ethers} from "ethers";
describe("AToken: Transfer", () => {
let deployer: Signer;
@ -167,13 +166,13 @@ describe("AToken: Transfer", () => {
});
it("User 0 deposits 1 ETH and user tries to borrow, but the aTokens received as a transfer are not available as collateral (revert expected)", async () => {
// console.time("deposit()");
// await _lendingPool
// .connect(users[0])
// .deposit(MOCK_ETH_ADDRESS, oneEther.toFixed(), "0", {
// value: new EthersBigNumber(oneEther.toFixed()),
// });
// console.timeEnd("deposit()");
console.time("deposit()");
await _lendingPool
.connect(users[0])
.deposit(MOCK_ETH_ADDRESS, ethers.utils.parseEther("1.0"), "0", {
value: ethers.utils.parseEther("1.0"),
});
console.timeEnd("deposit()");
// await expectRevert(
// _lendingPoolInstance.borrow(
// ETHEREUM_ADDRESS,