Skip to content

Releases: functionland/fula-chain

v0.1.6

28 Feb 04:07
Compare
Choose a tag to compare

v0.1.5

29 Jan 18:22
Compare
Choose a tag to compare

Full Changelog: v0.1.4...v0.1.5

Fixed remaining concerns for audit:
In [M-02], you have added the GAS_BUFFER of 20_000 gas but it was not used. When the variable isn't used for checking the gas left or anything, it's better to remove it.
Status: Fixed
Solution: removing the unused GAS_BUFFER as the loop was removed and no longer a problem of gas consumption
commit: c7a918f

In [M-03], The Admin can still revokeRole by using renounceRole() function that was inhertied from AccessControl. -- and it doesn't care about adminCount. So fix it accordingly.
Status: Fixed
Solution: Added renounceRole override and checking hte remaining admins
commit: cf2ed2a

In [L-01], The Constructor is still payable -- which means, the Lock contract can be still deployed with some amount of ETH -- either add a function to remove the ETH that was sent during deployment or remove payable keyword (as it doesn't save much gas compared to losing ETH while deployment).
Status: Fixed
Solution: Removed payable
commit: be794de

v0.1.4

27 Jan 23:57
Compare
Choose a tag to compare

Addressed the audit issues
Full Changelog: v0.1.3...v0.1.4

Audit Findings

[H-01] GovernanceModule#_checkExpiredProposal

Status: Fixed

How

  • removed revert ProposalErr(2); and replaced with return false and true in the _checkExpiredProposal
  • Added revert in approveProposal, _executeProposal, and _checkUpgrade
  • Also crated a method cleanupExpiredProposals to clean expired proposals if needed

[H-02] StorageToken#_setPlatformFee

Status: Fixed

How

  • Corrected the corresponding line in _update to uint256 fee = (amount * platformFeeBps) / 10000 instead of /MAX_BPS
  • Kept the MAX_BPS to 500

[M-01] GovernanceModule#_executeProposal: Fixed

How

  • Added proper cleanup to _executeProposal
  // Added cleanup
    delete pendingProposals[proposal.target];
    delete proposals[proposalId];
    if (proposalCount > 0) proposalCount -= 1;
    _removeFromRegistry(proposalId);
    emit ProposalExecuted(proposalId, proposal.proposalType, proposal.target);

[M-02] GovernanceModule#_removeFromRegistry

Status: Fixed

How

  • Added a storage variable for the index which gets updated: proposalIndex and a gas limit GAS_BUFFER
  • Knowing the proposalIndex for hte one we remove, there is no need t oitterate through all proposals now in the _removeFromRegistry

[M-03] Treasury

Status: Fixed

How

  • added a counter for admins _adminCount and custom grantRole and revokeRole to not allow removing last admin

[L-01] Lock#Constructor

Status: Fixed

How

  • prevented receive in the Lock contract

[L-02] TokenDistributionEngine#_removeWallet

Status: Fixed

How

  • Removed unused _removeWallet from TokendistributionEngine.sol

[L-03] GovernanceModule#_checkUpgrade

Status: Fixed

How

  • corrected the assignment to currentProposal.config.status = 1;

Additional Fixes

Status: Fixed

How

  • There was a double reducing of proposalCount which was corrected
  • Added a view method getWalletsInCap
  • changed pendingOwner and hasProposalApproval from public to external

v0.1.3

24 Jan 21:45
Compare
Choose a tag to compare
changed localhost port to default

v0.1.2

22 Jan 01:38
Compare
Choose a tag to compare

Full Changelog: v0.1.1...v0.1.2

v0.1.1

21 Jan 19:13
Compare
Choose a tag to compare

Full Changelog: v0.1.0...v0.1.1