20,000 USDC
View results
Submission Details
Severity: gas

Constructors can be marked payable

Summary

Payable functions cost less gas to execute, since the compiler does not have to add extra checks to ensure that a payment wasn't provided. A constructor can safely be marked as payable, since only the deployer would be able to pass funds, and the project itself would not pass any funds.

Impact

File: Beedle.sol
11: constructor() ERC20("Beedle", "BDL") ERC20Permit("Beedle") Ownable(msg.sender) {
File: Fees.sol
19: constructor(address _weth, address _staking) {
File: Lender.sol
73: constructor() Ownable(msg.sender) {
File: Staking.sol
31: constructor(address _token, address _weth) Ownable(msg.sender) {
File: utils/Ownable.sol
14: constructor(address _owner) {

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.