Skip to content

Commit

Permalink
fix: refine naming
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Dec 3, 2024
1 parent c7b299f commit d104c57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/GhoDirectMinter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ contract GhoDirectMinter is Initializable, UpgradeableOwnableWithGuardian, IGhoD

// @inheritdoc IGHODirectMinter
function transferExcessToTreasury() external {
(, uint256 capacityUtilization) = IGhoToken(GHO).getFacilitatorBucket(address(this));
uint256 balanceIncrease = IERC20(GHO_A_TOKEN).balanceOf(address(this)) - capacityUtilization;
IERC20(GHO_A_TOKEN).transfer(address(COLLECTOR), balanceIncrease);
(, uint256 level) = IGhoToken(GHO).getFacilitatorBucket(address(this));
uint256 levelExcess = IERC20(GHO_A_TOKEN).balanceOf(address(this)) - level;
IERC20(GHO_A_TOKEN).transfer(address(COLLECTOR), levelExcess);
}
}

4 comments on commit d104c57

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌈 Test Results
No files changed, compilation skipped

Ran 7 tests for test/Lido_GhoDirectMinter.t.sol:Lido_GHODirectMinter_Test
[PASS] test_mintAndSupply_council(uint256) (runs: 256, μ: 277632, ~: 277339)
[PASS] test_mintAndSupply_owner(uint256) (runs: 256, μ: 275387, ~: 275109)
[PASS] test_mintAndSupply_rando() (gas: 18205)
[PASS] test_transferExcessToTreasury() (gas: 864730)
Logs:
  Bound result 1000000000000000000000

[PASS] test_withdrawAndBurn_council(uint256,uint256) (runs: 256, μ: 316255, ~: 316252)
[PASS] test_withdrawAndBurn_owner(uint256,uint256) (runs: 256, μ: 312908, ~: 312917)
[PASS] test_withdrawAndBurn_rando() (gas: 18105)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 981.99ms (1.57s CPU time)

Ran 1 test suite in 984.93ms (981.99ms CPU time): 7 tests passed, 0 failed, 0 skipped (7 total tests)

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔮 Coverage report
File Line Coverage Function Coverage Branch Coverage
src/GhoDirectMinter.sol ${\color{green}100\%}$
$22 / 22$
${\color{green}100\%}$
$5 / 5$
${\color{red}50\%}$
$1 / 2$
src/proposals/LidoGHOListing.sol ${\color{green}100\%}$
$12 / 12$
${\color{red}66.67\%}$
$2 / 3$
LidoGHOListing.newListings
${\color{green}100\%}$
$0 / 0$

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gas report

TransparentUpgradeableProxy

  • size: 0 / 49152
Method min mean median max calls
mintAndSupply(uint256) 31000 222915 260838 263105 6
withdrawAndBurn(uint256) 30933 145716 158229 160364 10

LidoGHOListing

  • size: 11160 / 49152

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 Build logs
Compiling 115 files with Solc 0.8.28
installing solc version "0.8.28"
Successfully installed solc 0.8.28
Solc 0.8.28 finished in 2.59s
Compiler run successful!
| Contract                            | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) |
|-------------------------------------|------------------|-------------------|--------------------|---------------------|
| AaveV3Ethereum                      |               85 |               135 |             24,491 |              49,017 |
| AaveV3EthereumAssets                |               85 |               135 |             24,491 |              49,017 |
| AaveV3EthereumEModes                |               85 |               135 |             24,491 |              49,017 |
| AaveV3EthereumExternalLibraries     |               85 |               135 |             24,491 |              49,017 |
| AaveV3EthereumLido                  |               85 |               135 |             24,491 |              49,017 |
| AaveV3EthereumLidoAssets            |               85 |               135 |             24,491 |              49,017 |
| AaveV3EthereumLidoEModes            |               85 |               135 |             24,491 |              49,017 |
| AaveV3EthereumLidoExternalLibraries |               85 |               135 |             24,491 |              49,017 |
| Address                             |               85 |               135 |             24,491 |              49,017 |
| ChainHelpers                        |               85 |               135 |             24,491 |              49,017 |
| ChainIds                            |               85 |               135 |             24,491 |              49,017 |
| ConfiguratorInputTypes              |               85 |               135 |             24,491 |              49,017 |
| Create2Utils                        |              162 |               212 |             24,414 |              48,940 |
| Create2UtilsZkSync                  |              145 |               195 |             24,431 |              48,957 |
| DataTypes                           |               85 |               135 |             24,491 |              49,017 |
| ERC1967Proxy                        |              163 |               976 |             24,413 |              48,176 |
| ERC1967Utils                        |               85 |               135 |             24,491 |              49,017 |
| EngineFlags                         |               85 |               135 |             24,491 |              49,017 |
| Errors                              |            4,671 |             4,723 |             19,905 |              44,429 |
| GhoDirectMinter                     |            4,555 |             6,026 |             20,021 |              43,126 |
| GovV3Helpers                        |            2,384 |             2,436 |             22,192 |              46,716 |
| GovV3StorageHelpers                 |               85 |               135 |             24,491 |              49,017 |
| GovernanceV3Arbitrum                |               85 |               135 |             24,491 |              49,017 |
| GovernanceV3Avalanche               |               85 |               135 |             24,491 |              49,017 |
| GovernanceV3BNB                     |               85 |               135 |             24,491 |              49,017 |
| GovernanceV3Base                    |               85 |               135 |             24,491 |              49,017 |
| GovernanceV3Ethereum                |               85 |               135 |             24,491 |              49,017 |
| GovernanceV3Gnosis                  |               85 |               135 |             24,491 |              49,017 |
| GovernanceV3Metis                   |               85 |               135 |             24,491 |              49,017 |
| GovernanceV3Optimism                |               85 |               135 |             24,491 |              49,017 |
| GovernanceV3Polygon                 |               85 |               135 |             24,491 |              49,017 |
| GovernanceV3PolygonZkEvm            |               85 |               135 |             24,491 |              49,017 |
| GovernanceV3Scroll                  |               85 |               135 |             24,491 |              49,017 |
| GovernanceV3ZkSync                  |               85 |               135 |             24,491 |              49,017 |
| IpfsUtils                           |               85 |               135 |             24,491 |              49,017 |
| LidoGHOListing                      |           10,950 |            11,128 |             13,626 |              38,024 |
| MiscEthereum                        |               85 |               135 |             24,491 |              49,017 |
| PayloadsControllerUtils             |               85 |               135 |             24,491 |              49,017 |
| ProxyAdmin                          |            1,018 |             1,254 |             23,558 |              47,898 |
| ProxyHelpers                        |               85 |               135 |             24,491 |              49,017 |
| ReserveConfiguration                |              169 |               219 |             24,407 |              48,933 |
| SafeERC20                           |               85 |               135 |             24,491 |              49,017 |
| StorageHelpers                      |               85 |               135 |             24,491 |              49,017 |
| StorageSlot                         |               85 |               135 |             24,491 |              49,017 |
| TestNetChainIds                     |               85 |               135 |             24,491 |              49,017 |
| TransparentUpgradeableProxy         |            1,115 |             2,206 |             23,461 |              46,946 |
| WadRayMath                          |               85 |               135 |             24,491 |              49,017 |

Please sign in to comment.