Skip to content

Commit

Permalink
fix compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brean0 committed Aug 9, 2024
1 parent 202e6d8 commit 1ecee68
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 72 deletions.
3 changes: 3 additions & 0 deletions protocol/contracts/beanstalk/silo/ConvertFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ contract ConvertFacet is Invariable, ReentrancyGuard {
pipeData.grownStalk
);

fromAmount = cp.fromAmount;
toAmount = cp.toAmount;

emit Convert(LibTractor._user(), cp.fromToken, cp.toToken, cp.fromAmount, cp.toAmount);
}
}
2 changes: 1 addition & 1 deletion protocol/lib/forge-std
52 changes: 0 additions & 52 deletions protocol/test/FertUpgradeMainnet.test.js

This file was deleted.

50 changes: 50 additions & 0 deletions protocol/test/hardhat/FertUpgradeMainnet.test.js

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

Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
const { BEAN, UNRIPE_BEAN, UNRIPE_LP, BEAN_ETH_WELL, BARN_RAISE_WELL, BEANSTALK, WSTETH } = require("./utils/constants.js");
const {
BEAN,
UNRIPE_BEAN,
UNRIPE_LP,
BEAN_ETH_WELL,
BARN_RAISE_WELL,
BEANSTALK,
WSTETH
} = require("./utils/constants.js");
const { EXTERNAL, INTERNAL } = require("./utils/balances.js");
const { impersonateSigner, impersonateBeanstalkOwner } = require("../utils/signer.js");
const { impersonateSigner, impersonateBeanstalkOwner } = require("../../utils/signer.js");
const { takeSnapshot, revertToSnapshot } = require("./utils/snapshot.js");
const { getBeanstalk } = require("../utils/contracts.js");
const { upgradeWithNewFacets } = require("../scripts/diamond");
const { bipMiscellaneousImprovements } = require("../scripts/bips.js");
const { migrateBeanEthToBeanWSteth } = require("../scripts/beanWstethMigration.js");
const { impersonateWsteth } = require("../scripts/impersonate.js");
const { getBeanstalk } = require("../../utils/contracts.js");
const { upgradeWithNewFacets } = require("../../scripts/diamond");
const { bipMiscellaneousImprovements } = require("../../scripts/bips.js");
const { migrateBeanEthToBeanWSteth } = require("../../scripts/beanWstethMigration.js");
const { impersonateWsteth } = require("../../scripts/impersonate.js");
const { to6, to18 } = require("./utils/helpers.js");
const { mintEth } = require("../utils");
const { mintEth } = require("../../utils");
const { ethers } = require("hardhat");
const { expect } = require("chai");

Expand Down Expand Up @@ -80,10 +88,10 @@ describe("LockedBeansMainnet", function () {
await revertToSnapshot(snapshotId);

// migrate bean eth to bean wsteth:
this.wsteth = await ethers.getContractAt('MockWsteth', WSTETH)
const stethPerToken = await this.wsteth.stEthPerToken()
await impersonateWsteth()
await this.wsteth.setStEthPerToken(stethPerToken)
this.wsteth = await ethers.getContractAt("MockWsteth", WSTETH);
const stethPerToken = await this.wsteth.stEthPerToken();
await impersonateWsteth();
await this.wsteth.setStEthPerToken(stethPerToken);
await migrateBeanEthToBeanWSteth();

// deploy misc. improvements bip:
Expand Down Expand Up @@ -145,10 +153,10 @@ describe("LockedBeansMainnet", function () {
);

// migrate bean eth to bean wsteth:
this.wsteth = await ethers.getContractAt('MockWsteth', WSTETH)
const stethPerToken = await this.wsteth.stEthPerToken()
await impersonateWsteth()
await this.wsteth.setStEthPerToken(stethPerToken)
this.wsteth = await ethers.getContractAt("MockWsteth", WSTETH);
const stethPerToken = await this.wsteth.stEthPerToken();
await impersonateWsteth();
await this.wsteth.setStEthPerToken(stethPerToken);
await migrateBeanEthToBeanWSteth();

// mine blocks + update timestamp for pumps to update:
Expand All @@ -157,7 +165,7 @@ describe("LockedBeansMainnet", function () {
await ethers.provider.send("evm_mine");
}

// call sunrise:
// call sunrise:
await this.beanstalk.sunrise();

for (let i = 0; i < 100; i++) {
Expand Down
4 changes: 2 additions & 2 deletions protocol/test/hardhat/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ module.exports = {
STETH_ETH_CHAINLINK_PRICE_AGGREGATOR: "0x86392dC19c0b719886221c78AB11eb8Cf5c52812",
WSTETH_ETH_UNIV3_01_POOL: "0x109830a1AAaD605BbF02a9dFA7B0B92EC2FB7dAa",
WSTETH: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
BEAN_WSTETH_WELL: "0xa61Ef2313C1eC9c8cf2E1cAC986539d136b1393E", // TODO: Set
BEAN_WSTETH_WELL: "0xBeA0000113B0d182f4064C86B71c315389E4715D", // TODO: Set
BARN_RAISE_TOKEN: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
BARN_RAISE_WELL: "0xa61Ef2313C1eC9c8cf2E1cAC986539d136b1393E", // TODO: Set
BARN_RAISE_WELL: "0xBeA0000113B0d182f4064C86B71c315389E4715D", // TODO: Set

L2_WETH_ADDRESS: "0xa61Ef2313C1eC9c8cf2E1cAC986539d136b1393E", // TODO: Set
L2_WSTETH_ADDRESS: "0xa61Ef2313C1eC9c8cf2E1cAC986539d136b1393E", // TODO: Set
Expand Down

0 comments on commit 1ecee68

Please sign in to comment.