Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[do not merge] Release 11 vs 12 - just to know how much has changed #11035

Draft
wants to merge 115 commits into
base: release/core-contracts/11
Choose a base branch
from

Commits on Jan 29, 2024

  1. Update Dockerfiles (#10915)

    * Remove references to packages deleted
    
    * Remove circleci dockerfiles and workflow
    
    * Delete reference to patches folder
    jcortejoso authored Jan 29, 2024
    Configuration menu
    Copy the full SHA
    6394a6b View commit details
    Browse the repository at this point in the history
  2. Update workload-id-provider in metadata-crawler-build job (#10916)

    Use `master` workload-id-provider pool
    jcortejoso authored Jan 29, 2024
    Configuration menu
    Copy the full SHA
    134cdd3 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. fix ganache dependency resolution (#10917)

    * fix & cleanup
    
    * fixed resolved field in lock file
    soloseng authored Jan 30, 2024
    Configuration menu
    Copy the full SHA
    749956e View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. DoubleSigningSlasher Foundry test (#10839)

    * fixed gold token actors
    
    * ++ doubleSigningSlasher test
    
    * ∆ conflicting function name
    
    * set epochSize manually
    soloseng authored Feb 1, 2024
    Configuration menu
    Copy the full SHA
    7eec983 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2024

  1. adding ignore files for docker files and github (#10921)

    * adding ignore files for docker files and github
    
    * update to use new workflow with security restrictions on container builds
    
    * updating 2.0 to 2.1 workflow
    pputman-clabs authored Feb 5, 2024
    Configuration menu
    Copy the full SHA
    3786bcd View commit details
    Browse the repository at this point in the history
  2. Pputman/add proper ignore files (#10927)

    * adding ignore files for docker files and github
    
    * update to use new workflow with security restrictions on container builds
    
    * updating 2.0 to 2.1 workflow
    
    * fixing container versions
    pputman-clabs authored Feb 5, 2024
    Configuration menu
    Copy the full SHA
    d4a51f7 View commit details
    Browse the repository at this point in the history
  3. Deletes SECURITY.md to inherit the default from celo-org/.github (#10924

    )
    
    * docs(SECURITY): deletes `SECURITY.md` to inherit the default file
    
    Maintained in https://github.com/celo-org/.github/blob/main/SECURITY.md
    
    ---------
    
    Co-authored-by: arthurgousset <[email protected]>
    BenAtClabs and arthurgousset authored Feb 5, 2024
    Configuration menu
    Copy the full SHA
    2a5dac5 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2024

  1. Deleted leaderboard chart and references (#10920)

    Co-authored-by: Victoria <[email protected]>
    jcortejoso and lvpeschke authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    2065f42 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2024

  1. Configuration menu
    Copy the full SHA
    5c34e34 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. Configuration menu
    Copy the full SHA
    6787997 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2024

  1. upgrade celo deps from developer tooling repo (#10936)

    * upgrade celo deps from dt repo
    
    * remove exchange env test. the Contract is defunkt and mento owns the replacement. no need for a test here
    
    * exchange no longer exists so we dont need to freeze or thaw it
    aaronmgdr authored Feb 16, 2024
    Configuration menu
    Copy the full SHA
    359d2be View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2024

  1. chore(deps): update dependency @types/targz to v1.0.4 (#10898)

    Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 19, 2024
    Configuration menu
    Copy the full SHA
    cc8c344 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2024

  1. FeeHandler Foundry Migration (#10896)

    * Fee Handler Foundry
    
    * adds some tests, getting node-gyp errors so can't test
    
    * saving progress
    
    * saving progress
    
    * fix compiler errors
    
    * fix up through distribute test
    
    * saving progress
    
    * saving progress
    
    * fixes a couple tests
    
    * removes TODO
    
    * get rid of last TODO
    
    * add README
    
    * deletes old tests
    
    * fix build
    
    * address README feedback
    
    * addresses some feedback
    
    * follow revert naming convention
    
    * clarify distribute when balance is zero
    
    * add event tests
    
    * Update packages/protocol/test-sol/common/FeeHandler.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    ---------
    
    Co-authored-by: pahor167 <[email protected]>
    Co-authored-by: soloseng <[email protected]>
    3 people authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    09c1d09 View commit details
    Browse the repository at this point in the history
  2. Chore: bump oracle image version to 1.0.12 (#10949)

    * fix: update USDCUSD config
    
    * chore: update docker image version
    
    Co-authored-by: Nelson Taveras <[email protected]>
    
    ---------
    
    Co-authored-by: Nelson Taveras <[email protected]>
    Co-authored-by: Nelson Taveras <[email protected]>
    3 people authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    60c299c View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2024

  1. Implement new loadtest case (#10952)

    * Load test refactor. Included ordinals loadtest case
    
    * Trigger container build
    
    * Using maxFeePerGas and maxPriorityFeePerGas for ordinals txs
    
    * Fix gas config
    
    * Fix linter
    
    * Prepare load-test small improvements
    jcortejoso authored Mar 4, 2024
    Configuration menu
    Copy the full SHA
    c04dd49 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2024

  1. Election tests migration (#10871)

    * Election up till activate
    
    * ElectionValidatorSigners mostly done
    
    * ElectionValidatorSigners done
    
    * Last test batch missing
    
    * All tests are working
    
    * removal of election ts tests
    
    * compilation CI fix
    
    * utils added
    
    * constants added
    
    * minor refactor
    
    * Update packages/protocol/test-sol/voting/Election.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/voting/Election.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/voting/Election.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/voting/Election.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/voting/Election.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/voting/Election.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/voting/Election.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/voting/Election.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/voting/Election.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/voting/Election.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/voting/Election.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * buildable
    
    * PR comments 2
    
    * Missing tests added
    
    * Split of the tests
    
    ---------
    
    Co-authored-by: soloseng <[email protected]>
    pahor167 and soloseng authored Mar 5, 2024
    Configuration menu
    Copy the full SHA
    4a35759 View commit details
    Browse the repository at this point in the history
  2. Soloseng/validator-test-foundry-migration (#10914)

    * test init
    
    * deployed successful with correct owner
    
    * passing initialize test using a tunnel
    
    * passing setMembershipHistoryLength tests
    
    * ++ more test
    
    * enable skip
    
    * ++ constants; more tests; cleanup
    
    * ++ address to pubkey helper
    
    * stuck on invalid blspop during registration
    
    * Pinned submodule to specific tag/commit
    
    * ++ more tests
    
    * ++ tests
    
    * reworked layout + test
    
    * ++ affiliate tests
    
    * ++ deaffiliate
    
    * remove submodule
    
    * re add submodule
    
    * removed secp256k1 submodule
    
    * adding the library directly to repo, as foundry does not build it otherwise
    
    * ++ dev note
    
    * updated yarn
    
    * update contract name
    
    * ++ updateEcdsaPublicKey; updatePublicKeys
    
    * format
    
    * ++ registerValidatorGroup
    
    * yarn install
    
    * ++deregisterValidatorGroup tests
    
    * cleanup
    
    * ++ add members tests
    
    * comment
    
    * ++ removeMember test
    
    * cleanup
    
    * ++ reorder tests
    
    * ++ SetNextCommissionUpdate tests
    
    * ++ updateCommission tests
    
    * ++ calculateEpochScore tests
    
    * ++ calculateGroupEpochScore tests
    
    * ++ updateValidatorScoreFromSigner tests
    
    * clean up
    
    * ++ updateMembershipHistory tests
    
    * ++ getMembershipInLastEpoch tests
    
    * ++ getEpochSize test
    
    * ++ getAccountLockedGoldRequirement tests
    
    * ++ passing test
    
    * ++ distributeEpochPaymentsFromSigner tests ;
    ++ forceDeaffiliateIfValidator tests
    
    * ++ groupMembershipInEpoch tests
    
    * ++ all other tests
    
    * revert debug chages to contract
    
    * cleanup
    
    * Updated `celo-foundry` git module to point to `v0.5.13` branch
    
    * ++ suggestions
    
    * updated test name format
    
    * PR feedback
    
    * fixed redundant code
    soloseng authored Mar 5, 2024
    Configuration menu
    Copy the full SHA
    2e18dde View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2024

  1. Get pending withdrawals batched (#10956)

    * Batched pending withdrawals
    
    * Update packages/protocol/test-sol/governance/voting/LockedGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * PR comments
    
    ---------
    
    Co-authored-by: soloseng <[email protected]>
    pahor167 and soloseng authored Mar 11, 2024
    Configuration menu
    Copy the full SHA
    9b95a6d View commit details
    Browse the repository at this point in the history
  2. SortedLinkedList Foundry Migration (#10846)

    * wip
    
    * WIP: Failing last test
    
    * removed shadowed var
    
    * using foundry invariant on pragma ^0.8.0
    
    * working invariant tests
    
    * code cleanup
    
    * delete js test
    
    * added most test for 0.5.13 pragma version as well
    
    * following naming convention
    
    * re-org files to avoid migration conflict
    
    * restricted version to 0.8.0 or above
    
    * ++ vs code settings ∆
    
    * PR feedback
    soloseng authored Mar 11, 2024
    Configuration menu
    Copy the full SHA
    198f621 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2024

  1. Foundry Release gold test (#10795)

    * Some tests
    
    * addressToPublicKey tests
    
    * Authorization tests yet missing
    
    * All tests
    
    * Move of ReleaseGold.t.sol
    
    * removal of truffle test
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/governance/voting/ReleaseGold.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * build fix
    
    * PR comments
    
    * PR comments 2
    
    * Removal of secp reference
    
    * Removal of CI step
    
    ---------
    
    Co-authored-by: soloseng <[email protected]>
    pahor167 and soloseng authored Mar 12, 2024
    Configuration menu
    Copy the full SHA
    4a6c4ba View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2024

  1. remove @celo/dev-util package (#10958)

    It will be moved to the developer tooling repo as its more used there than here.
    
    The one function that is used here has been lined in the place its used.
    aaronmgdr authored Mar 22, 2024
    Configuration menu
    Copy the full SHA
    6e9683f View commit details
    Browse the repository at this point in the history
  2. Remove deprecated codecov integration (#10954)

    * Remove codecov status badge
    
    * Remove deprecated codecov integration
    lvpeschke authored Mar 22, 2024
    Configuration menu
    Copy the full SHA
    0ac4092 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2024

  1. chore(deps): update dependency semver to v7.5.2 [security] (#10941)

    Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 25, 2024
    Configuration menu
    Copy the full SHA
    c43354e View commit details
    Browse the repository at this point in the history
  2. chore(deps): update dependency @types/chai-subset to v1.3.5 (#10852)

    Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Victoria <[email protected]>
    renovate[bot] and lvpeschke authored Mar 25, 2024
    Configuration menu
    Copy the full SHA
    34ff159 View commit details
    Browse the repository at this point in the history
  3. chore(deps): update bitnami/kubectl docker tag to v1.29.3 (#10959)

    Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Victoria <[email protected]>
    renovate[bot] and lvpeschke authored Mar 25, 2024
    Configuration menu
    Copy the full SHA
    6204605 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. Tests: Use celo-blockchain release/1.8.0 branch; trigger tests when c…

    …hanging workflow (#10636)
    
    Update celo-blockchain version in test, and trigger tests when changing workflow file
    jcortejoso authored Apr 10, 2024
    Configuration menu
    Copy the full SHA
    41a1e14 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2024

  1. Reformatting and tests (#10870)

    * deleted comment
    
    * Revert "deleted comment"
    
    This reverts commit 2d0da96.
    
    * WIP
    
    * Finished tests
    
    * cleanup
    
    * Fixed constants file
    
    * small lint
    
    * removed ts tests
    
    * fixed constants
    
    * added day to constant
    
    * Rename BlockchainParameters.t.Sol to BlockchainParameters.t.sol
    
    * packages/protocol/test-sol/governance/network/BlockchainParameters.t.sol
    
    * Check for tests with wrong extensions
    
    * Fixed tests
    
    * lint
    
    * fixed broken test
    
    * bad comment
    
    * naming
    
    * Reformatting and tests
    
    * Removed ganache test job from the CI
    
    * Delete packages/protocol/test-sol/fail.t.sol
    
    * fail with wrong extension
    
    * More rename and lint
    
    * More formatting
    
    * cleanup
    
    * renamed SortedListedLink mock
    
    * more renaming
    
    * Delete packages/protocol/test-sol/common/fail.SOl
    
    * Moved ElectionMock
    
    * Moving more staff around
    
    * Rolled back mock election
    
    * typo
    
    * Changed LinkedList name
    
    * Delete packages/protocol/test-sol/common/Integration.t.sol
    
    * Refactor Registry
    
    * Fix multisig
    
    * fix
    
    * typos
    
    * pr comments
    
    * version update
    
    * foundry config update
    
    * foundry version hardcoded
    
    * test fix
    
    ---------
    
    Co-authored-by: pahor167 <[email protected]>
    martinvol and pahor167 authored Apr 18, 2024
    Configuration menu
    Copy the full SHA
    80144cc View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2024

  1. CR11 merge to master (#10965)

    * Release: Sorted oracles update (#10891)
    
    * Sorted oracles update
    
    * integration test fixes
    
    * constants added
    
    * Update packages/protocol/contracts/stability/SortedOracles.sol
    
    Co-authored-by: Martín Volpe <[email protected]>
    
    * Removal of Mento reference
    
    * Update packages/protocol/test-sol/stability/SortedOracles.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update packages/protocol/test-sol/stability/SortedOracles.t.sol
    
    Co-authored-by: soloseng <[email protected]>
    
    * PR comments
    
    * Equivalent tokens on top of updated sorted oracles  (Based of CR10) (#10904)
    
    * Brought changes from https://github.com/celo-org/celo-monorepo/pull/10895/files#diff-ba272032c5f1b7e89d5777b3c886685b581324bdf22733ee272e2790f5d631df
    
    * Fuzzy added
    
    ---------
    
    Co-authored-by: pahor167 <[email protected]>
    
    * prettify fix
    
    ---------
    
    Co-authored-by: Martín Volpe <[email protected]>
    Co-authored-by: soloseng <[email protected]>
    
    * FeeCurrency Adapter (#10907)
    
    * FeeCurrency Adapter
    
    * PR comments
    
    * Format documents
    
    * gitmodules
    
    * submodules added
    
    * solidity version fix
    
    * OZ contracts same commit as master
    
    * Revert "OZ contracts same commit as master"
    
    This reverts commit 8d8f2d6.
    
    * OZ to same commit as master
    
    * Getter&Setter for wrapped token
    
    * Proxy added
    
    * split of FeeCurrencyAdapter
    
    * prettier fix
    
    * refactor
    
    * Update packages/protocol/test-sol/stability/FeeCurrencyAdapter.t.sol
    
    Co-authored-by: Martín Volpe <[email protected]>
    
    * PR comments
    
    * PR comments
    
    * Decimals + Total supply added
    
    * Update packages/protocol/contracts-0.8/stability/FeeCurrencyAdapter.sol
    
    * Update packages/protocol/contracts-0.8/stability/FeeCurrencyAdapter.sol
    
    * Trigger
    
    * Wrapper reference removed
    
    * interface added
    
    ---------
    
    Co-authored-by: Martín Volpe <[email protected]>
    Co-authored-by: Tim Moreton <[email protected]>
    Co-authored-by: alvarof2 <[email protected]>
    
    * Calculation of unlockable gold (#10731)
    
    * Fix for historical vote records
    
    * contractkit fix
    
    * lint fix
    
    * Governance version update
    
    * PR comments
    
    * extended test
    
    * Remove console.log
    
    * Test
    
    * lint fix
    
    * version fix
    
    * version fix
    
    ---------
    
    Co-authored-by: Martín Volpe <[email protected]>
    
    * Gas Price Minimum should never be zero (#10909)
    
    * GasPriceMinimum backward compatibility fix (#10922)
    
    * Update Dockerfiles (#10915)
    
    * Remove references to packages deleted
    
    * Remove circleci dockerfiles and workflow
    
    * Delete reference to patches folder
    
    * Update workload-id-provider in metadata-crawler-build job (#10916)
    
    Use `master` workload-id-provider pool
    
    * fix ganache dependency resolution (#10917)
    
    * fix & cleanup
    
    * fixed resolved field in lock file
    
    * test
    
    * Tooling fix
    
    * lint fix
    
    * revert of gas price minimum
    
    * Update packages/protocol/lib/compatibility/ast-code.ts
    
    Co-authored-by: Martín Volpe <[email protected]>
    
    ---------
    
    Co-authored-by: Javier Cortejoso <[email protected]>
    Co-authored-by: soloseng <[email protected]>
    Co-authored-by: Martín Volpe <[email protected]>
    
    * Storage gap for FeeCurrencyAdapter (#10933)
    
    Storage gap
    
    * Debit 0 value check (#10930)
    
    * Removal of SortedOracle multiplier (#10931)
    
    * Removal of SortedOracle multiplier
    
    * removal of comment
    
    * Make super of FeeCurrencyAdapterOwnable.sol explicit (#10944)
    
    * Added note to FeeCurrencyAdapter.sol initializer (#10943)
    
    * FeeAdapter debit round up (#10940)
    
    * Round up of debit
    
    * PR comments
    
    * Code quality post audit (#10945)
    
    Code quality
    
    * SortedOracles sourced from Mento core for CR10 (#10946)
    
    * SortedOracles sourced from Mento core
    
    * PR comments
    
    * Update gap size to follow 50 rule (#10948)
    
    * CR11 fix verification (#10951)
    
    * Force AddressSortedLinkedListWithMedian library redeploy for CR11
    
    * CI fix
    
    * PR comments
    
    * yarn lock
    
    * Updates specification of SrotedOracles (#10970)
    
    * Update Natspec for FeeAdapter (#10969)
    
    * dockerfile
    
    ---------
    
    Co-authored-by: Martín Volpe <[email protected]>
    Co-authored-by: soloseng <[email protected]>
    Co-authored-by: Tim Moreton <[email protected]>
    Co-authored-by: alvarof2 <[email protected]>
    Co-authored-by: Javier Cortejoso <[email protected]>
    6 people authored Apr 19, 2024
    Configuration menu
    Copy the full SHA
    c71bada View commit details
    Browse the repository at this point in the history
  2. add @celo/dev-utils as dev dependency (#10962)

    * ++ @celo/dev-utils to dev dependencies
    
    * - updated to use CR 11 instead of 10
    - removed general test
    
    * Bump lockedGold contract version
    
    * revert version ∆
    
    * removed unused env var
    
    * bump contract versions
    soloseng authored Apr 19, 2024
    Configuration menu
    Copy the full SHA
    7962dc5 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. L2 migration infra check (#10972)

    * L2 migration infra
    
    * refactor
    
    * refactor
    pahor167 authored Apr 22, 2024
    Configuration menu
    Copy the full SHA
    7fae8ec View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2024

  1. function ordering + solhint for 0.8 (#10980)

    * function ordering
    
    * indent
    
    * disable cache temporarly
    
    * indent fix
    
    * indent fix 2
    
    * add solhint version
    
    * force cache rebuild
    pahor167 authored Apr 23, 2024
    Configuration menu
    Copy the full SHA
    da9b495 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2024

  1. Switch celo-blochchain test version to 1.8.x branch (again) (#10968)

    * Test celo-blockchain 1.8.x branch
    
    * Rotate cache in protocol tests
    
    ---------
    
    Co-authored-by: Victoria <[email protected]>
    jcortejoso and lvpeschke authored May 2, 2024
    Configuration menu
    Copy the full SHA
    2d925d7 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2024

  1. Removed Unused ODIS Dependency (#10987)

    removed odis dependency
    soloseng authored May 3, 2024
    Configuration menu
    Copy the full SHA
    3fec0b2 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. FeeCurrency directory (#10979)

    * FeeCurrency dictionary
    
    * refactor
    
    * feedback changes
    
    * PR comments
    
    * PR comments2
    
    * MentoAdapter
    
    * prettify
    
    * prettify21
    pahor167 authored May 10, 2024
    Configuration menu
    Copy the full SHA
    7828cd4 View commit details
    Browse the repository at this point in the history
  2. Shell scripts to calculate smart contract sizes (#10989)

    * chore(scripts): adds two shell scripts
    
    1. to calculate smart contract sizes from actual deployment addresses
    2. to calculate smart contact sizes from local build artefacts
    
    * style(protocol/README): linting (spaces, new lines, indentation)
    
    * chore(scripts): renames file to fix typo "artefacts" -> "artifacts"
    
    * fix(scripts): find build artifacts using relative directories
    
    * chore(protocol): adds two `size` commands in `package.json`
    
    * docs(protocol/README): adds documentation for two scripts
    
    * fix(scripts): modifies output directory
    
    * fix(scripts:artifacts): uses `deployedBytecode` instead of `bytecode`
    
    [EIP-170](https://eips.ethereum.org/EIPS/eip-170) puts "a hard cap on the size of an object that can be saved to the blockchain".
    
    Since it's the deployedBytecode that will be stored in the smart contract, and not the initialization bytecode, we should be looking at the size of the deployedBytecode.
    
    That might also explain (parts of) why the on-chain calculation is slightly different, since that uses the eth_getCode RPC method, which returns the deployed bytecode.
    
    With this change the contract size using on-chain method and the build artifact method are equal.
    
    * docs(protocol/README): replaces `bytecode` -> `deployedBytecode`
    
    * feat(scripts/size:onchain): adds support for custom RPC URL
    
    * docs(protocol/README): adds description to use custom RPC URL
    arthurgousset authored May 10, 2024
    Configuration menu
    Copy the full SHA
    1f9db02 View commit details
    Browse the repository at this point in the history
  3. Anvil integration (#10875)

    * basic migration works
    
    * Added proxy deploy without explicit Proxy()
    
    * Now it works
    
    * Added ProxyFactory to avoid create2 problems
    
    * tests
    
    * deleted broadcast files
    
    * Added linking for SortedOracles
    
    * Json reads, libraries work, split test so it doesn't recompile after compiling libraries
    
    * Reserve got migrated
    
    * little cleanup
    
    * Added StableToken migration
    
    * Added stabletoken migration
    
    * Migrated up to validators
    
    * Migrate up to scrow, libraries linking needs refactor
    
    * First precompile works
    
    * Migrated up to FeeHandler (WIP)
    
    * More constitution
    
    * conf file
    
    * now can read keys of jsons
    
    * governance works
    
    * Governance constitution almost migrated
    
    * Update remappings and script
    
    * made script work
    
    * try to make this work in the CI
    
    * fix Ci by changing folder of tests
    
    * work
    
    * don't simulate run
    
    * enable logging
    
    * Some migrations work
    
    * Fixed the migrations
    
    * integration tests run at the end of migrations
    
    * fix governance migration
    
    * rearanged files
    
    * Governance now fully works
    
    * Validators groups can be registered, validators can not because of missing precompile
    
    * Added mock precompile, WIP
    
    * Validator works
    
    * validator election WIP
    
    * fixed integration test
    
    * Compiles, WIP validators tests were deleted
    
    * Made migrations run
    
    * now works
    
    * Library linking now works
    
    * Removing references to IOwnable
    
    * Rebuild without early exit
    
    * Little cleanup
    
    * move to tmp folders
    
    * Added tmp folder
    
    * Most migrations should run
    
    * Build fix
    
    * Brought back Validators.t.sol
    
    * Fix build
    
    * Prettify
    
    * Rotated secret
    
    * packages/protocol/migrations_sol/create_and_migrate_anvil_devchain.sh
    
    * packages/protocol/migrations_sol/create_and_migrate_anvil_devchain.sh
    
    * Try libraries without --
    
    * Removing dash doesn't work
    
    * Ping build for Foundry
    
    * Change deployCodeTo
    
    * Delete packages/protocol/contracts/MigrationSingleTx.sol.DoNotCompile
    
    * try to fix tests
    
    * Rolled back
    
    * Made scripts more general
    
    * add forge version loggin
    
    * print out folders
    
    * make it sequential
    
    * change of SECP256K1 path
    
    * removal of integration tests
    
    * function ordering
    
    * prettier
    
    * prettier update + compilation fixes
    
    * node cache update
    
    * display yarnlock
    
    * yarn lock
    
    * package
    
    * Exchange from mento
    
    * prettify
    
    ---------
    
    Co-authored-by: pahor167 <[email protected]>
    Co-authored-by: pahor167 <[email protected]>
    3 people authored May 10, 2024
    Configuration menu
    Copy the full SHA
    a607b2f View commit details
    Browse the repository at this point in the history

Commits on May 15, 2024

  1. UsingPrecompiles fix for anvil (#10996)

    * UsingPrecompiles fix for anvil
    
    * version update
    pahor167 authored May 15, 2024
    Configuration menu
    Copy the full SHA
    894fd26 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2024

  1. Implement IOracle to SortedOracles & add FeeCurrencyDirectory to devc…

    …hain (#10993)
    
    * FeeCurrencyDirectory to devchain
    
    * Mento Fee Currency adapter
    
    * MentoFeeCurrencyAdapter test
    
    * lint
    
    * Update of SortedOracles
    
    * tests added
    
    * fix test release
    
    * lint
    
    * removal of MentoFeeCurrencyAdapterV1
    pahor167 authored May 16, 2024
    Configuration menu
    Copy the full SHA
    43a3146 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2024

  1. L2 Experimental Validators (#10983)

    * L2 Experimentall Validators
    
    * integration tests
    
    * Release gold tests
    
    * prettify
    
    * version update
    
    * optimizing the check
    
    * removal of modifier
    
    * prettify
    
    * workflow update
    
    * workflow update2
    
    * validator bytecode size fix
    
    * removal of tmate
    
    * hardcode gas limit
    
    * make release
    
    * rever of migrations
    
    * hardcode gas
    
    * Added logging
    
    * validators
    
    * refactor
    pahor167 authored May 17, 2024
    Configuration menu
    Copy the full SHA
    a4c608b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    272dd19 View commit details
    Browse the repository at this point in the history
  3. Deprecate random.sol (#10997)

    * setup
    
    * deprecated random contract calls
    
    * bump version
    
    * fixed version
    
    * remove version restriction
    soloseng authored May 17, 2024
    Configuration menu
    Copy the full SHA
    bb2fd67 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2024

  1. Add FeeCurrencyDirectory to Anvil migrations (#10992)

    * refactor(migrations/start_anvil): renames variable to fix typo
    
    * docs(protocol/create_and_migrate): adds comment for context
    
    * docs(protocol/migrations): adds TODOs and comments for context
    
    * chore(protocol/migrations): adds TODO comment
    
    * feat(protocol/migrations): adds `FeeCurrencyDirectory` migration
    
    Not checked that the current changes are sufficient and working.
    
    * feat(protocol/migrations): sets CurrencyConfig for stabletoken
    
    * feat(protocol/migrations_sol): sets example CurrencyConfig
    
    1. adds test oracle address
    2. adds test intrinsic gas value
    
    * chore(protocol/migrations_sol): now uses `FeeCurrencyDirectory`, not interface
    
    I was calling `initialize()`, but that function is defined in `FeeCurrencyDirectory` not `IFeeCurrencyDirectory`.
    
    Also updates string length, which was previously forgotten.
    
    At this point the compilation succeeds as expected, and the migration transactions are successful.
    
    * chore(protocol/migrations_sol): adds `MockOracle` to `CurrencyConfig`s
    
    This means, all currencies registered in the `FeeCurrencyDirectory` now support the `getExchangeRate` function, which uses the MockOracle contract under the hood.
    
    * chore(protocol/migrations_sol): removes `TODO` comments
    
    * chore(protocol:SortedOracles.sol): Adds `IOracle` to contract definition
    
    The `SortedOracles.sol` contract already implements the `IOracle.sol` interface. This commit only adds it to the contract definition for ease of reference.
    
    * chore(protocol/migrations_sol): Replaces `MockOracle` with `SortedOracles`
    
    The latest `SortedOracles.sol` implementation implements the `IOracle.sol` interface. That means it implements the required `getExchangeRate()` function.
    
    That means the `MockOracle.sol` contract is not required in the migrations.
    
    * chore(protocol/migrations_sol): removes unused and duplicate imports
    
    * style(protocol/migrations_sol): linting
    
    * test(protocol/test-sol/Validators): updates L2 error messages
    
    Now matches error message defined in `isL2Check.sol`
    Source: https://github.com/celo-org/celo-monorepo/blob/668a4050f7ee067948498c333da3feec85fa03fe/packages/protocol/contracts-0.8/common/IsL2Check.sol#L32-L33
    arthurgousset authored May 20, 2024
    Configuration menu
    Copy the full SHA
    eded310 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2024

  1. Downtimeslasher foundry test migration (#10978)

    * ++ some downtime slasher test
    
    * small fixes
    
    * ++ tests
    
    * missing slash test
    
    * remove old test from CI
    
    * remove old unused test contract
    
    * ++ more tests
    
    * passing slash test
    
    * updated double signing test to not use `MockUsingPrecompiles` for `validatorSignerAddressFromSet`
    
    * removed debug
    
    * all tests migrated
    soloseng authored May 21, 2024
    Configuration menu
    Copy the full SHA
    f655dff View commit details
    Browse the repository at this point in the history
  2. fix(deps): update dependency compare-versions to v6 (#10902)

    Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored May 21, 2024
    Configuration menu
    Copy the full SHA
    3743965 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. Downtime slasher L2 (#11001)

    * Downtime slasher
    
    * lint
    
    * tests added
    
    * lint
    pahor167 authored May 22, 2024
    Configuration menu
    Copy the full SHA
    b4272fd View commit details
    Browse the repository at this point in the history
  2. chore(deps): update actions/cache action to v4 (#10973)

    Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored May 22, 2024
    Configuration menu
    Copy the full SHA
    0931824 View commit details
    Browse the repository at this point in the history
  3. chore(deps): update nick-fields/retry action to v3 (#10975)

    Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored May 22, 2024
    Configuration menu
    Copy the full SHA
    8ac300e View commit details
    Browse the repository at this point in the history
  4. Deprecate EpochRewards Contract on L2. (#11004)

    * state changing functions revert on L2
    
    * ++ version
    
    * updated test name
    
    * Updated MockElection to include L2 check
    soloseng authored May 22, 2024
    Configuration menu
    Copy the full SHA
    f7047d3 View commit details
    Browse the repository at this point in the history
  5. chore(deps): update dawidd6/action-download-artifact action to v3 (#1…

    …0974)
    
    Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Victoria <[email protected]>
    renovate[bot] and lvpeschke authored May 22, 2024
    Configuration menu
    Copy the full SHA
    98922df View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. ReleaseGold L2 Compatibility Check (#11005)

    * linting
    
    * updated to test L2 functionality and deployment
    soloseng authored May 24, 2024
    Configuration menu
    Copy the full SHA
    a0f1850 View commit details
    Browse the repository at this point in the history
  2. Reduce build time when running foundry migrations (#11003)

    * chore(protocol/migrations_sol): adds time tracking
    
    To measure how long it takes to run the entire script from start to finish.
    
    * chore(protocol/migrations_sol): cuts migration time by 35%
    
    Worked as expected, but stopped working because of what I think is a cache issue.
    
    Latest best time to run script (with improvement): 338 sec or	5.6	min
    Improvement margin: -34% or	2.9	min
    
    Committing this WIP to do a clean checkout and see if it's a cache issue.
    
    * chore(protocol/contracts): adds `@celo-contracts/` import
    
    This uses remappings instead of relative import `./`
    
    * fix(protocol): updates `@celo-contracts` remapping
    
    * refactor(protocol/migrations_sol): adds `deploy_libraries.sh` script
    
    Currently running `create_and_migrate_anvil_devchain.sh` successfully builds the libraries (fast) as expected.
    
    It then fails with:
    
    ```sh
    Deploying libraries...
    Deploying library: AddressSortedLinkedListWithMedian
    Error:
    Found incompatible Solidity versions:
    test-sol/governance/validators/IntegerSortedLinkedListMock-8.sol (>=0.8.0 <0.8.20) imports:
        contracts-0.8/common/linkedlists/IntegerSortedLinkedList.sol (>=0.8.0 <0.8.20)
        lib/openzeppelin-contracts8/contracts/utils/math/SafeMath.sol (^0.8.0)
        contracts/common/linkedlists/SortedLinkedList.sol (^0.5.13)
        lib/openzeppelin-contracts/contracts/math/SafeMath.sol (^0.5.0)
        contracts/common/linkedlists/LinkedList.sol (^0.5.13)
        lib/openzeppelin-contracts/contracts/math/SafeMath.sol (^0.5.0)
    ```
    
    * fix(protocol/contracts-0.8): updates `@celo-contracts-8`
    
    Previously I mistakenly updated to `@celo-contracts` which is on the wrong solidity version.
    
    * fix(protocol/migrations_sol): changes directory to deploy contracts
    
    Previously the script tried to deploy contracts in the `protocol/` but the build output in the temp directory.
    
    * fix(protocol/contracts): undo `@celo-` imports
    
    Using `@celo-contracts` and `@celo-contracts-8` syntax with remappings broke the truffle build process.
    
    Truffle only allows imports (with or without remapping) that are resolved within `node_modules`.
    
    That means I don't think I can't use a directory that is not in `node_modules` (with or without remapping).
    
    > Truffle supports dependencies installed via NPM. To import contracts from a dependency, use the following syntax
    > `import "somepackage/SomeContract.sol";`
    > Here, `somepackage` represents a package installed via NPM, and `SomeContract.sol` represents a Solidity source file provided by that package.
    
    Source: https://archive.trufflesuite.com/docs/truffle/how-to/compile-contracts/#importing-dependencies-via-file-name
    
    > Since the path didn't start with `./`, Truffle knows to look in your project's `node_modules` directory for the `example-truffle-library` folder. From there, it resolves the path to provide you the contract you requested.
    
    Source: https://archive.trufflesuite.com/docs/truffle/how-to/package-management-via-npm/#within-your-contracts
    
    I decided to revert the changes to the import and the need for remappings, and instead try to make the library compilation work with relative paths.
    
    At this point
    1. the truffle compilation works with
    
    ```sh
    # within protocol directory
    yarn build:sol
    ```
    
    2. the Foundry migrations work
    
    ```sh
    # within protocol directory
    ./migrations_sol/create_and_migrate_anvil_devchain.sh
    ```
    
    * chore(protocol/migrations_sol): moves `mkdir` command up
    
    The script was breaking on CI:
    
    ```sh
    mkdir: cannot create directory ‘/home/runner/work/celo-monorepo/celo-monorepo/packages/protocol/.tmp/libraries’: No such file or directory
    ```
    
    Source: https://github.com/celo-org/celo-monorepo/actions/runs/9223759766/job/25377654339?pr=11003#step:18:78
    
    That's expected since the temp directory is only created after the "deploy libraries" script is called.
    
    * chore(protocol/migrations_sol): removes `TODO` comment
    
    * chore(protocol/migrations_sol): removes unused library commands
    
    I tested this, and these extra commands are not used or needed.
    Also removes `TODO` comment.
    arthurgousset authored May 24, 2024
    Configuration menu
    Copy the full SHA
    86c3ffb View commit details
    Browse the repository at this point in the history

Commits on May 27, 2024

  1. Anvil Epoch size precompile update (#11009)

    epoch size precompile update
    pahor167 authored May 27, 2024
    Configuration menu
    Copy the full SHA
    7a4fddd View commit details
    Browse the repository at this point in the history

Commits on May 28, 2024

  1. Deactivate BlochainParameters Contract on L2 (#11008)

    * deactivate state modifiying functions
    
    * PR feedback
    
    * bump version
    soloseng authored May 28, 2024
    Configuration menu
    Copy the full SHA
    1644216 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2024

  1. Deprecate GasPriceMinimum for L2 (#11012)

    * deprecate GasPriceMinimum for L2
    
    * version update
    
    * GPM fix
    
    * GPM fix2
    
    * GPM version update
    pahor167 authored May 29, 2024
    Configuration menu
    Copy the full SHA
    2b8084f View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2024

  1. Publish anvil devchain to artifacts & npm (#11006)

    * Downtime slasher
    
    * devchain to artifacts
    
    * workflow update
    
    * workflow update2
    
    * workflow update3
    
    * workflow update4
    
    * workflow update5
    
    * workflow update5
    
    * workflow update6
    
    * workflow update6
    
    * workflow update7
    
    * workflow update´8
    
    * workflow update9
    
    * workflow update10
    
    * workflow update11
    
    * workflow update12
    
    * workflow update13
    
    * workflow update13
    
    * workflow update14
    
    * workflow update15
    
    * workflow update16
    
    * workflow update17
    
    * workflow update18
    
    * workflow update19
    
    * workflow update19
    
    * workflow update20
    
    * workflow update21
    
    * workflow update22
    
    * workflow update23
    
    * workflow update24
    
    * workflow update25
    
    * workflow update26
    
    * workflow update27
    
    * merg
    
    * npm login
    
    * npm login removal
    
    * update of runson
    
    * removal of pull request trigger
    
    * state interval
    
    * force update npm version
    
    * Update packages/protocol/migrations_sol/create_and_migrate_anvil_devchain.sh
    
    Co-authored-by: Arthur Gousset <[email protected]>
    
    * Update packages/protocol/migrations_sol/create_and_migrate_anvil_devchain.sh
    
    Co-authored-by: Arthur Gousset <[email protected]>
    
    * readme added
    
    * devchain version
    
    * removal of pull request trigger
    
    ---------
    
    Co-authored-by: Arthur Gousset <[email protected]>
    pahor167 and arthurgousset authored Jun 3, 2024
    Configuration menu
    Copy the full SHA
    0e3303d View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2024

  1. Integration tests for Anvil migrations (#11002)

    * test(protocol/migrations_sol): adds existing unit tests
    
    * test(test-sol/integration): adds e2e test for GoldToken
    
    This is a test run, to see how `setUp()` and contract definitions work.
    
    1. run devchain
    
    ```sh
    ./migrations_sol/create_and_migrate_anvil_devchain.sh
    ```
    
    2. run test against devchain
    
    ```sh
    forge test \
    --match-path test-sol/integration/Integration.t.sol \
    --match-contract GoldTokenTest_General \
    -vvv \
    --fork-url http://127.0.0.1:8546
    ```
    
    Tests pass
    
    Output:
    
    ```sh
    [⠰] Compiling...
    No files changed, compilation skipped
    
    Running 3 tests for test-sol/integration/Integration.t.sol:GoldTokenTest_General
    [PASS] test_decimals() (gas: 10837)
    Logs:
      GoldToken address is: 0xfE8CbC1cFA1b3b8256f310bdfd40E60597083448
    
    [PASS] test_name() (gas: 12537)
    Logs:
      GoldToken address is: 0xfE8CbC1cFA1b3b8256f310bdfd40E60597083448
    
    [PASS] test_symbol() (gas: 12579)
    Logs:
      GoldToken address is: 0xfE8CbC1cFA1b3b8256f310bdfd40E60597083448
    
    Test result: ok. 3 passed; 0 failed; 0 skipped; finished in 135.40ms
    
    Ran 1 test suites: 3 tests passed, 0 failed, 0 skipped (3 total tests)
    ```
    
    * test(test-sol/integration): adds loop to assert contract is in Registry
    
    * chore(test-sol/integration): adds TODO comment about config file
    
    * test(test-sol/integration): upgrades to solidity 0.8
    
    This is to allow me to use the `.code` property on deployed smart contracts, which is only supported on Solidity 0.8 and above.
    
    * nit(test-sol/integration): updates constructor visibility
    
    In Solidity versions 0.7.0 and later, constructors are implicitly internal, meaning they can only be called within the contract itself or derived contracts, making the visibility keyword redundant.
    
    * nit(test-sol/integration): updates function state mutability
    
    The state mutability of a function can be restricted to view if the function does not modify the state of the blockchain. A view function promises not to alter the state, which allows the Ethereum Virtual Machine (EVM) to optimize how it handles the function.
    
    The function does not modify any state; it only reads from the registry and logs some information.
    
    * test(test-sol/integration): adds MVP assertion that bytecode matches
    
    * fix(test-sol/integration): use implementation address and deployedBytecode
    
    * refactor(test-sol): adds registry array in `constants.sol`
    
    The goal is to use that in both the migration script (`Migration.s.sol`) and the integration test (`Integration.t.sol`).
    
    * refactor(protocol/migration_sol): uses registry array from `constants.sol`
    
    * fix(test-sol/integration): adds back `Test.sol` import
    
    Mistakenly deleted earlier
    
    * refactor(migrations_sol): simplifies script that runs integration tests
    
    * chore(test-sol/integration): commits WIP on failing bytecode test
    
    * test(test-sol): adds helper to remove metadata from bytecode
    
    Also adds docstring for better readability.
    
    * chore(test-sol/integration): excludes failing contracts from bytecode test
    
    * chor(test-sol/integration): adds code comment for readability
    
    * chore(test-sol/integration): removing unused code comments
    
    * fix(workflows/protocol_tests): excludes integration tests
    
    * fix(workflows/protocol_tests): excludes integration tests more explicitly
    
    * nit(test-sol/constants): improves code comment for context
    
    * fix(workflows/protocol_tests): downgrades foundry version
    
    The latest version has a regression that leads to a failing integration test. But, fixing a previous nightly build fixed the error.
    
    * fix(workflows/protocol_tests): excludes integration tests correctly
    
    * chore(test-sol/utils): reverts `deployCodeTo` edit in `ECDSAHelper`
    
    Because I'm downgrading to a previous foundry version, I have to undo the change to this line made in this PR: #10997
    
    * style(protocol): linting
    
    I always forget to run `yarn prettify` in the top-level directory
    
    * docs(workflows/protocol_tests): adds better code comment
    
    To explain what flags and arguments are used.
    
    * refactor(test-sol/integration): rename variables for better readability
    
    * refactor(test-sol/integration): take constants out of `for`-loop
    
    * style(protocol): linting
    
    Using `yarn prettify` in the top-level directory
    
    * fix(test-sol/integration): add contract name back into `for`-loop
    
    * nit(test-sol/integration): rename variable for better readability
    
    * refactor(migrations_sol/constants): creates new `constants.sol`
    
    * refactor(migrations_sol&test-sol): removes `Utils` import
    
    Adds function in `Integration.t.sol` directly to avoid 0.5.x version problems.
    
    * test(test-sol/integration): bumps solidity version to `>=0.8.7 <0.8.20`
    
    * refactor(test-sol/integration): use `.code` property instead of helper function
    
    Because the script is now on 0.8, we can use the `.code` property to fetch the runtime bytecode of a smart contract deployed on the devchain. Previously, we needed to load the bytecode from storage with inline assembly.
    
    * refactor(foundry): simplifies configs to exclude tests
    
    Functionally this should be the same, but the configs and flags are more readable.
    arthurgousset authored Jun 5, 2024
    Configuration menu
    Copy the full SHA
    2908c52 View commit details
    Browse the repository at this point in the history
  2. chore: downgrade foundry version to match across workflows (#11017)

    fix(workflows/protocol-devchain-anvil): downgrades foundry version
    
    This should match the version set in `protocol_tests.yml`.
    This PR downgraded the foundry version, but CI didn't catch the failing workflow on the feature branch, because `protocol-devchain-anvil.yml` only runs on `master`.
    arthurgousset authored Jun 5, 2024
    Configuration menu
    Copy the full SHA
    0f28027 View commit details
    Browse the repository at this point in the history
  3. chore(deps): update celo-org/reusable-workflows action to v2.0.4 (#11010

    )
    
    Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jun 5, 2024
    Configuration menu
    Copy the full SHA
    2d53dd0 View commit details
    Browse the repository at this point in the history
  4. Soloseng/celo-minting-schedule (#10995)

    * fix validator test
    
    * update L2 check to include pragma 0.5
    
    * update LockedGold for L2
    
    * upadated parsing and yarn
    
    * ++ only L2 modifier
    
    * using IGoldToken interface that includes mint function
    
    * GoldToken is L2 Safe
    
    * working first draft of minting schedule
    
    * revert lockedGold changes
    
    * fixed time discrepency
    
    * removed variable in `mintAccordingToSchedule`
    
    * Using target gold total supply to calculate minting schedule.
    
    * using IERC20 instead of IGoldToken
    
    * lint
    
    * force trigger test on current branch
    
    * fix test
    
    * cleanup
    
    * mint to multiple receiver based on L2 schedule
    
    * cleanup
    
    * updated interface
    
    * Only initialize on L2
    
    * removed foundry version restriction
    
    * removed branch from push condition
    
    * removed extra ownership transfer step
    
    * ++ ts migrations
    
    * ++ proxy contract
    
    * ++ NATSPEC
    -- comments
    
    * -- shadowed var
    
    * manually set l2starttime
    
    * reorder migrations
    
    * ++ initialization data
    
    * fix test error msg
    
    * ++ MintGoldSchedule to anvil migration
    
    * fixed requirements
    
    * ++ setDependencies function
    
    * moved migrations to 0.8
    
    * adapted constant contract to include pragma 0.8
    
    * addapted goldToken tests to support mintGoldSchedule in 0.8
    
    * upgraded mintGoldSchedule to using pragma 0.8
    
    * using `assertApproxEqRel`
    
    * bump lower end version
    
    * exclude ReentrancyGuard from compatibility check
    
    * GoldToken PR feedback
    
    * PR feedback on mintschedule
    
    * PR feedback
    
    * PR feedback
    
    * typo fix
    
    * update test epochSize to match master
    
    * MintGoldSchedule PR feedback
    
    * moved IGoldToken to contracts-0.8, to only build using pragma ^0.8.
    
    This should be fine since it's only being used by MintGoldSchedule
    
    * PR feedback. mint all that is avail
    
    * PR feedback
    
    * gas saving
    soloseng authored Jun 5, 2024
    Configuration menu
    Copy the full SHA
    6d6d901 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2024

  1. Configuration menu
    Copy the full SHA
    e264a90 View commit details
    Browse the repository at this point in the history
  2. wf update (#11021)

    * wf update
    
    * Add SHA to log
    
    * add logging
    
    * update
    
    * update2
    
    * update3
    
    * update4
    pahor167 authored Jun 6, 2024
    Configuration menu
    Copy the full SHA
    95af1c6 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2024

  1. Sync release/core-contracts/12 with master (#11033)

    * test: proof of concept 2e2 test using anvil devchain (#11020)
    
    * chore(test-sol/FeeCurrencyDirectory)): use `@celo-...` remapping not `../..`
    
    * test(test-sol/FeeCurrencyDirectory)): MVP e2e test
    
    MVP demo of an e2e test using the devchain. This is not the pattern I'll suggest, but good to see the test passes end-to-end.
    
    * chore(foundry.toml): adds `@test-sol` remapping
    
    * chore(test-sol/e2e): adds MVP `utils.sol`
    
    Idea is to have a Devchain class that can be inherited by Test contracts to have access to the deployed contracts on the devchain.
    
    * test(FeeCurrencyDirectory): MVP test using `Devchain` class
    
    * chore(migrations_sol): adds MVP script to run e2e tests
    
    * style(test-sol/e2e): linting
    
    * refactor(test-sol/FeeCurrencyDirectory): moves file to `.../e2e/`
    
    * chore(migrations_sol): use `test-sol/e2e/*` path
    
    * chore(test-sol/FeeCurrencyDirectory): match contract name in unit and e2e test
    
    * style(test-sol/FeeCurrencyDirectory): linting
    
    * chore(e2e/utils): removes unused imports and more
    
    Cleans up
    Adds `TODO` comments
    
    * test(test-sol/e2e): renames contract with "E2E..."
    
    I'm temporarily adding the "E2E..." prefix to the contract so I can exclude this test and the integration tests during the CI run.
    
    In a separate PR, I'll refactor the tests into a directory structure like:
    
    ```
    test-sol/unit/
    test-sol/e2e/
    test-sol/integration/
    ```
    
    That way we could run tests with something like this:
    
    ```
    # unit tests
    forge test --match-path "*test-sol/unit/*"
    
    # e2e tests
    forge test --match-path "*test-sol/e2e/*"
    
    # integration tests
    forge test --match-path "*test-sol/integration/*"
    ```
    
    * chore(workflows/protocol_tests): excludes e2e test from workflow
    
    I'm temporarily adding the "E2E..." prefix to the contract so I can exclude this test and the integration tests during the CI run.
    
    In a separate PR, I'll refactor the tests into a directory structure like:
    
    ```
    test-sol/unit/
    test-sol/e2e/
    test-sol/integration/
    ```
    
    That way we could run tests with something like this:
    
    ```
    # unit tests
    forge test --match-path "*test-sol/unit/*"
    
    # e2e tests
    forge test --match-path "*test-sol/e2e/*"
    
    # integration tests
    forge test --match-path "*test-sol/integration/*"
    ```
    
    * style(test-sol/e2e): linting
    
    * chore(e2e): temporarily renames contract with "E2E..."
    
    In subsequent PRs, I'll rename this more accurately.
    
    * feat: add ReserveSpenderMultiSig to anvil migrations (#11028)
    
    * feat(migrations_sol/migrationsConfig): adds `reserveSpenderMultiSig` configs
    
    * feat(migrations_sol): adds `migrateReserveSpenderMultiSig`
    
    Also adds contract calls in `migrateReserve` function.
    Not tested, and not sure this works yet. I might be missing some changes.
    
    * chore(test-sol/utils): adds `ReserveSpenderMultiSig.t.sol`
    
    From the code comment:
    
      The purpose of this file is not to provide test coverage for `ReserveSpenderMultiSig.sol`.
      This is an empty test to force foundry to compile `ReserveSpenderMultiSig.sol`, and include its
      artifacts in the `/out` directory. `ReserveSpenderMultiSig.sol` is needed in the migrations
      script, but because it's on Solidity 0.5 it can't be imported there directly.
      If there is a better way to force foundry to compile `ReserveSpenderMultiSig.sol` without
      this file, this file can confidently be deleted.
    
    * feat(migrations_sol/HelperInterFaces): adds `IReserveSpenderMultiSig`
    
    The helper interface is used as a workaround to allow the migrations script (`Migrations.s.sol`) to be on Solidity 0.8, while the ReserveSpenderMultiSig contract is on Solidity 0.5. The migration script only needs to initialize the contract, which is why the helper interface only defines an `initialize` function.
    
    * chore(migrations_sol): initialize `ReserveSpenderMultiSig`
    
    * chore(migrations_sol): adds code comment for readability
    
    * chore(migrations_sol): improves code comment, moves code block up
    
    * chore(migrations_sol): fix typo
    
    * style(migrations_sol): linting
    
    * test: refactor foundry test directory into unit, e2e, and integration tests (#11023)
    
    * chore(foundry.toml): adds `@mento-core/...` remapping
    
    Also moves existing mappings into groups for better readability
    
    * refactor(test-sol/common): moves files to `unit/common/`
    
    Also updates imports respectively using remappings.
    
    * refactor(test-sol/identity): moves files to `unit/identity/`
    
    Also updates imports using remappings where necessary.
    
    * refactor(test-sol/stability): moves files to `unit/stability/`
    
    Also updates imports using remappings where necessary.
    
    * refactor(test-sol/voting): moves files to `unit/voting/`
    
    Also updates imports using remappings where necessary.
    
    * refactor(test-sol/governance): moves files to `unit/governance/`
    
    Also updates imports using remappings where necessary.
    
    * chore(test-sol): update missing remappings
    
    With these changes all contracts compile and resolve correctly.
    
    * chore(workflows/protocol_tests): updates paths to `test-sol/unit`
    
    * chore(workflows/protocol_tests): adds integration and e2e tests
    
    * style(workflows/protocol_tests): refactors `forge test` for better readability
    
    * chore(migrations_sol): moves scripts to `scripts/foundry/
    
    Moves all bash scripts from `migrations_sol` to `scripts/foundry/`, and updates paths where necessary. We already have a directory for `scripts/truffle/` and `scripts/bash/`, so this makes it easier to find foundry-related bash scripts.
    
    * test(governance/mock): move `MockGovernance` to `unit/` folder
    
    * refactor(foundry.toml): rename `migrations-sol/` remapping
    
    * refactor(workflows): refactor "run everything" step
    
    Runs all tests in the `unit/` directory instead of all test files in the repo.
    This makes sense from my perspective, because e2e tests (in the `e2e/` directory) and integration tests (in the `integration/` directory) require a connection to an anvil devchain serving at localhost.
    
    The intent of this command is to ensure that no unit tests are forgotten, since unit tests are run explicitly by going through the directories above. But, the intention is not to run all tests in the repo generally.
    
    * style(workflows/protocol-devchain-anvil): splits migration into 2 steps
    
    This helps the script becoming more readable, and ensure error logs are clearly associated with a workflow step rather than a single bash script.
    
    * chore(workflows): defines `ANVIL_PORT` env variable in workflow
    
    Previously, the `$ANVIL_PORT` variable was exported and passed around as an env variable in a bash script.
    
    But that required generating anvil migrations and running a devchain repeatedly.
    Instead, the workflow does that once and different steps can access the devchain.
    
    But, in that case the env variable is not passed around, so it has to be defined at the workflow level.
    
    Source: https://docs.github.com/en/actions/learn-github-actions/variables
    
    * chore(workflows/protocol_tests): removes code comment
    
    * feat(scripts/foundry): adds `stop_anvil.sh`
    
    * refactor(scripts/foundry): use `stop_anvil.sh` to stop anvil
    
    * feat(protocol/package.json): adds `anvil-devchain:...` (`start` and `stop`)
    
    * refactor(scripts/foundry): use `stop_anvil.sh` to stop anvil
    
    * refactor(migrations_sol): update `@migrations-sol` remapping
    
    Previous the remapping was called `@celo-migrations`.
    
    * docs(migrations_sol/README): renames README file
    
    Also changes title to match NPM package name. This is a matter of personal preference. IMO this is a small improvement in readability for 3rd party users.
    
    * docs(scripts/foundry): adds more links to `package.json`
    
    Adds `repository` and `directory` to `package.json`.
    This ensures npmjs.org displays hyperlinks to the github repository.
    
    * docs(migrations_sol/CONTRIBUTING): adds MVP dev docs
    
    We can complete this doc with additional information regarding the anvil devchain and migrations going forward.
    
    * docs(migrations_sol/README): adds "how we work" section
    
    This is helpful for 3rd party developers that found this package on npmjs.org.
    The links help developers take action and help improve the anvil devchain.
    
    * Soloseng/CHORE-update-workflow (#11029)
    
    * update workflow to run on push to release branches
    
    * ++ mintgoldschedule to migration test constants
    
    * update GH WF
    
    ---------
    
    Co-authored-by: Arthur Gousset <[email protected]>
    soloseng and arthurgousset authored Jun 12, 2024
    Configuration menu
    Copy the full SHA
    1adfa6c View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

  1. L2 Staking and Voting (#11034)

    * test: proof of concept 2e2 test using anvil devchain (#11020)
    
    * chore(test-sol/FeeCurrencyDirectory)): use `@celo-...` remapping not `../..`
    
    * test(test-sol/FeeCurrencyDirectory)): MVP e2e test
    
    MVP demo of an e2e test using the devchain. This is not the pattern I'll suggest, but good to see the test passes end-to-end.
    
    * chore(foundry.toml): adds `@test-sol` remapping
    
    * chore(test-sol/e2e): adds MVP `utils.sol`
    
    Idea is to have a Devchain class that can be inherited by Test contracts to have access to the deployed contracts on the devchain.
    
    * test(FeeCurrencyDirectory): MVP test using `Devchain` class
    
    * chore(migrations_sol): adds MVP script to run e2e tests
    
    * style(test-sol/e2e): linting
    
    * refactor(test-sol/FeeCurrencyDirectory): moves file to `.../e2e/`
    
    * chore(migrations_sol): use `test-sol/e2e/*` path
    
    * chore(test-sol/FeeCurrencyDirectory): match contract name in unit and e2e test
    
    * style(test-sol/FeeCurrencyDirectory): linting
    
    * chore(e2e/utils): removes unused imports and more
    
    Cleans up
    Adds `TODO` comments
    
    * test(test-sol/e2e): renames contract with "E2E..."
    
    I'm temporarily adding the "E2E..." prefix to the contract so I can exclude this test and the integration tests during the CI run.
    
    In a separate PR, I'll refactor the tests into a directory structure like:
    
    ```
    test-sol/unit/
    test-sol/e2e/
    test-sol/integration/
    ```
    
    That way we could run tests with something like this:
    
    ```
    # unit tests
    forge test --match-path "*test-sol/unit/*"
    
    # e2e tests
    forge test --match-path "*test-sol/e2e/*"
    
    # integration tests
    forge test --match-path "*test-sol/integration/*"
    ```
    
    * chore(workflows/protocol_tests): excludes e2e test from workflow
    
    I'm temporarily adding the "E2E..." prefix to the contract so I can exclude this test and the integration tests during the CI run.
    
    In a separate PR, I'll refactor the tests into a directory structure like:
    
    ```
    test-sol/unit/
    test-sol/e2e/
    test-sol/integration/
    ```
    
    That way we could run tests with something like this:
    
    ```
    # unit tests
    forge test --match-path "*test-sol/unit/*"
    
    # e2e tests
    forge test --match-path "*test-sol/e2e/*"
    
    # integration tests
    forge test --match-path "*test-sol/integration/*"
    ```
    
    * style(test-sol/e2e): linting
    
    * chore(e2e): temporarily renames contract with "E2E..."
    
    In subsequent PRs, I'll rename this more accurately.
    
    * set EpochSize on L2
    
    * allow voting and activating
    
    * move election test contract to vote dir
    
    * updated test to allow testing of L2 with no reward distribution
    
    * feat: add ReserveSpenderMultiSig to anvil migrations (#11028)
    
    * feat(migrations_sol/migrationsConfig): adds `reserveSpenderMultiSig` configs
    
    * feat(migrations_sol): adds `migrateReserveSpenderMultiSig`
    
    Also adds contract calls in `migrateReserve` function.
    Not tested, and not sure this works yet. I might be missing some changes.
    
    * chore(test-sol/utils): adds `ReserveSpenderMultiSig.t.sol`
    
    From the code comment:
    
      The purpose of this file is not to provide test coverage for `ReserveSpenderMultiSig.sol`.
      This is an empty test to force foundry to compile `ReserveSpenderMultiSig.sol`, and include its
      artifacts in the `/out` directory. `ReserveSpenderMultiSig.sol` is needed in the migrations
      script, but because it's on Solidity 0.5 it can't be imported there directly.
      If there is a better way to force foundry to compile `ReserveSpenderMultiSig.sol` without
      this file, this file can confidently be deleted.
    
    * feat(migrations_sol/HelperInterFaces): adds `IReserveSpenderMultiSig`
    
    The helper interface is used as a workaround to allow the migrations script (`Migrations.s.sol`) to be on Solidity 0.8, while the ReserveSpenderMultiSig contract is on Solidity 0.5. The migration script only needs to initialize the contract, which is why the helper interface only defines an `initialize` function.
    
    * chore(migrations_sol): initialize `ReserveSpenderMultiSig`
    
    * chore(migrations_sol): adds code comment for readability
    
    * chore(migrations_sol): improves code comment, moves code block up
    
    * chore(migrations_sol): fix typo
    
    * style(migrations_sol): linting
    
    * test: refactor foundry test directory into unit, e2e, and integration tests (#11023)
    
    * chore(foundry.toml): adds `@mento-core/...` remapping
    
    Also moves existing mappings into groups for better readability
    
    * refactor(test-sol/common): moves files to `unit/common/`
    
    Also updates imports respectively using remappings.
    
    * refactor(test-sol/identity): moves files to `unit/identity/`
    
    Also updates imports using remappings where necessary.
    
    * refactor(test-sol/stability): moves files to `unit/stability/`
    
    Also updates imports using remappings where necessary.
    
    * refactor(test-sol/voting): moves files to `unit/voting/`
    
    Also updates imports using remappings where necessary.
    
    * refactor(test-sol/governance): moves files to `unit/governance/`
    
    Also updates imports using remappings where necessary.
    
    * chore(test-sol): update missing remappings
    
    With these changes all contracts compile and resolve correctly.
    
    * chore(workflows/protocol_tests): updates paths to `test-sol/unit`
    
    * chore(workflows/protocol_tests): adds integration and e2e tests
    
    * style(workflows/protocol_tests): refactors `forge test` for better readability
    
    * chore(migrations_sol): moves scripts to `scripts/foundry/
    
    Moves all bash scripts from `migrations_sol` to `scripts/foundry/`, and updates paths where necessary. We already have a directory for `scripts/truffle/` and `scripts/bash/`, so this makes it easier to find foundry-related bash scripts.
    
    * test(governance/mock): move `MockGovernance` to `unit/` folder
    
    * refactor(foundry.toml): rename `migrations-sol/` remapping
    
    * refactor(workflows): refactor "run everything" step
    
    Runs all tests in the `unit/` directory instead of all test files in the repo.
    This makes sense from my perspective, because e2e tests (in the `e2e/` directory) and integration tests (in the `integration/` directory) require a connection to an anvil devchain serving at localhost.
    
    The intent of this command is to ensure that no unit tests are forgotten, since unit tests are run explicitly by going through the directories above. But, the intention is not to run all tests in the repo generally.
    
    * style(workflows/protocol-devchain-anvil): splits migration into 2 steps
    
    This helps the script becoming more readable, and ensure error logs are clearly associated with a workflow step rather than a single bash script.
    
    * chore(workflows): defines `ANVIL_PORT` env variable in workflow
    
    Previously, the `$ANVIL_PORT` variable was exported and passed around as an env variable in a bash script.
    
    But that required generating anvil migrations and running a devchain repeatedly.
    Instead, the workflow does that once and different steps can access the devchain.
    
    But, in that case the env variable is not passed around, so it has to be defined at the workflow level.
    
    Source: https://docs.github.com/en/actions/learn-github-actions/variables
    
    * chore(workflows/protocol_tests): removes code comment
    
    * feat(scripts/foundry): adds `stop_anvil.sh`
    
    * refactor(scripts/foundry): use `stop_anvil.sh` to stop anvil
    
    * feat(protocol/package.json): adds `anvil-devchain:...` (`start` and `stop`)
    
    * refactor(scripts/foundry): use `stop_anvil.sh` to stop anvil
    
    * refactor(migrations_sol): update `@migrations-sol` remapping
    
    Previous the remapping was called `@celo-migrations`.
    
    * docs(migrations_sol/README): renames README file
    
    Also changes title to match NPM package name. This is a matter of personal preference. IMO this is a small improvement in readability for 3rd party users.
    
    * docs(scripts/foundry): adds more links to `package.json`
    
    Adds `repository` and `directory` to `package.json`.
    This ensures npmjs.org displays hyperlinks to the github repository.
    
    * docs(migrations_sol/CONTRIBUTING): adds MVP dev docs
    
    We can complete this doc with additional information regarding the anvil devchain and migrations going forward.
    
    * docs(migrations_sol/README): adds "how we work" section
    
    This is helpful for 3rd party developers that found this package on npmjs.org.
    The links help developers take action and help improve the anvil devchain.
    
    * lint: function order
    
    * Soloseng/CHORE-update-workflow (#11029)
    
    * update workflow to run on push to release branches
    
    * ++ mintgoldschedule to migration test constants
    
    * initial validators contract review
    
    * Remove block gas limit flag for `governance/voting` CI tests
    
    * bump version
    
    * ++ tests && format
    
    * removed comments
    
    * getValidatorGroupSlashingMultiplier allowed only on L1
    
    * reverting changes to test contract size issue
    
    * minimal changes
    
    * allow slashing multiplier reset on L2
    
    ---------
    
    Co-authored-by: Arthur Gousset <[email protected]>
    soloseng and arthurgousset authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    26ddf3c View commit details
    Browse the repository at this point in the history
  2. COP, KES, USDT Oracle config (#10984)

    * Yaml file drafts
    
    * Update COPUSD Config
    
    * Update KESUSD and rename USDKES.yaml to KESUSD.yaml
    
    * Rename USDCOP.yaml to COPUSD.yaml
    
    * Adding KESUSD data source
    
    * CELOKES and KESUSD config
    
    * chore: test USDTUSD config
    
    * fix: remove openexchangerates from kesusd
    
    * chore: add pair constants
    
    * chore: add alfajores & baklava kesusd and usdtusd addresses
    
    * fix: use pnpm instead of yarn
    
    * fix: update min oracles for CELOKES
    
    * chore: add mainnet kes hsms
    
    * USDTUSD config from Nadiem
    
    * test: proof of concept 2e2 test using anvil devchain (#11020)
    
    * chore(test-sol/FeeCurrencyDirectory)): use `@celo-...` remapping not `../..`
    
    * test(test-sol/FeeCurrencyDirectory)): MVP e2e test
    
    MVP demo of an e2e test using the devchain. This is not the pattern I'll suggest, but good to see the test passes end-to-end.
    
    * chore(foundry.toml): adds `@test-sol` remapping
    
    * chore(test-sol/e2e): adds MVP `utils.sol`
    
    Idea is to have a Devchain class that can be inherited by Test contracts to have access to the deployed contracts on the devchain.
    
    * test(FeeCurrencyDirectory): MVP test using `Devchain` class
    
    * chore(migrations_sol): adds MVP script to run e2e tests
    
    * style(test-sol/e2e): linting
    
    * refactor(test-sol/FeeCurrencyDirectory): moves file to `.../e2e/`
    
    * chore(migrations_sol): use `test-sol/e2e/*` path
    
    * chore(test-sol/FeeCurrencyDirectory): match contract name in unit and e2e test
    
    * style(test-sol/FeeCurrencyDirectory): linting
    
    * chore(e2e/utils): removes unused imports and more
    
    Cleans up
    Adds `TODO` comments
    
    * test(test-sol/e2e): renames contract with "E2E..."
    
    I'm temporarily adding the "E2E..." prefix to the contract so I can exclude this test and the integration tests during the CI run.
    
    In a separate PR, I'll refactor the tests into a directory structure like:
    
    ```
    test-sol/unit/
    test-sol/e2e/
    test-sol/integration/
    ```
    
    That way we could run tests with something like this:
    
    ```
    # unit tests
    forge test --match-path "*test-sol/unit/*"
    
    # e2e tests
    forge test --match-path "*test-sol/e2e/*"
    
    # integration tests
    forge test --match-path "*test-sol/integration/*"
    ```
    
    * chore(workflows/protocol_tests): excludes e2e test from workflow
    
    I'm temporarily adding the "E2E..." prefix to the contract so I can exclude this test and the integration tests during the CI run.
    
    In a separate PR, I'll refactor the tests into a directory structure like:
    
    ```
    test-sol/unit/
    test-sol/e2e/
    test-sol/integration/
    ```
    
    That way we could run tests with something like this:
    
    ```
    # unit tests
    forge test --match-path "*test-sol/unit/*"
    
    # e2e tests
    forge test --match-path "*test-sol/e2e/*"
    
    # integration tests
    forge test --match-path "*test-sol/integration/*"
    ```
    
    * style(test-sol/e2e): linting
    
    * chore(e2e): temporarily renames contract with "E2E..."
    
    In subsequent PRs, I'll rename this more accurately.
    
    * chore: latest deployed images
    
    * feat: add ReserveSpenderMultiSig to anvil migrations (#11028)
    
    * feat(migrations_sol/migrationsConfig): adds `reserveSpenderMultiSig` configs
    
    * feat(migrations_sol): adds `migrateReserveSpenderMultiSig`
    
    Also adds contract calls in `migrateReserve` function.
    Not tested, and not sure this works yet. I might be missing some changes.
    
    * chore(test-sol/utils): adds `ReserveSpenderMultiSig.t.sol`
    
    From the code comment:
    
      The purpose of this file is not to provide test coverage for `ReserveSpenderMultiSig.sol`.
      This is an empty test to force foundry to compile `ReserveSpenderMultiSig.sol`, and include its
      artifacts in the `/out` directory. `ReserveSpenderMultiSig.sol` is needed in the migrations
      script, but because it's on Solidity 0.5 it can't be imported there directly.
      If there is a better way to force foundry to compile `ReserveSpenderMultiSig.sol` without
      this file, this file can confidently be deleted.
    
    * feat(migrations_sol/HelperInterFaces): adds `IReserveSpenderMultiSig`
    
    The helper interface is used as a workaround to allow the migrations script (`Migrations.s.sol`) to be on Solidity 0.8, while the ReserveSpenderMultiSig contract is on Solidity 0.5. The migration script only needs to initialize the contract, which is why the helper interface only defines an `initialize` function.
    
    * chore(migrations_sol): initialize `ReserveSpenderMultiSig`
    
    * chore(migrations_sol): adds code comment for readability
    
    * chore(migrations_sol): improves code comment, moves code block up
    
    * chore(migrations_sol): fix typo
    
    * style(migrations_sol): linting
    
    * test: refactor foundry test directory into unit, e2e, and integration tests (#11023)
    
    * chore(foundry.toml): adds `@mento-core/...` remapping
    
    Also moves existing mappings into groups for better readability
    
    * refactor(test-sol/common): moves files to `unit/common/`
    
    Also updates imports respectively using remappings.
    
    * refactor(test-sol/identity): moves files to `unit/identity/`
    
    Also updates imports using remappings where necessary.
    
    * refactor(test-sol/stability): moves files to `unit/stability/`
    
    Also updates imports using remappings where necessary.
    
    * refactor(test-sol/voting): moves files to `unit/voting/`
    
    Also updates imports using remappings where necessary.
    
    * refactor(test-sol/governance): moves files to `unit/governance/`
    
    Also updates imports using remappings where necessary.
    
    * chore(test-sol): update missing remappings
    
    With these changes all contracts compile and resolve correctly.
    
    * chore(workflows/protocol_tests): updates paths to `test-sol/unit`
    
    * chore(workflows/protocol_tests): adds integration and e2e tests
    
    * style(workflows/protocol_tests): refactors `forge test` for better readability
    
    * chore(migrations_sol): moves scripts to `scripts/foundry/
    
    Moves all bash scripts from `migrations_sol` to `scripts/foundry/`, and updates paths where necessary. We already have a directory for `scripts/truffle/` and `scripts/bash/`, so this makes it easier to find foundry-related bash scripts.
    
    * test(governance/mock): move `MockGovernance` to `unit/` folder
    
    * refactor(foundry.toml): rename `migrations-sol/` remapping
    
    * refactor(workflows): refactor "run everything" step
    
    Runs all tests in the `unit/` directory instead of all test files in the repo.
    This makes sense from my perspective, because e2e tests (in the `e2e/` directory) and integration tests (in the `integration/` directory) require a connection to an anvil devchain serving at localhost.
    
    The intent of this command is to ensure that no unit tests are forgotten, since unit tests are run explicitly by going through the directories above. But, the intention is not to run all tests in the repo generally.
    
    * style(workflows/protocol-devchain-anvil): splits migration into 2 steps
    
    This helps the script becoming more readable, and ensure error logs are clearly associated with a workflow step rather than a single bash script.
    
    * chore(workflows): defines `ANVIL_PORT` env variable in workflow
    
    Previously, the `$ANVIL_PORT` variable was exported and passed around as an env variable in a bash script.
    
    But that required generating anvil migrations and running a devchain repeatedly.
    Instead, the workflow does that once and different steps can access the devchain.
    
    But, in that case the env variable is not passed around, so it has to be defined at the workflow level.
    
    Source: https://docs.github.com/en/actions/learn-github-actions/variables
    
    * chore(workflows/protocol_tests): removes code comment
    
    * feat(scripts/foundry): adds `stop_anvil.sh`
    
    * refactor(scripts/foundry): use `stop_anvil.sh` to stop anvil
    
    * feat(protocol/package.json): adds `anvil-devchain:...` (`start` and `stop`)
    
    * refactor(scripts/foundry): use `stop_anvil.sh` to stop anvil
    
    * refactor(migrations_sol): update `@migrations-sol` remapping
    
    Previous the remapping was called `@celo-migrations`.
    
    * docs(migrations_sol/README): renames README file
    
    Also changes title to match NPM package name. This is a matter of personal preference. IMO this is a small improvement in readability for 3rd party users.
    
    * docs(scripts/foundry): adds more links to `package.json`
    
    Adds `repository` and `directory` to `package.json`.
    This ensures npmjs.org displays hyperlinks to the github repository.
    
    * docs(migrations_sol/CONTRIBUTING): adds MVP dev docs
    
    We can complete this doc with additional information regarding the anvil devchain and migrations going forward.
    
    * docs(migrations_sol/README): adds "how we work" section
    
    This is helpful for 3rd party developers that found this package on npmjs.org.
    The links help developers take action and help improve the anvil devchain.
    
    * Soloseng/CHORE-update-workflow (#11029)
    
    * update workflow to run on push to release branches
    
    * ++ mintgoldschedule to migration test constants
    
    * set celo-foundry to 0.5
    
    * force CI test after changing PR base
    
    ---------
    
    Co-authored-by: Nadiem Sissouno <[email protected]>
    Co-authored-by: Nadiem Sissouno <[email protected]>
    Co-authored-by: Nelson Taveras <[email protected]>
    Co-authored-by: Arthur Gousset <[email protected]>
    Co-authored-by: soloseng <[email protected]>
    6 people authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    0f7753e View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2024

  1. Soloseng/update-celo-L2-distribution-logic (#11045)

    * modified L2 CELO distribution logic
    
    * rename functions
    
    * ++ more name changes
    
    * change more variable names
    
    * ∆ gold to celo in contract
    
    * contract rename
    
    * forgotten names
    soloseng authored Jun 21, 2024
    Configuration menu
    Copy the full SHA
    1d553de View commit details
    Browse the repository at this point in the history
  2. Celo token totalSupply() update (#11081)

    * total supply update
    
    * lint
    
    * lint2
    
    * hardcode L2toL1MessagePasser
    
    * revert increaseSupply
    
    * update goldtoken
    pahor167 authored Jun 21, 2024
    Configuration menu
    Copy the full SHA
    9f875b9 View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. Update npm package versioning script to be compatible with other pack…

    …ages (#11041)
    
    * updated script to allow for versioning devchain-anvil package
    
    * run in PR as well
    
    * reorg workflow to install node
    
    * fixed utils test
    
    * ++ workflow dispatch
    soloseng authored Jun 24, 2024
    Configuration menu
    Copy the full SHA
    79abd48 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2024

  1. Soloseng/bytecode-tooling-fix (#11092)

    * use the existing `build_artifacts` arg to also fetch 0.8 contracts
    
    * git force run tests
    soloseng authored Jun 26, 2024
    Configuration menu
    Copy the full SHA
    c9174f9 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. Configuration menu
    Copy the full SHA
    519ee36 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2024

  1. Configuration menu
    Copy the full SHA
    cb652dd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    149c92b View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. Add Support for CeloToken Name in Registry (#11080)

    * Updated Using registry v2
    
    * using ICeloToken interface in distribution
    
    * updated contracts to use `getCeloToken` instead of `getGoldToken`
    
    * Changed `GOLD_TOKEN_REGISTRY_ID` to `CELO_TOKEN_REGISTRY_ID` throughtout repo
    
    * fix tests
    
    * replaced gold with celo
    
    * updated migrations
    
    * Bump version
    
    * ++ celoToken & lockedCelo to registry during migration
    
    * removed celoToken and LockedCelo from bytecode check
    
    * update interface
    
    * fixed LockedGold migration
    
    * fix test
    
    * ∆ gold name
    soloseng authored Jul 1, 2024
    Configuration menu
    Copy the full SHA
    e7710e2 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2024

  1. Soloseng/revert-celo-total-supply-changes (#11093)

    * initial work
    
    * accounting debug
    
    * disable CELO transfers to celoDistribution schedule
    
    * removed debug logs
    
    * ++ celoDistributionSchedule to `usingRegistry` contract.
    
    * Moved setting registry address to initialize function
    
    * ∆ execution order
    
    * updated release data
    
    * updated variable name in test
    
    * test fix
    
    * ++ native transfer test
    soloseng authored Jul 2, 2024
    Configuration menu
    Copy the full SHA
    3a0a771 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. refactor: reads supported Foundry version from an environment variable (

    #11046)
    
    refactor(workflows): reads supported Foundry version from env variable
    arthurgousset authored Jul 3, 2024
    Configuration menu
    Copy the full SHA
    7dfd467 View commit details
    Browse the repository at this point in the history
  2. Soloseng/publishing-version-fix (#11105)

    * set override the default version
    
    * ++ npm tag in workflow trigger
    
    * PR feedback
    soloseng authored Jul 3, 2024
    Configuration menu
    Copy the full SHA
    539463c View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2024

  1. feat(foundry): publish L2 state in @celo/devchain-anvil (#11107)

    * refactor(scripts/foundry): moves `run_e2e_tests...sh` file
    
    Small house-keeping change to keep Foundry-related bash scripts organised in a single directory. This script doesn't seem to be called from anywhere, and doesn't have a yarn command in `package.json` so it was fine to move it without any changes in other files.
    
    * feat(package.json): adds yarn commands for e2e and integration tests
    
    Two helper commands to run two Foundry-related bash scripts during local development.
    
    * refactor(migrations_sol): groups imports for better readability
    
    * feat(scripts/foundry): adds MVP L2 migration script
    
    Successfully deploys bytecode to `proxyAdminAddress`.
    Does not yet dump state correctly, or call functions to active L2 correctly.
    
    * feat(package.json): adds two helper yarn commands
    
    1. `anvil-devchain:start-L2`: which creates and migrates an L2 devchain
    2. `anvil-devchain:check-is-running`: which can be used to check that an anvil instance is running locally and serving at localhost:8546
    
    * chore(migrations_sol): fix typo in function name
    
    * chore(migrations_sol): nit simplifies code comment for better readability
    
    * feat(scripts/foundry): activates CeloDistributionSchedule
    
    Now successfully activates CeloDistributionSchedule.
    Does not yet dump state correctly
    
    * refactor(scripts/foundry): moves variables to `constants.sh`
    
    Simplifies maintenance and readability of scripts.
    
    * refactor(scripts/foundry): moves more variables to `constants.sh`
    
    Simplifies maintenance and readability of scripts.
    
    * refactor(constants.sh): read bytecode from Foundry instead of Truffle
    
    * chore(scripts/foundry): adds TODO comment
    
    At this point, the migration works as intended and the L2 is activated.
    But, I haven't yet saved the devchain state file.
    I'll need to refactor the way the L1 and L2 move the state file around.
    
    * refactor(scripts/foundry): rename to `create_and_migrate_anvil_l2_devchain.sh`
    
    To keep it consistent with the L1 script
    
    * style(migrations_sol): linting
    
    * chore(scripts/foundry): remove debugging statements
    
    * refactor(constants): adds L1 and L2 state file names
    
    * feat(scripts/foundry): successfully dumps L2 state
    
    * refactor(constants): uses `$ANVIL_RPC_URL` instead of hardcoded URL
    
    * refactor(constants): moves libraries to constants
    
    * fix(constants): adds `$PWD` to prevent errors on CI
    
    On CI it seems like `jq` doesn't find the artifacts without an explicit path
    
    ```sh
    ./scripts/foundry/create_and_migrate_anvil_devchain.sh
      shell: /usr/bin/bash -e {0}
      env:
        FOUNDRY_CACHE_KEY: 2
        SUPPORTED_FOUNDRY_VERSION: nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9
        ANVIL_PORT: 8546
    jq: error: Could not open file build/contracts/Registry.json: No such file or directory
    jq: error: Could not open file build/contracts/Proxy.json: No such file or directory
    ```
    
    Source: https://github.com/celo-org/celo-monorepo/actions/runs/9808280627/job/27083755032#step:18:9
    
    * chore(workflows): debugging `jq` error on CI
    
    Can't find build artifacts on CI, so trying to work out what might be wrong.
    
    * fix(constants): moves bytecode operation back into scripts
    
    Since the constants are read before any foundry compilation occured, the constants can't read from the Foundry artifacts. Locally, I missed this because I had existing artifacts from previous compilations.
    
    * chore(workflows): debugging `jq` CI error
    
    * fix(scripts/foundry): uses Foundry `out/` directory
    
    Mistakenly read artifacts from Truffle's `build/` directory. Took a while to remember that Foundry write artifacts to `out/`.
    
    Source: https://book.getfoundry.sh/reference/forge/forge-build#build-modes
    
    * chore(scripts/foundry): removes debugging statement
    
    * feat(package.json): updates yarn command names
    
    * docs(CONTRIBUTING): updates yarn command docs
    
    * chore(workflows): add back NPM install step
    
    Not confident enough to remove it in this PR.
    
    * chore(workflows): removes code comment
    
    * feat(workflows): publishes L1 and L2 state
    
    Also updates integration test to explicitly run against L1 devchain, and not L2 devchain.
    
    * fix(scripts/foundry): remove unnecessary `stop_anvil` call
    
    CI doesn't like `lsof` command in `stop_anvil.sh`
    
    ```sh
    /runner/_work/celo-monorepo/celo-monorepo/packages/protocol/scripts/foundry/stop_anvil.sh: line 10: lsof: command not found
    kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
    ```
    
    Source: https://github.com/celo-org/celo-monorepo/actions/runs/9811181588/job/27092901761?pr=11107#step:19:7073
    
    * refactor(workflows): replace CI env with variable from `constants.sh`
    
    Simplifies code and makes it easier to update ports in a single place.
    
    * fix(workflows): adds back `stop_anvil.sh` and installs `lsof` explicitly
    
    CI fails if I don't explicitly kill an existing anvil server, so I decided to install `lsof` which is used by `stop_anvil.sh` to kill processes.
    
    ```sh
    error binding to 127.0.0.1:8546: error creating server listener: Address already in use (os error 98)
    ```
    
    Source: https://github.com/celo-org/celo-monorepo/actions/runs/9811346558/job/27093342967?pr=11107#step:20:30
    
    * chore(scripts/foundry): removes code comment
    
    * fix(workflows): install `lsof` in the same step
    
    Not sure if that's the bug, but the last run where the installation and use was in different steps didn't work.
    
    * fix(workflows): hacky fix to run L2 anvil
    
    I'm struggling to terminate the previous anvil server and re-start a new anvil server at the same address (local host 8546).
    
    I tried to work around cumbersome CI environment issues (`lsof` which we use to identify the process is not available on CI).
    
    For now, as a quick fix, I'll start anvil at an arbitrary different port 8547 and run the test against that localhost 8547.
    
    I'll need to refactor this better.
    
    * refactor(scripts/foundry): simplifying `lsof` query to find PID
    
    * fix(workflows): try to terminate anvil server again
    
    * fix(workflows): hacky workaround to prevent Anvil bug when loading state
    
    Starting L1 from scratch instead of JSON state to circumvent this Anvil bug foundry-rs/foundry#7502.
    
    * Update .github/workflows/protocol-devchain-anvil.yml
    
    Co-authored-by: soloseng <[email protected]>
    
    * Update .github/workflows/protocol-devchain-anvil.yml
    
    Co-authored-by: soloseng <[email protected]>
    
    * feat(constants): set CeloDistributionSchedule initial balance to 700M CELO
    
    Arbitrary amount chosen to be approximately equal to `GoldToken.totalSupply()` on the L1 Mainnet (695,313,643 CELO as of this commit). During the real L2 genesis, the VM will calculate and set an appropriate balance.
    
    ```sh
    # Get address of GoldToken
    $ cast call \
    0x000000000000000000000000000000000000ce10 \
    "getAddressForStringOrDie(string calldata identifier)(address)" \
    "GoldToken" \
    --rpc-url https://forno.celo.org
    0x471EcE3750Da237f93B8E339c536989b8978a438
    
    # Call `totalSupply()` on `GoldToken.sol`
    $ cast call \
    0x471EcE3750Da237f93B8E339c536989b8978a438 \
    "totalSupply()(uint256)" \
    --rpc-url https://forno.celo.org
    695313643195035937058427065 [6.953e26]
    
    # Convert units from wei to ether
    $ cast to-unit 695313643195035937058427065 ether
    695313643.195035937058427065
    ```
    
    * docs(README): improves README
    
    More context, examples, background, files in the package.
    
    ---------
    
    Co-authored-by: soloseng <[email protected]>
    arthurgousset and soloseng authored Jul 12, 2024
    Configuration menu
    Copy the full SHA
    5c401a3 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. chore: update CeloDistributionSchedule initial balance (#11140)

    chore(constant): fix CeloDistributionSchedule initial balance
    arthurgousset authored Jul 15, 2024
    Configuration menu
    Copy the full SHA
    a775d99 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2024

  1. L2 Governance Hotfix (#11014)

    * lint: function ordering
    
    * Deprecate L1 hotfix;
    Implement L2 hotfix;
    
    * BUMP version
    
    * prepare hotfix on L2
    
    * cleanup
    
    * ++ setters and checks
    
    * ++ more test cases
    
    * PR feedback
    
    * PR feedback
    
    * PR feedback
    
    * resetHotfix is public
    
    * test: proof of concept 2e2 test using anvil devchain (#11020)
    
    * chore(test-sol/FeeCurrencyDirectory)): use `@celo-...` remapping not `../..`
    
    * test(test-sol/FeeCurrencyDirectory)): MVP e2e test
    
    MVP demo of an e2e test using the devchain. This is not the pattern I'll suggest, but good to see the test passes end-to-end.
    
    * chore(foundry.toml): adds `@test-sol` remapping
    
    * chore(test-sol/e2e): adds MVP `utils.sol`
    
    Idea is to have a Devchain class that can be inherited by Test contracts to have access to the deployed contracts on the devchain.
    
    * test(FeeCurrencyDirectory): MVP test using `Devchain` class
    
    * chore(migrations_sol): adds MVP script to run e2e tests
    
    * style(test-sol/e2e): linting
    
    * refactor(test-sol/FeeCurrencyDirectory): moves file to `.../e2e/`
    
    * chore(migrations_sol): use `test-sol/e2e/*` path
    
    * chore(test-sol/FeeCurrencyDirectory): match contract name in unit and e2e test
    
    * style(test-sol/FeeCurrencyDirectory): linting
    
    * chore(e2e/utils): removes unused imports and more
    
    Cleans up
    Adds `TODO` comments
    
    * test(test-sol/e2e): renames contract with "E2E..."
    
    I'm temporarily adding the "E2E..." prefix to the contract so I can exclude this test and the integration tests during the CI run.
    
    In a separate PR, I'll refactor the tests into a directory structure like:
    
    ```
    test-sol/unit/
    test-sol/e2e/
    test-sol/integration/
    ```
    
    That way we could run tests with something like this:
    
    ```
    # unit tests
    forge test --match-path "*test-sol/unit/*"
    
    # e2e tests
    forge test --match-path "*test-sol/e2e/*"
    
    # integration tests
    forge test --match-path "*test-sol/integration/*"
    ```
    
    * chore(workflows/protocol_tests): excludes e2e test from workflow
    
    I'm temporarily adding the "E2E..." prefix to the contract so I can exclude this test and the integration tests during the CI run.
    
    In a separate PR, I'll refactor the tests into a directory structure like:
    
    ```
    test-sol/unit/
    test-sol/e2e/
    test-sol/integration/
    ```
    
    That way we could run tests with something like this:
    
    ```
    # unit tests
    forge test --match-path "*test-sol/unit/*"
    
    # e2e tests
    forge test --match-path "*test-sol/e2e/*"
    
    # integration tests
    forge test --match-path "*test-sol/integration/*"
    ```
    
    * style(test-sol/e2e): linting
    
    * chore(e2e): temporarily renames contract with "E2E..."
    
    In subsequent PRs, I'll rename this more accurately.
    
    * feat: add ReserveSpenderMultiSig to anvil migrations (#11028)
    
    * feat(migrations_sol/migrationsConfig): adds `reserveSpenderMultiSig` configs
    
    * feat(migrations_sol): adds `migrateReserveSpenderMultiSig`
    
    Also adds contract calls in `migrateReserve` function.
    Not tested, and not sure this works yet. I might be missing some changes.
    
    * chore(test-sol/utils): adds `ReserveSpenderMultiSig.t.sol`
    
    From the code comment:
    
      The purpose of this file is not to provide test coverage for `ReserveSpenderMultiSig.sol`.
      This is an empty test to force foundry to compile `ReserveSpenderMultiSig.sol`, and include its
      artifacts in the `/out` directory. `ReserveSpenderMultiSig.sol` is needed in the migrations
      script, but because it's on Solidity 0.5 it can't be imported there directly.
      If there is a better way to force foundry to compile `ReserveSpenderMultiSig.sol` without
      this file, this file can confidently be deleted.
    
    * feat(migrations_sol/HelperInterFaces): adds `IReserveSpenderMultiSig`
    
    The helper interface is used as a workaround to allow the migrations script (`Migrations.s.sol`) to be on Solidity 0.8, while the ReserveSpenderMultiSig contract is on Solidity 0.5. The migration script only needs to initialize the contract, which is why the helper interface only defines an `initialize` function.
    
    * chore(migrations_sol): initialize `ReserveSpenderMultiSig`
    
    * chore(migrations_sol): adds code comment for readability
    
    * chore(migrations_sol): improves code comment, moves code block up
    
    * chore(migrations_sol): fix typo
    
    * style(migrations_sol): linting
    
    * test: refactor foundry test directory into unit, e2e, and integration tests (#11023)
    
    * chore(foundry.toml): adds `@mento-core/...` remapping
    
    Also moves existing mappings into groups for better readability
    
    * refactor(test-sol/common): moves files to `unit/common/`
    
    Also updates imports respectively using remappings.
    
    * refactor(test-sol/identity): moves files to `unit/identity/`
    
    Also updates imports using remappings where necessary.
    
    * refactor(test-sol/stability): moves files to `unit/stability/`
    
    Also updates imports using remappings where necessary.
    
    * refactor(test-sol/voting): moves files to `unit/voting/`
    
    Also updates imports using remappings where necessary.
    
    * refactor(test-sol/governance): moves files to `unit/governance/`
    
    Also updates imports using remappings where necessary.
    
    * chore(test-sol): update missing remappings
    
    With these changes all contracts compile and resolve correctly.
    
    * chore(workflows/protocol_tests): updates paths to `test-sol/unit`
    
    * chore(workflows/protocol_tests): adds integration and e2e tests
    
    * style(workflows/protocol_tests): refactors `forge test` for better readability
    
    * chore(migrations_sol): moves scripts to `scripts/foundry/
    
    Moves all bash scripts from `migrations_sol` to `scripts/foundry/`, and updates paths where necessary. We already have a directory for `scripts/truffle/` and `scripts/bash/`, so this makes it easier to find foundry-related bash scripts.
    
    * test(governance/mock): move `MockGovernance` to `unit/` folder
    
    * refactor(foundry.toml): rename `migrations-sol/` remapping
    
    * refactor(workflows): refactor "run everything" step
    
    Runs all tests in the `unit/` directory instead of all test files in the repo.
    This makes sense from my perspective, because e2e tests (in the `e2e/` directory) and integration tests (in the `integration/` directory) require a connection to an anvil devchain serving at localhost.
    
    The intent of this command is to ensure that no unit tests are forgotten, since unit tests are run explicitly by going through the directories above. But, the intention is not to run all tests in the repo generally.
    
    * style(workflows/protocol-devchain-anvil): splits migration into 2 steps
    
    This helps the script becoming more readable, and ensure error logs are clearly associated with a workflow step rather than a single bash script.
    
    * chore(workflows): defines `ANVIL_PORT` env variable in workflow
    
    Previously, the `$ANVIL_PORT` variable was exported and passed around as an env variable in a bash script.
    
    But that required generating anvil migrations and running a devchain repeatedly.
    Instead, the workflow does that once and different steps can access the devchain.
    
    But, in that case the env variable is not passed around, so it has to be defined at the workflow level.
    
    Source: https://docs.github.com/en/actions/learn-github-actions/variables
    
    * chore(workflows/protocol_tests): removes code comment
    
    * feat(scripts/foundry): adds `stop_anvil.sh`
    
    * refactor(scripts/foundry): use `stop_anvil.sh` to stop anvil
    
    * feat(protocol/package.json): adds `anvil-devchain:...` (`start` and `stop`)
    
    * refactor(scripts/foundry): use `stop_anvil.sh` to stop anvil
    
    * refactor(migrations_sol): update `@migrations-sol` remapping
    
    Previous the remapping was called `@celo-migrations`.
    
    * docs(migrations_sol/README): renames README file
    
    Also changes title to match NPM package name. This is a matter of personal preference. IMO this is a small improvement in readability for 3rd party users.
    
    * docs(scripts/foundry): adds more links to `package.json`
    
    Adds `repository` and `directory` to `package.json`.
    This ensures npmjs.org displays hyperlinks to the github repository.
    
    * docs(migrations_sol/CONTRIBUTING): adds MVP dev docs
    
    We can complete this doc with additional information regarding the anvil devchain and migrations going forward.
    
    * docs(migrations_sol/README): adds "how we work" section
    
    This is helpful for 3rd party developers that found this package on npmjs.org.
    The links help developers take action and help improve the anvil devchain.
    
    * Soloseng/CHORE-update-workflow (#11029)
    
    * update workflow to run on push to release branches
    
    * ++ mintgoldschedule to migration test constants
    
    * fixed inheritance
    
    * added pretest check
    
    ---------
    
    Co-authored-by: Arthur Gousset <[email protected]>
    Co-authored-by: Leszek Stachowski <[email protected]>
    3 people authored Jul 16, 2024
    Configuration menu
    Copy the full SHA
    98164b1 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2024

  1. Added Check to CeloDistributionSchedule activate function (#11109)

    * added check to activate function
    
    * Updated function name
    
    * changed the check to make sure that the address set in the goldToken contract is actually the celoDistributionSchedule contract address
    
    * Use celoDistributionSchedule address set in registry instead of setting in CeloToken contract manually
    
    * PR feedback
    
    * ++ celo distribution schedule to registry
    
    * updated path and added missing address to registry
    
    * using 0.8 artifacts
    
    * ++ comment
    soloseng authored Jul 18, 2024
    Configuration menu
    Copy the full SHA
    562fcf0 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2024

  1. test: forge test should be all green and exclude tests that require…

    … anvil (#11148)
    
    * test(devchain/e2e): moves e2e demo test into new `devchain/` directory
    
    This allows us to exclude all tests in the `devchain/` directory when running `forge test`
    
    * test(devchain/migration): renames migration test to Migration.t.sol
    
    Previously this was called Integration.t.sol, but that's not super obvious naming.
    
    * feat(foundry.toml): excludes `/devchain` directory when running `forge test`
    
    * feat(foundry.toml): adds profile for tests that require a devchain
    
    The configs of this profile extend or overwrite the default profile. That means we can customise the `match_path` and `no_match_path` configs in that profile and run `forge test` with that profile by passing an environment variable `FOUNDRY_PROFILE=devchain`.
    
    For example, once a devchain is serving at localhost:
    
    ```sh
    FOUNDRY_PROFILE=devchain forge test -vvv \
    --match-path "test-sol/devchain/e2e/*" \
    --fork-url $ANVIL_RPC_URL
    [⠒] Compiling...
    No files changed, compilation skipped
    
    Ran 1 test for test-sol/devchain/e2e/common/FeeCurrencyDirectory.t.sol:E2EDemo
    [PASS] test_ShouldAllowOwnerSetCurrencyConfig() (gas: 94493)
    Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 12.92ms (2.35ms CPU time)
    
    Ran 1 test suite in 164.71ms (12.92ms CPU time): 1 tests passed, 0 failed, 0 skipped (1 total tests)
    ```
    
    * docs(devchain/README): adds documentation for future reference
    
    * feat(workflows): adds profile env variable to CI workflows
    
    This ensures that the correct profile is consumed on CI and the correct tests are run.
    
    * feat(workflows): adds profile env variable to CI workflows
    
    This ensures that the correct profile is consumed on CI and the correct tests are run.
    
    * Trigger Build
    
    * docs(README): add note on devchain tests
    
    Co-authored-by: Martín Volpe <[email protected]>
    
    ---------
    
    Co-authored-by: alvarof2 <[email protected]>
    Co-authored-by: Martín Volpe <[email protected]>
    3 people authored Jul 19, 2024
    Configuration menu
    Copy the full SHA
    d464ce5 View commit details
    Browse the repository at this point in the history
  2. refactor: use constants across test-sol/ and migrations_sol/ (#11143

    )
    
    * feat(test-sol/constants): adds registryAddress and proxyAdminAddress
    
    * style(test-sol/constants): improves code comment
    
    * refactor(test-sol/e2e/utils): use `REGISTRY_ADDRESS`
    
    * refactor(migrations_sol): rename to `MigrationsConstants`
    
    To avoid import clashes when importing `TestConstants` from `test-sol` as well.
    Previously, both classes were called `Constants`, which leads to import clashes.
    
    * refactor(test-sol): rename to `TestConstants`
    
    To avoid import clashes when importing `MigrationsConstants` from `migrations_sol` as well.
    Previously, both classes were called `Constants`, which leads to import clashes.
    
    * refactor(Integration.t.sol): use `REGISTRY_ADDRESS`
    
    * refactor(RevokeCeloAfterL2Transition.sol): use `REGISTRY_ADDRESS`
    
    * refactor(RevokeCeloAfterL2Transition.sol): use constants
    
    * refactor(Accounts.t.sol): use constants
    
    * refactor(CeloDistributionSchedule): use constants in `setUp()`
    
    * refactor(CeloDistributionSchedule): use constants across file
    
    * test(CeloDistributionSchedule): revert to previous variable in broken test
    
    This test fails with this change
    
    ```diff
    - celoDistributionSchedule.initialize(registryAddress);
    + celoDistributionSchedule.initialize(REGISTRY_ADDRESS);
    ```
    
    ```sh
    forge test -vvv \
    --match-path "test-sol/unit/*"
    
    Failing tests:
    Encountered 1 failing test in test-sol/unit/common/CeloDistributionSchedule.t.sol:CeloDistributionScheduleTest_activate
    [FAIL. Reason: call reverted as expected, but without data] test_Reverts_WhenRegistryNotUpdated() (gas: 1877202)
    
    Encountered a total of 1 failing tests, 2202 tests succeeded
    ```
    
    But, passes with this change:
    
    ```diff
    - celoDistributionSchedule.initialize(registryAddress);
    + celoDistributionSchedule.initialize(PROXY_ADMIN_ADDRESS);
    ```
    
    ```sh
    $ forge test -vvv \
    --match-path "test-sol/unit/*"
    
    # ...
    Ran 360 test suites in 4.60s (11.71s CPU time): 2203 tests passed, 0 failed, 0 skipped (2203 total tests)
    ```
    
    I can sort of see why that's the case. In the current `setUp()` function the L2 is activated by arbitrarily deploying `Registry.sol` bytecode to the `proxyAdminAddress`.
    
    https://github.com/celo-org/celo-monorepo/blob/9d0276d9fd47471667ff577165f92d45e76a18c8/packages/protocol/test-sol/unit/common/CeloDistributionSchedule.t.sol#L68-L75
    
    My hunch is that this _empty_ Registry is then used in this test. Since it's empty these two `UsingRegistry()` getters fails as expected by this test
    
    https://github.com/celo-org/celo-monorepo/blob/9d0276d9fd47471667ff577165f92d45e76a18c8/packages/protocol/contracts-0.8/common/CeloDistributionSchedule.sol#L77-L79
    
    https://github.com/celo-org/celo-monorepo/blob/9d0276d9fd47471667ff577165f92d45e76a18c8/packages/protocol/contracts-0.8/common/UsingRegistry.sol#L82-L85
    
    https://github.com/celo-org/celo-monorepo/blob/9d0276d9fd47471667ff577165f92d45e76a18c8/packages/protocol/contracts/common/Registry.sol#L49-L53
    
    In my opinion, this is a janky way to test that the contract call reverts.
    
    My reasoning and things I'd change:
    1. `proxyAdminAddress` will not necessarily have `Registry` bytecode. _Any_ arbitrary bytecode activates the L2. So using that `proxyAdminAddress` is a valid `Registry` is not a good assumption.
    2. I'd create a new purposely empty Registry in this test, so it's obvious to the reader why the test fails.
    3. I'd update the test name since it's not obvious which contract the `Registry` is missing. Presumably it's the `CeloToken`, but it's not immediately obvious from the test name.
    
    I'll probably fix this in a separate PR.
    
    * refactor(FeeHandler.t.sol): use `REGISTRY_ADDRESS` constant
    
    * refactor(GasPriceMinimum.t.sol): use constants
    
    * refactor(GoldToken.t.sol): use `PROXY_ADMIN_ADDRESS`
    
    * fix(test-sol): import forgotten `TestConstants`
    
    All unit tests pass
    
    ```sh
    forge test -vvv \
    --match-path "test-sol/unit/*"
    ```
    
    * refactor(IsL2Check.t.sol): use `PROXY_ADMIN_ADDRESS`
    
    * refactor(BlockchainParamters.t.sol): use `PROXY_ADMIN_ADDRESS`
    
    * refactor(EpochRewards.t.sol): use `PROXY_ADMIN_ADDRESS`
    
    * refactor(GovernanceSlasher.t.sol): use constants
    
    * refactor(DoubleSigningSlasher.t.sol): use constants
    
    * refactor(DowntimeSlasher.t.sol): use constants
    
    * refactor(Validators.t.sol): use constants
    
    * refactor(Election.t.sol): use constants
    
    * refactor(LockedGold.t.sol): use constants
    
    * refactor(ReleaseGold.t.sol): use constants
    
    * refactor(Escrow.t.sol): use constants
    
    * refactor(FederatedAttestations.t.sol): use constants
    
    * refactor(OdisPayments.t.sol): use constants
    
    * style(GasPriceMinimum.t.sol): move import to top
    
    * style(Random.t.sol): use constants
    
    * feat(migrations_sol): import constants
    
    To avoid redefining them and having a variable name clash at compilation:
    
    ```sh
    Error (9097): Identifier already declared.
      --> test-sol/constants.sol:28:3:
       |
    28 |   address constant REGISTRY_ADDRESS = 0x000000000000000000000000000000000000ce10;
       |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Note: The previous declaration is here:
      --> migrations_sol/constants.sol:33:3:
       |
    33 |   address constant REGISTRY_ADDRESS = 0x000000000000000000000000000000000000ce10;
       |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       ```
    
    * style(test-sol): linting
    
    * chore(Governance.t.sol): updates to `TestConstants`
    
    * chore(Election.t.sol): uses named import `{ Utils }` for readability
    
    * chore(Governance.t.sol): updates to `TestConstants` in Contract
    
    * refactor(CeloDistributionSchedule.t.sol):  use `REGISTRY_ADDRESS`
    
    * test(CeloDistributionSchedule.t.sol): fix failing test due to merge conflict
    
    I made a mistake when resolving a conflict earlier and committed too much.
    This should fix the error, the test is all green now.
    arthurgousset authored Jul 19, 2024
    Configuration menu
    Copy the full SHA
    97e3f3c View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2024

  1. test: migrate FeeHandlerSeller.t.sol to foundry (#11155)

    * test(FeeHandlerSeller.t.sol): adds MVP contract outline
    
    Test is currently failing
    
    * test(FeeHandlerSeller.t.sol): use `GoldTokenMock` to work around missing transfer precompile
    
    Test passes as expected ✅
    
    * chore(FeeHandlerSeller.t.sol): remove unused code comments
    
    * test(FeeHandlerSeller.t.sol): add test for revert when not owner
    
    Test passes as expected ✅
    
    * style(FeeHandlerSeller.t.sol): improve function naming
    
    More explicit naming in compliance with VS code extension that suggests forge test naming.
    
    * test(FeeHandlerSeller.t.sol): add test for setMinimumReports
    
    Test passes as expected ✅
    
    * test(FeeHandlerSeller.t.sol): refactor constants and simplify tests
    
    All tests pass as expected ✅
    
    ```sh
    forge test -vvvv \
    --match-path "test-sol/unit/common/FeeHandlerSeller.t.sol"
    ```
    
    * test(FeeHandlerSeller.t.sol): remove unused imports
    
    All tests pass as expected ✅
    
    ```sh
    forge test -vvvv \
    --match-path "test-sol/unit/common/FeeHandlerSeller.t.sol"
    ```
    
    * test(feehandlerseller.ts): deletes TS test
    
    Fully migrated to foundry test.
    
    * refactor(FeeHandlerSeller.t.sol): use arbitrary token address
    
    All tests pass as expected ✅
    
    ```sh
    forge test -vvvv \
    --match-path "test-sol/unit/common/FeeHandlerSeller.t.sol"
    ```
    arthurgousset authored Jul 23, 2024
    Configuration menu
    Copy the full SHA
    e6dcb57 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2024

  1. test: migrate UniswapFeeHandlerSeller.t.sol to foundry (#11171)

    * test(UniswapFeeHandlerSeller.t.sol): adds MVP test outline
    
    First test passes as expected ✅
    
    ```sh
    forge test -vvvv \
    --match-path "test-sol/unit/common/UniswapFeeHandlerSeller.t.sol"
    ```
    
    * test(UniswapFeeHandlerSeller.t.sol): adds test for non-owner `setRouter` test
    
    All tests pass as expected ✅
    
    ```sh
    forge test -vvvv \
    --match-path "test-sol/unit/common/UniswapFeeHandlerSeller.t.sol"
    ```
    
    * test(UniswapFeeHandlerSeller.t.sol): adds test for setting router to zero address
    
    All tests pass as expected ✅
    
    ```sh
    forge test -vvvv \
    --match-path "test-sol/unit/common/UniswapFeeHandlerSeller.t.sol"
    ```
    
    * chore(UniswapFeeHandlerSeller.t.sol): debugging `expectRevert`
    
    I can't seem to get the contract to revert when the max number of routers are set per token. Although limit is hardcoded to 3, the `setRouter` function seems to accept more tokens than the limit.
    
    ```sh
    Logs:
      Setting router 0
      Setting router 1
      Setting router 2
      Setting router 3
      Setting router 4
      Setting router 5
      Setting router 6
      Setting router 7
      Setting router 8
      Setting router 9
      Routers for token: 1
      ```
    
    * fix(FeeHandlerSeller.t.sol): use distinct router addressees
    
    Fixes a bug in the test where I couldn't trigger the expected revert.
    
    * style(FeeHandlerSeller.t.sol): linting
    
    * test(FeeHandlerSeller.t.sol): adds test for large list and applies linting
    
    * refactor(FeeHandlerSeller.t.sol): removes setup() to improve readability
    
    * chore(FeeHandlerSeller.t.sol): adds code comment for context
    
    * test(uniswapfeehandlerseller.ts): removes TS test
    
    Fully covered by newly added Foundry test `UniswapFeeHandlerSeller.t.sol`
    arthurgousset authored Jul 26, 2024
    Configuration menu
    Copy the full SHA
    0cc2505 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2024

  1. refactor: remove unused code comment in Proxy.sol (#11174)

    * refactor(Proxy.sol): remove unused code comments
    
    This code change makes a test fail:
    test-sol/unit/common/ProxyFactory08.t.sol > test_verifyArtifacts
    
    ```sh
    $ forge test
    
    Failing tests:
    Encountered 1 failing test in test-sol/unit/common/ProxyFactory08.t.sol:ProxyFactoryTest
    [FAIL. Reason: panic: assertion failed (0x01)] test_verifyArtifacts() (gas: 188341)
    ```
    
    I'm not 100% certain but it's maybe because the `packages/protocol/artifacts/Proxy/proxyInitCode0.5.17+commit.d19bba13.hex` artifact is derived from the contract with the code comments.
    
    * refactor(ProxyFactory08.t.sol): simplify `getCode` arguments
    
    This is semantically equivalent, see https://book.getfoundry.sh/cheatcodes/get-code
    
    * chore(artifacts/Proxy): adds `bytecode`
    
    I simply copy/pasted the JSON value at `packages/protocol/out/Proxy.sol/Proxy.json` > `bytecode.object.`
    
    * chore(artifacts/Proxy): adds `bytecode`
    
    I simply copy/pasted the JSON value at `packages/protocol/out/Proxy.sol/Proxy.json` > `deployedBytecode.object.`
    
    * docs(artifacts/Proxy/README): adds a note for future reference
    
    * style(artifacts/Proxy/README): fix typo
    
    * style(artifacts/Proxy/README): fix typo
    arthurgousset authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    12e89e7 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2024

  1. refactor: uses L2Migration.s.sol and simplifies migration script (#…

    …11177)
    
    * refactor(constants.sh): renames target contract variable for better readability
    
    * fix(interfaces/ICeloDistributionSchedule): removes 1 argument from `activate` function
    
    As far as I can see, this interface was not defined correctly and had an argument too much.
    
    * refactor(MigrationL2.s.sol): moves `activate` call to script and refactors bash file
    
    Left two TODO comments.
    
    * refactor(constants): uses `DEPLOYER_ACCOUNT`
    
    * refactor(constant.sh): removes anvil private key (not used anymore)
    
    * refactor(Migrations.s.sol): add `setupUsingRegistry()` to improve readability
    
    * style(scripts/foundry): indent lines that don't start a command
    
    * feat(IEpochRewards): adds new interface
    
    * feat(UsingRegistry): adds EpochRewards
    
    * refactor(MigrationL2): gets fractions from EpochRewards.sol
    
    * chore(MigrationL2): delete console.log import
    
    * chore(MigrationL2): deletes `TODO` comment
    
    * style(protocol): linting
    
    * Test celo-monorepo.yml trigger filters
    
    * Remove useless workflow triggers
    
    * Run on repository runners
    
    ---------
    
    Co-authored-by: Javier Cortejoso <[email protected]>
    arthurgousset and jcortejoso authored Aug 9, 2024
    Configuration menu
    Copy the full SHA
    533ccd1 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2024

  1. Configuration menu
    Copy the full SHA
    264b957 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2024

  1. L2 devchain fix (#11200)

    * L2 devchain fix
    
    * fixes
    
    * artifact fixes
    pahor167 authored Sep 12, 2024
    Configuration menu
    Copy the full SHA
    c5eff1c View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. Configuration menu
    Copy the full SHA
    736fbc2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aa7b9bb View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2024

  1. Configuration menu
    Copy the full SHA
    38723bc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4d8de72 View commit details
    Browse the repository at this point in the history
  3. Bring back some functions removed since CR11 (#11239)

    * Bring back getHotfixRecord function
    
    * Bring back getMaxGroupSize
    
    * Bring back getRegisteredValidatorSigners
    
    ---------
    
    Co-authored-by: Martín Volpe <[email protected]>
    m-chrzan and martinvol authored Oct 7, 2024
    Configuration menu
    Copy the full SHA
    083aa85 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2024

  1. Epoch Manager "finishNextEpochProcessing" gas test (#11240)

    * Gas usage test
    
    * prettify
    
    * Isolate test run
    
    * removal of struct
    
    * Update gas test
    
    * prettify
    
    * refactor test a bit
    
    * added another gas test
    
    * prettify
    pahor167 authored Oct 11, 2024
    Configuration menu
    Copy the full SHA
    089d63e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d94a1d View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2024

  1. Configuration menu
    Copy the full SHA
    ceb103c View commit details
    Browse the repository at this point in the history
  2. Score manager gas optimization (#11246)

    * Score manager gas optimization
    
    * prettify
    
    * PR comments
    
    ---------
    
    Co-authored-by: Martín Volpe <[email protected]>
    pahor167 and martinvol authored Oct 13, 2024
    Configuration menu
    Copy the full SHA
    ce91ccc View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2024

  1. Configuration menu
    Copy the full SHA
    adb93e8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ed2c008 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    253098f View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2024

  1. Adds backwards compatibility in UsingPrecompile contract. (#11236)

    * added `getEpochInfoOfEpoch(uint256)` to get epoch info of specific epochs
    
    * updated natspec
    
    * PR feedback
    
    * Use constant
    
    * breakup test; added more
    
    * ++ registry to precompile contract
    
    * added elected to epoch info
    
    * numberValidatorsInSet backwards compatibility
    
    * validator address & validatorSigner address from set
    
    * support `getEpochNumber()` backwards compatibility in UsingRegistry
    
    * using `getEpochByBlockNumber` instead of `getEpochByNumber`
    
    * limit span of loop only to L2 blocks
    
    * use binary search instead of blind loop
    
    * ++ natspec
    
    * added getEpochNumberOfBlock() backwards compatibility support
    
    * ++ electedSigners
    
    * make usingPrecompile onlyL1 contract
    
    * ++ precompile override contract
    
    * fix epoch manager bug and mock
    
    * using precompileOverride in validators contract
    
    * wording
    
    * using indexed function when querying specific validator accounts or signers on L2
    
    * fixed failing test
    
    * using independent mapping for elected accounts and signers
    
    * removed old elected list
    
    * support 0.5.13 contracts using precompiles
    
    * -- registry import
    
    * ++ registry in PrecompilesOverride
    
    * ++ more tests
    
    * increase gaslimit
    
    * moved election history update to epoch processing start.
    
    * unused var
    
    * clean up
    
    * fixed e2e test
    
    * simplify code
    
    * Removed support for election historical data after that it's unlikely to be in use by external parties
    
    * PR feedback
    
    * -- spacing
    
    * reorder state var
    
    * stat var reorder
    
    * small fix
    
    * delete electedSigners at end of epochprocessing
    
    * CI fix
    
    * added comment
    
    ---------
    
    Co-authored-by: Martín Volpe <[email protected]>
    Co-authored-by: pahor167 <[email protected]>
    3 people authored Oct 15, 2024
    Configuration menu
    Copy the full SHA
    7566b18 View commit details
    Browse the repository at this point in the history
  2. Finish epoch processing split (#11243)

    * added `getEpochInfoOfEpoch(uint256)` to get epoch info of specific epochs
    
    * updated natspec
    
    * PR feedback
    
    * Use constant
    
    * breakup test; added more
    
    * ++ registry to precompile contract
    
    * added elected to epoch info
    
    * numberValidatorsInSet backwards compatibility
    
    * validator address & validatorSigner address from set
    
    * support `getEpochNumber()` backwards compatibility in UsingRegistry
    
    * using `getEpochByBlockNumber` instead of `getEpochByNumber`
    
    * limit span of loop only to L2 blocks
    
    * use binary search instead of blind loop
    
    * ++ natspec
    
    * added getEpochNumberOfBlock() backwards compatibility support
    
    * ++ electedSigners
    
    * make usingPrecompile onlyL1 contract
    
    * ++ precompile override contract
    
    * fix epoch manager bug and mock
    
    * using precompileOverride in validators contract
    
    * wording
    
    * using indexed function when querying specific validator accounts or signers on L2
    
    * fixed failing test
    
    * using independent mapping for elected accounts and signers
    
    * removed old elected list
    
    * support 0.5.13 contracts using precompiles
    
    * -- registry import
    
    * ++ registry in PrecompilesOverride
    
    * ++ more tests
    
    * increase gaslimit
    
    * moved election history update to epoch processing start.
    
    * unused var
    
    * clean up
    
    * fixed e2e test
    
    * simplify code
    
    * Finish epoch processing split
    
    * FinishEpochProcessing split e2e test
    
    * setToProcessGroups unit tests
    
    * process group unit tests
    
    * Removed support for election historical data after that it's unlikely to be in use by external parties
    
    * PR feedback
    
    * -- spacing
    
    * reorder state var
    
    * stat var reorder
    
    * small fix
    
    * delete electedSigners at end of epochprocessing
    
    * CI fix
    
    * added comment
    
    * prettify
    
    * Pr comments
    
    ---------
    
    Co-authored-by: soloseng <[email protected]>
    Co-authored-by: Martín Volpe <[email protected]>
    3 people authored Oct 15, 2024
    Configuration menu
    Copy the full SHA
    0ae4b8c View commit details
    Browse the repository at this point in the history
  3. Prevent CELO Transfer to Unreleased Treasury (#11222)

    * first compiling draft
    no working test.
    
    Co-authored-by: Martín Volpe <[email protected]>
    
    * Compiler fixes + finishNextEpochProcess
    
    * allocateValidatorsRewards compilable
    
    * First few tests
    
    * test fix
    
    * uisng registry instead
    
    * updated registry ID var names
    
    * typo
    
    * ++ mock contracts in 0.8
    
    * ++ passing test using mock
    
    * Removal of using precompiles
    
    * ScoreManager refactor
    
    * Decouple epoch manager initializer from registry
    
    * isReadyToStartEpoch fix
    
    * startNextEpochProcess fixes
    
    * rename score manager to score reader
    
    * Rename transfer to release on CeloDistribution schedule
    
    * Celo distribution schedule renamed to CeloUnreleasedTreasure
    
    * conditions to getFirstBlockAtEpoch and getLastBlockAtEpoch
    
    * ScoreManager update
    
    * getFirstBlockOfEpoch in EpochManager initializer
    
    * extra checks
    
    * introduce new getValidatorsGroup
    
    * systemAlreadyInitialized update
    
    * Removal of IEpochManagerInterface
    
    * Made CI run on feature branch
    
    * merge fix
    
    * Added target for the CI
    
    * Fixed quote celo-monorepo.yml
    
    * Allow Validator registration in L2 without BLS key (#11181)
    
    * Allow validator registration in L2 without BLS key
    
    * Reallow ECDSA key change in L2
    
    ---------
    
    Co-authored-by: Martín Volpe <[email protected]>
    
    * Fix CI
    
    * Fixed interfaces and imports
    
    * Build fix
    
    * lint
    
    * prettify
    
    * prettify 2
    
    * Attempt to fix truffle build and migrations l2 epoch (#11190)
    
    * Added Blocking to LockedGold, Election (#11186)
    
    * add EpochManager to abis
    
    * force deploy abis
    
    * build fix
    
    * Move Validators.sol to 0.8 (#11192)
    
    * WIP
    
    * Validator test WIP, forge doesn't compile yet
    
    * buildable
    
    * most of the foundry tests working
    
    * Validator related tests fixed
    
    * truffle build working
    
    * cache bump
    
    * lint + prettify+ migrations
    
    * Enable optimization for Solidity 0.8
    
    * prettify
    
    * Ci bump
    
    * CI bump 2
    
    * Validators to 0.8 config
    
    * CI bump
    
    * foundry fix
    
    * Truffle migrations are partly fixed
    
    * Added import for ValidatorsMock08 in EpochManager.t.sol, I think it was removed by mistake
    
    * Added yarn.lock
    
    * Changes to mock with full implementation
    
    * Attempt to fix linking libraries not working with deployCodeTo foundry-rs/foundry#4049
    
    * truffle migrations fixed
    
    * CI bump
    
    * lint
    
    * forge test fixes
    
    * artifacts test fix
    
    * lint
    
    * update of foundry version
    
    * add ProxyFactory import to tests
    
    * library linking fix
    
    * Foundry migrations fix
    
    * migration tests fix
    
    * CI bump
    
    * Little cleanup + retrigger CI
    
    * forgot to commit Validators.sol
    
    * Fixed the ABI encoded
    
    * lint
    
    * Fix contract versions
    
    * add Adapter to ignored contracts
    
    * revert of ReentrancyGuard change
    
    * lint fix
    
    * remove adapters from check
    
    * storage layout fix
    
    ---------
    
    Co-authored-by: pahor167 <[email protected]>
    
    * force release of canary abi
    
    * force new canary version
    
    * npm tag revert
    
    * Soloseng/update-l2-getepochnumber-logic (#11195)
    
    * disable getEpochSize on L2
    
    * update registry
    
    * update relevant interfaces
    
    * update contracts with L2 `getEpochNumber()` logic
    
    * update tests with L2 `getEpochNumber()` logic
    
    * ++ TODO
    
    * moved constants to constants file
    
    * updated allocated supply function to handle L1 & L2 cases
    
    * made `epochManager.currenEpochNumber()` private, to avoid returning 0 when not initialized.
    
    * PR feedback
    
    * Passing validators test using mockEpochManager for L2 tests
    
    * clean up
    
    * fixed other failing tests
    
    * using mockEpochManager instead of interface.
    
    Fixed failing tests.
    
    * happy linter
    
    * revert npm tag ∆
    
    * ++ TODO and comment
    
    * add score manager to abis
    
    * Split initEpochManager Function (#11199)
    
    * ++ contract function
    
    * ++ comment
    
    * startNextEpochProcess unit & integration test (#11191)
    
    * unit test with mocks
    
    * ++ integration tests
    
    * clean up
    
    * -- logging
    
    * removed duplicate interface
    
    * using `MockCeloToken` to get test to pass.
    
    Fails when it hits a precompile in `EpochRewards.sol`
    
    * removed endEpochTimestamp
    
    * moved IEpochManager to 0.5 folder
    
    * added L2 conditions for EpochRewards functions using precompiles
    
    Still missing tests
    
    * renamed EpochManagerInitializer due to name conflict
    
    * ++ more unit test
    
    * setup anvil migration
    fix name conflict
    
    * compiles
    
    * ++ require fund in unreleased treasury
    
    * Updated regex
    
    * ++ registry 0.8 for testing only
    
    * clean up
    
    * ++ unit test
    
    * initial integration test using L1 devchain
    
    * ++ comment
    
    * -- forge based integration test
    
    * ++ to const
    
    * happy linter
    
    * update contract name
    
    * ++ PR feedback
    
    * ++ checks
    
    * updated carbon address
    
    * proxy stableToken mint call via Validators contract
    
    * -- duplicate imports
    
    * removed registry08. replaced with vm call
    
    * PR feedback
    
    * -- coment
    
    * passing unit tests
    
    * clean up
    
    * ++ mintStable test
    
    * -- TODO; compiles test when filtering
    
    * PR feedback
    
    * updated migration script to add more validators
    
    * passing integration test
    
    * removed test for zero amount
    
    * yarn build fix
    
    * clean up comments && TODO
    
    * revert change as out of scope
    
    * E2E EpochManager test + Epoch truffle migrations & Anvil L2 migration build fix (#11198)
    
    * Soloseng/dynamically-fetch-epochmanagerenabler-address (#11207)
    
    * dynamically fetch epochManagerEnabler && carbonOffsettingPartner
    
    ++ to registry
    
    * PR feedback
    
    * removed onlyL1 modifier in setter functions
    
    * updated unit test to reflect changes
    
    * fixing tests
    
    * fix test
    
    * fixed migration data
    
    * fixed migration script error
    
    * removed unused modifier
    
    * removed duplicate or unused code
    
    * Implement sending of allocated validator payments (#11197)
    
    * EpochManager fixes (#11208)
    
    * truffle build fix
    
    * build fix
    
    * PR comments
    
    * prettify
    
    * rename of registerValidator overload
    
    * bug fix
    
    * extensing epochManager e2e test
    
    * yarn lint
    
    * Reset pending payment to 0 after sending (#11209)
    
    Reset pending payment to 0 when sending
    
    * Deleted duplicated import
    
    * Make captureEpochAndValidators work in constant time (#11210)
    
    * Use more general interface for token transfer (#11216)
    
    * Epoch manager enabler tests (#11213)
    
    * ++ basic test
    
    * -- celoToken balance check
    
    * cleanup comments
    
    * use celoToken instead of native token for `initializeSystem` balance check
    
    * ++ more test
    
    * removed additional epochs
    
    * Make sendValidatorPayment nonReentrant (#11217)
    
    * Martinvol/return account instead of signer (#11215)
    
    * EpochManager e2e tests add/remove validators between ecpochs (#11214)
    
    * Send validator payment on actions that would modify reward distribution (#11211)
    
    * Rename `CeloUnreleasedTreasure` to `CeloUnreleasedTreasury` (#11220)
    
    * updated `CeloUnrealeasedTreasure` to `CeloUnreleasedTreasury`
    
    * update `CeloUnreleasedTreasury` initial balance to use defined constant
    
    * renamed file
    
    * prevent CELO transfers to `CeloUnreleasedTreasury`
    
    * ++ comment
    
    * unused import
    
    * using internal accounting for released amount
    
    * updated integration test
    
    * PR feedback
    
    * PR feedback
    
    * reverted due to gas consideration
    
    * more revert
    
    ---------
    
    Co-authored-by: Martín Volpe <[email protected]>
    Co-authored-by: pahor167 <[email protected]>
    Co-authored-by: Martín Volpe <[email protected]>
    Co-authored-by: Martín Volpe <[email protected]>
    Co-authored-by: Martin <[email protected]>
    Co-authored-by: pahor167 <[email protected]>
    7 people authored Oct 15, 2024
    Configuration menu
    Copy the full SHA
    591b114 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    131c499 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2024

  1. Removal of build warnings (#11253)

    * Removal of build warnings
    
    * prettify
    
    * removal of IEC20 in FeeHandler distribute
    pahor167 authored Oct 16, 2024
    Configuration menu
    Copy the full SHA
    3e81caf View commit details
    Browse the repository at this point in the history
  2. Fix Election NatSpecs (#11255)

    Fix NatSpecs
    m-chrzan authored Oct 16, 2024
    Configuration menu
    Copy the full SHA
    048fc11 View commit details
    Browse the repository at this point in the history
  3. Add Governance NatSpecs (#11254)

    Add NatSpecs
    m-chrzan authored Oct 16, 2024
    Configuration menu
    Copy the full SHA
    65442ca View commit details
    Browse the repository at this point in the history
  4. Soloseng/Natspec_and_cleanup (#11248)

    * ++natspec
    
    * more natspec and cleanup
    
    * scoreManager changes
    
    * PR feedback
    
    * PR feedback
    soloseng authored Oct 16, 2024
    Configuration menu
    Copy the full SHA
    b2329a3 View commit details
    Browse the repository at this point in the history
  5. ScoreManager allow to set 0 (#11258)

    ScoreManager update
    pahor167 authored Oct 16, 2024
    Configuration menu
    Copy the full SHA
    cb73506 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d56f10f View commit details
    Browse the repository at this point in the history
  7. GoldToken cleanup (#11251)

    * Add top level NatSpec
    
    * Celo -> CELO
    
    * Add note about naming
    
    ---------
    
    Co-authored-by: Martín Volpe <[email protected]>
    m-chrzan and martinvol authored Oct 16, 2024
    Configuration menu
    Copy the full SHA
    d9a8384 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    451def4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    79cccad View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ad543ec View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a5a33dc View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2024

  1. Configuration menu
    Copy the full SHA
    89591e1 View commit details
    Browse the repository at this point in the history