- 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", url: "https://api-kovan.etherscan.io/api",
apiKey: ETHERSCAN_KEY, apiKey: ETHERSCAN_KEY,
}, },
defaultNetwork: "buidlerevm", defaultNetwork: "ganache",
mocha: { mocha: {
timeout: 0, timeout: 0,
}, },

View File

@ -10,7 +10,7 @@ services:
- ./:/src - ./:/src
ganache: ganache:
image: trufflesuite/ganache-cli:next image: trufflesuite/ganache-cli:latest
ports: ports:
- "8545:8545" - "8545:8545"
command: [ 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) => { const linkBytecode = (artifact: Artifact, libraries: any) => {
let bytecode = artifact.bytecode; let bytecode = artifact.bytecode;

View File

@ -19,8 +19,7 @@ import {
getLendingPool, getLendingPool,
} from "../helpers/contracts-helpers"; } from "../helpers/contracts-helpers";
import {expect} from "chai"; import {expect} from "chai";
import {Signer} from "ethers"; import {Signer, ethers} from "ethers";
import {BigNumber as EthersBigNumber} from "ethers/utils";
describe("AToken: Transfer", () => { describe("AToken: Transfer", () => {
let deployer: Signer; 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 () => { 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()"); console.time("deposit()");
// await _lendingPool await _lendingPool
// .connect(users[0]) .connect(users[0])
// .deposit(MOCK_ETH_ADDRESS, oneEther.toFixed(), "0", { .deposit(MOCK_ETH_ADDRESS, ethers.utils.parseEther("1.0"), "0", {
// value: new EthersBigNumber(oneEther.toFixed()), value: ethers.utils.parseEther("1.0"),
// }); });
// console.timeEnd("deposit()"); console.timeEnd("deposit()");
// await expectRevert( // await expectRevert(
// _lendingPoolInstance.borrow( // _lendingPoolInstance.borrow(
// ETHEREUM_ADDRESS, // ETHEREUM_ADDRESS,