Skip to content

Commit

Permalink
Merge pull request #1231 from reserve-protocol/facade-patch
Browse files Browse the repository at this point in the history
Facade patch for individual claimRewards
  • Loading branch information
tbrent authored Dec 5, 2024
2 parents bfc32a0 + 84d2517 commit 342dd00
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
14 changes: 6 additions & 8 deletions contracts/facade/facets/ActFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,16 @@ contract ActFacet is Multicall {
// Reward counts are disjoint with `surpluses` and `canStart`
for (uint256 i = 0; i < reg.erc20s.length; ++i) {
bmRewards[i] = reg.erc20s[i].balanceOf(address(bm));
}
// solhint-disable-next-line no-empty-blocks
try bm.claimRewards() {} catch {} // same between 2.1.0 and 3.0.0
for (uint256 i = 0; i < reg.erc20s.length; ++i) {
bmRewards[i] = reg.erc20s[i].balanceOf(address(bm)) - bmRewards[i];
revTraderRewards[i] = reg.erc20s[i].balanceOf(address(revenueTrader));
}
for (uint256 i = 0; i < reg.erc20s.length; ++i) {
revTraderRewards[i] = reg.erc20s[i].balanceOf(address(revenueTrader));
// solhint-disable-next-line no-empty-blocks
try bm.claimRewardsSingle(reg.erc20s[i]) {} catch {} // same between 2.1.0 and 3.0.0
// solhint-disable-next-line no-empty-blocks
try revenueTrader.claimRewardsSingle(reg.erc20s[i]) {} catch {}
}
// solhint-disable-next-line no-empty-blocks
try revenueTrader.claimRewards() {} catch {} // same between 2.1.0 and 3.0.0
for (uint256 i = 0; i < reg.erc20s.length; ++i) {
bmRewards[i] = reg.erc20s[i].balanceOf(address(bm)) - bmRewards[i];
revTraderRewards[i] =
reg.erc20s[i].balanceOf(address(revenueTrader)) -
revTraderRewards[i];
Expand Down
2 changes: 1 addition & 1 deletion scripts/addresses/1-tmp-deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"tradingLib": "0xa54544C6C36C0d776cc4F04EBB847e0BB3A11ea2",
"facade": "0x9d49b363d492725412bf8350bBb525B7a80a7470",
"facets": {
"actFacet": "0xCAB3D3d0d5544145A6BCB47e58F61368BCcAe2dB",
"actFacet": "0xCa60954E8819827B0C56e1ec313175fE68712d98",
"readFacet": "0x823110a13eB26cB09c4Bb118DBfE4ff5f96D5526",
"maxIssuableFacet": "0x5771d976696AA180Fed276FB6571fE2f41D0b849",
"backingBufferFacet": "0xB555921a031D321687aE8B0569dA7B6da8BCB209",
Expand Down
2 changes: 1 addition & 1 deletion scripts/addresses/42161-tmp-deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"cvxMiningLib": "",
"facade": "0xb48a407e225b4764fD3BCc2a2329fF7745af7e64",
"facets": {
"actFacet": "0xE774CCF1431c3DEe7Fa4c20f67534b61289CAa45",
"actFacet": "0x88CF647f1CE5a83E699157b9D84b5a39266F010D",
"readFacet": "0x15175d35F3d88548B49600B4ee8067253A2e4e66",
"backingBufferFacet": "0x73094D84683d712E02f47eddEfF70A6EDf6D59eD",
"maxIssuableFacet": "0x09108763270A8EB0D0Ca30906FEC49fa0944BFE6",
Expand Down
2 changes: 1 addition & 1 deletion scripts/addresses/8453-tmp-deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"tradingLib": "0x6419fe6cf428150e2d8ed38a3316b1bb468f79a7",
"facade": "0xE41416d8dC94ac1F6d12282d6D46B714F39a87d9",
"facets": {
"actFacet": "0x0eac15B9Fe585432E48Cf175571D75D111861F43",
"actFacet": "0x72Be467048a4D9CbcC599251243f3eD9F46a42f5",
"readFacet": "0x5Af543D6F95a98200Dd770f39A902Fe793BAeB27",
"maxIssuableFacet": "0x63FDcB1E8Ee5C4B64A5c4ce0FB97597917920cb6",
"backingBufferFacet": "0x38c7e9427960E427f6c84b3A096021f47a9Afb82",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"cvxMiningLib": "",
"facade": "0xb48a407e225b4764fD3BCc2a2329fF7745af7e64",
"facets": {
"actFacet": "0xE774CCF1431c3DEe7Fa4c20f67534b61289CAa45",
"actFacet": "0x88CF647f1CE5a83E699157b9D84b5a39266F010D",
"readFacet": "0x15175d35F3d88548B49600B4ee8067253A2e4e66",
"backingBufferFacet": "0x73094D84683d712E02f47eddEfF70A6EDf6D59eD",
"maxIssuableFacet": "0x09108763270A8EB0D0Ca30906FEC49fa0944BFE6",
Expand Down
2 changes: 1 addition & 1 deletion scripts/addresses/base-3.4.0/8453-tmp-deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"tradingLib": "0x6419fe6cf428150e2d8ed38a3316b1bb468f79a7",
"facade": "0xE41416d8dC94ac1F6d12282d6D46B714F39a87d9",
"facets": {
"actFacet": "0x0eac15B9Fe585432E48Cf175571D75D111861F43",
"actFacet": "0x72Be467048a4D9CbcC599251243f3eD9F46a42f5",
"readFacet": "0x5Af543D6F95a98200Dd770f39A902Fe793BAeB27",
"maxIssuableFacet": "0x63FDcB1E8Ee5C4B64A5c4ce0FB97597917920cb6",
"backingBufferFacet": "0x38c7e9427960E427f6c84b3A096021f47a9Afb82",
Expand Down
2 changes: 1 addition & 1 deletion scripts/addresses/mainnet-3.4.0/1-tmp-deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"tradingLib": "0xa54544C6C36C0d776cc4F04EBB847e0BB3A11ea2",
"facade": "0x9d49b363d492725412bf8350bBb525B7a80a7470",
"facets": {
"actFacet": "0xCAB3D3d0d5544145A6BCB47e58F61368BCcAe2dB",
"actFacet": "0xCa60954E8819827B0C56e1ec313175fE68712d98",
"readFacet": "0x823110a13eB26cB09c4Bb118DBfE4ff5f96D5526",
"maxIssuableFacet": "0x5771d976696AA180Fed276FB6571fE2f41D0b849",
"backingBufferFacet": "0xB555921a031D321687aE8B0569dA7B6da8BCB209",
Expand Down

0 comments on commit 342dd00

Please sign in to comment.