Skip to content

Commit

Permalink
Merge branch 'reseed-testnet-deployment' into pipeline-convert-try-catch
Browse files Browse the repository at this point in the history
  • Loading branch information
Brean0 committed Sep 22, 2024
2 parents d9f6ffc + cd0bed6 commit e4031e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion protocol/contracts/ecosystem/price/WellPrice.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ contract WellPrice {
pool.tokens = [address(wellTokens[0]), address(wellTokens[1])];

uint256[] memory wellBalances = well.getReserves();
pool.balances = [wellBalances[0], wellBalances[1]];
if (wellBalances[0] == 0 || wellBalances[1] == 0) return pool;

uint256 beanIndex = beanstalk.getBeanIndex(wellTokens);
uint256 tknIndex = beanIndex == 0 ? 1 : 0;
Expand Down
9 changes: 4 additions & 5 deletions protocol/contracts/libraries/Minting/LibWellMinting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,10 @@ library LibWellMinting {
lastSnapshot
);

// Set the Well reserves in storage, so that it can be read when
// 1) set the USD price of the non bean token so that it can be read when
// calculating the price of Bean. See {LibEvaluate.evalPrice}.
// 2) When calculating the Bean reward for calling the Season (Bean:Eth Only).
// See {LibIncentive.determineReward}.
// Set the Well reserves in storage, so that it can be read when calculating the
// twa liquidty of the well when calculating the L2SR.
// set the USD price of the non bean token so that it can be read when
// calculating the price of Bean. See {LibEvaluate.evalPrice}.
LibWell.setTwaReservesForWell(well, twaReserves);
LibWell.setUsdTokenPriceForWell(well, ratios);
emit WellOracle(s.sys.season.current, well, deltaB, s.sys.wellOracleSnapshots[well]);
Expand Down
4 changes: 1 addition & 3 deletions protocol/scripts/impersonate.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ async function impersonateContractOnPath(artifactPath, deployAddress) {
}

async function impersonateContract(contractName, deployAddress) {
contract = await (
await ethers.getContractFactory(contractName)
).deploy("0xD1A0060ba708BC4BCD3DA6C37EFa8deDF015FB70");
contract = await await ethers.getContractFactory(contractName);
await contract.deployed();
const bytecode = await ethers.provider.getCode(contract.address);
await network.provider.send("hardhat_setCode", [deployAddress, bytecode]);
Expand Down

0 comments on commit e4031e1

Please sign in to comment.