Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump versions & add task for testnet configurations #43

Merged
merged 6 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions deploy/01-after-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ const func: DeployFunction = async function ({
const poolConfigurator = await getPoolConfiguratorProxy();
await waitForTx(await poolConfigurator.setPoolPause(false));
console.log("- Pool unpaused and accepting deposits.");

await hre.run("disable-faucet-native-testnets");
console.log("- Faucet disabled minting and reserve disabled for borrowing");
miguelmtzinf marked this conversation as resolved.
Show resolved Hide resolved
}

if (process.env.TRANSFER_OWNERSHIP === "true") {
Expand Down
49 changes: 16 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"main": "dist/helpers/index.js",
"devDependencies": {
"@aave/aave-token": "^1.0.4",
"@aave/core-v3": "^1.17.1",
"@aave/periphery-v3": "^1.23.1",
"@aave/core-v3": "^1.19.0",
miguelmtzinf marked this conversation as resolved.
Show resolved Hide resolved
"@aave/periphery-v3": "^2.4.1",
"@aave/safety-module": "^1.0.3",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.5",
"@nomicfoundation/hardhat-toolbox": "^2.0.0",
Expand Down
51 changes: 51 additions & 0 deletions tasks/misc/disable-faucet-native-testnets.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { task } from "hardhat/config";
import {
getFaucet,
getWrappedTokenGateway,
getPoolConfiguratorProxy,
} from "../../helpers/contract-getters";
import { waitForTx } from "../../helpers/utilities/tx";

task(
`disable-faucet-native-testnets`,
`Disables faucet of native tokens and borrowing of native tokens`
).setAction(async ({}, hre) => {
const { deployer } = await hre.getNamedAccounts();
const signer = await hre.ethers.getSigner(deployer);

const faucetContract = await getFaucet();

const wrappedTokenGatewayV3 = await getWrappedTokenGateway();

const getWrappedTokenAddress = await wrappedTokenGatewayV3.getWETHAddress();
miguelmtzinf marked this conversation as resolved.
Show resolved Hide resolved

console.log(
`Faucet contract to disable minting for asset ${getWrappedTokenAddress}`
);

await waitForTx(
await faucetContract
.connect(signer)
.setMintable(getWrappedTokenAddress, false)
);

console.log(
`Faucet contract disabled minting for asset ${getWrappedTokenAddress}`
);

const poolConfiguratorProxyContract = await getPoolConfiguratorProxy();

console.log(
`Update reserve for asset ${getWrappedTokenAddress} to setReserveBorrowing to false`
);

await waitForTx(
await poolConfiguratorProxyContract
.connect(signer)
.setReserveBorrowing(getWrappedTokenAddress, false)
);

console.log(
`Successfully updated reserve for asset ${getWrappedTokenAddress} to setReserveBorrowing to false`
);
});