Skip to content

Commit

Permalink
prettier auto formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brean0 authored and github-actions[bot] committed Aug 16, 2024
1 parent 2767e1d commit d795bc4
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 42 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"anvil4tests": "anvil --fork-url https://eth-mainnet.g.alchemy.com/v2/Kk7ktCQL5wz4v4AG8bR2Gun8TAASQ-qi --chain-id 1337 --fork-block-number 18629000"
},
"dependencies": {
"prettier-plugin-solidity": "1.3.1"
"prettier-plugin-solidity": "1.4.0"
}
}
9 changes: 4 additions & 5 deletions protocol/contracts/beanstalk/field/FieldFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,10 @@ contract FieldFacet is Invariable, ReentrancyGuard {
// increasing to `s.weather.t` across the first 25 blocks of the Season.
if (!abovePeg) {
soil = uint256(s.sys.soil);
}
// Above peg: the maximum amount of Pods that Beanstalk is willing to mint
// stays fixed; since {morningTemperature} is scaled down when `delta < 25`, we
// need to scale up the amount of Soil to hold Pods constant.
else {
} else {
// Above peg: the maximum amount of Pods that Beanstalk is willing to mint
// stays fixed; since {morningTemperature} is scaled down when `delta < 25`, we
// need to scale up the amount of Soil to hold Pods constant.
soil = LibDibbler.scaleSoilUp(
uint256(s.sys.soil), // max soil offered this Season, reached when `t >= 25`
uint256(s.sys.weather.temp).mul(LibDibbler.TEMPERATURE_PRECISION), // max temperature
Expand Down
5 changes: 2 additions & 3 deletions protocol/contracts/beanstalk/sun/SeasonFacet/Sun.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ contract Sun is Oracle, Distribution {

setSoilAbovePeg(s.sys.fields[s.sys.activeField].harvestable - priorHarvestable, caseId);
s.sys.season.abovePeg = true;
}
// Below peg
else {
} else {
setSoilBelowPeg(deltaB);
// Below peg
s.sys.season.abovePeg = false;
}
}
Expand Down
4 changes: 1 addition & 3 deletions protocol/contracts/libraries/LibBytes64.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ library LibBytes64 {
for {
let dataPtr := data
let endPtr := add(data, mload(data))
} lt(dataPtr, endPtr) {

} {
} lt(dataPtr, endPtr) {} {
// Advance 3 bytes
dataPtr := add(dataPtr, 3)
let input := mload(dataPtr)
Expand Down
5 changes: 2 additions & 3 deletions protocol/contracts/libraries/LibDibbler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,8 @@ library LibDibbler {
// delta == 0, same block as sunrise
if (delta < 1) {
return TEMPERATURE_PRECISION;
}
// delta == 1
else {
} else {
// delta == 1
return _scaleTemperature(279415312704);
}
}
Expand Down
5 changes: 2 additions & 3 deletions protocol/contracts/libraries/LibReceiving.sol
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,12 @@ library LibReceiving {
// Calculate BPF beyond the first Fertilizer edge.
remainingBpf = (amountToFertilize - deltaFertilized) / s.sys.fert.activeFertilizer;
newBpf = oldBpf + remainingBpf;
}
// Else, if there is no more fertilizer. Matches plan cap.
else {
} else {
s.sys.fert.bpf = uint128(firstBpf); // SafeCast unnecessary here.
s.sys.fert.fertilizedIndex += deltaFertilized;
require(amountToFertilize == deltaFertilized, "Inexact amount of Beans at Barn");
require(s.sys.fert.fertilizedIndex == s.sys.fert.unfertilizedIndex, "Paid != owed");
// Else, if there is no more fertilizer. Matches plan cap.
break;
}
}
Expand Down
5 changes: 2 additions & 3 deletions protocol/contracts/mocks/mockFacets/MockFieldFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ contract MockFieldFacet is FieldFacet {
// delta == 0, same block as sunrise
if (delta < 1) {
return LibDibbler.TEMPERATURE_PRECISION;
}
// delta == 1
else {
} else {
// delta == 1
return _scaleTemperature(279415312704, initalTemp);
}
}
Expand Down
27 changes: 6 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12825,13 +12825,6 @@ __metadata:
languageName: node
linkType: hard

"@solidity-parser/parser@npm:^0.17.0":
version: 0.17.0
resolution: "@solidity-parser/parser@npm:0.17.0"
checksum: 10/76de7d1268de676c101b9a41576c324c0d0b9699e3ba3d846b5e580d6cae454fd7ec088011c316ce18af1b23a1482da88768d30f0e41becfd9da90f692fb9a65
languageName: node
linkType: hard

"@solidity-parser/parser@npm:^0.18.0":
version: 0.18.0
resolution: "@solidity-parser/parser@npm:0.18.0"
Expand Down Expand Up @@ -38248,16 +38241,15 @@ __metadata:
languageName: node
linkType: hard

"prettier-plugin-solidity@npm:1.3.1":
version: 1.3.1
resolution: "prettier-plugin-solidity@npm:1.3.1"
"prettier-plugin-solidity@npm:1.4.0":
version: 1.4.0
resolution: "prettier-plugin-solidity@npm:1.4.0"
dependencies:
"@solidity-parser/parser": "npm:^0.17.0"
"@solidity-parser/parser": "npm:^0.18.0"
semver: "npm:^7.5.4"
solidity-comments-extractor: "npm:^0.0.8"
peerDependencies:
prettier: ">=2.3.0"
checksum: 10/45c1bf16ca960e43e8dc518db95a9eecfce941480e2737272ab259ea9dcb9796a7830a8884de21637f286f80f06d4b4163418d4d55e41347aee96ee93bc4e8f0
checksum: 10/96f6dd0cda6a5c069f6b48281c4df27e1fa28396ab7bdfe59d84e60ca3303d7675365d2a2db3006680cb6ea4d4f1a87d292df7b3fb32deaa9403f653e86f5b46
languageName: node
linkType: hard

Expand Down Expand Up @@ -40723,7 +40715,7 @@ __metadata:
jest-serial-runner: "npm:1.2.1"
lint-staged: "npm:13.3.0"
prettier: "npm:3.3.3"
prettier-plugin-solidity: "npm:1.3.1"
prettier-plugin-solidity: "npm:1.4.0"
ts-jest: "npm:29.1.2"
ts-node: "npm:10.9.2"
typescript: "npm:5.3.3"
Expand Down Expand Up @@ -41702,13 +41694,6 @@ __metadata:
languageName: node
linkType: hard

"solidity-comments-extractor@npm:^0.0.8":
version: 0.0.8
resolution: "solidity-comments-extractor@npm:0.0.8"
checksum: 10/615d53c2e8f5e7a1ad26e4e7e3bdc8b7c7885420611fcd690864bb54a9af2813a93cf30bdede16273791bda16eebc7a4ce1379d458ac2d7834074eb4936dea70
languageName: node
linkType: hard

"solidity-coverage@npm:^0.8.2":
version: 0.8.12
resolution: "solidity-coverage@npm:0.8.12"
Expand Down

0 comments on commit d795bc4

Please sign in to comment.