Skip to content

Conversation

@sendra
Copy link
Collaborator

@sendra sendra commented Apr 29, 2025

Deployment of the Governance contracts for the Soneium Network.

aDI addresses used, can be found here: aave-dao/adi-deploy#51

@github-actions
Copy link

github-actions bot commented Apr 29, 2025

♻️ Forge Gas Snapshots

Seems like you are not measuring gas of any operations yet. 🤔
Consider adding some snapshot tests to measure regressions & improvements.

@github-actions
Copy link

github-actions bot commented Apr 29, 2025

🔮 Coverage report
File Line Coverage Function Coverage Branch Coverage
src/contracts/BaseVotingStrategy.sol ${\color{orange}86.05\%}$
$37 / 43$
104, 108, 109, 110, 111 and 1 more
${\color{orange}85.71\%}$
$6 / 7$
BaseVotingStrategy.isTokenSlotAccepted
${\color{red}61.54\%}$
$8 / 13$
src/contracts/Governance.sol ${\color{red}62.5\%}$
$15 / 24$
40, 41, 42, 43, 45 and 4 more
${\color{orange}85.71\%}$
$6 / 7$
Governance.initializeWithRevision
${\color{green}100\%}$
$2 / 2$
src/contracts/GovernanceCore.sol ${\color{lightgreen}99.56\%}$
$225 / 226$
100
${\color{lightgreen}97.22\%}$
$35 / 36$
GovernanceCore.MIN_VOTING_DURATION
${\color{lightgreen}97.8\%}$
$89 / 91$
src/contracts/GovernancePowerStrategy.sol ${\color{green}100\%}$
$12 / 12$
${\color{green}100\%}$
$3 / 3$
${\color{green}100\%}$
$0 / 0$
src/contracts/VotingPortal.sol ${\color{green}100\%}$
$34 / 34$
${\color{green}100\%}$
$8 / 8$
${\color{green}100\%}$
$14 / 14$
src/contracts/dataHelpers/GovernanceDataHelper.sol ${\color{red}0\%}$
$0 / 35$
16, 22, 23, 24, 25 and 30 more
${\color{red}0\%}$
$0 / 3$
GovernanceDataHelper.getProposalsData, GovernanceDataHelper.getConstants, GovernanceDataHelper.getRepresentationData
${\color{red}0\%}$
$0 / 6$
src/contracts/dataHelpers/MetaDelegateHelper.sol ${\color{red}0\%}$
$0 / 9$
15, 18, 20, 21, 23 and 4 more
${\color{red}0\%}$
$0 / 1$
MetaDelegateHelper.batchMetaDelegate
${\color{red}0\%}$
$0 / 6$
src/contracts/dataHelpers/PayloadsControllerDataHelper.sol ${\color{red}0\%}$
$0 / 14$
16, 20, 21, 23, 24 and 9 more
${\color{red}0\%}$
$0 / 2$
PayloadsControllerDataHelper.getPayloadsData, PayloadsControllerDataHelper.getExecutorConfigs
${\color{green}100\%}$
$0 / 0$
src/contracts/dataHelpers/VotingMachineDataHelper.sol ${\color{red}0\%}$
$0 / 24$
15, 20, 22, 23, 24 and 19 more
${\color{red}0\%}$
$0 / 2$
VotingMachineDataHelper.getProposalsData, VotingMachineDataHelper._hasRequiredRoots
${\color{red}0\%}$
$0 / 2$
src/contracts/payloads/Executor.sol ${\color{green}100\%}$
$15 / 15$
${\color{green}100\%}$
$1 / 1$
${\color{green}100\%}$
$10 / 10$
src/contracts/payloads/PayloadsController.sol ${\color{green}100\%}$
$18 / 18$
${\color{green}100\%}$
$3 / 3$
${\color{green}100\%}$
$10 / 10$
src/contracts/payloads/PayloadsControllerCore.sol ${\color{orange}90.91\%}$
$90 / 99$
54, 59, 64, 189, 192 and 4 more
${\color{red}68.42\%}$
$13 / 19$
PayloadsControllerCore.GRACE_PERIOD, PayloadsControllerCore.MIN_EXECUTION_DELAY, PayloadsControllerCore.MAX_EXECUTION_DELAY, PayloadsControllerCore.getPayloadState, PayloadsControllerCore.whoCanRescue and 1 more
${\color{lightgreen}96.97\%}$
$32 / 33$
src/contracts/payloads/PermissionedPayloadsController.sol ${\color{orange}83.33\%}$
$15 / 18$
41, 47, 51
${\color{red}71.43\%}$
$5 / 7$
PermissionedPayloadsController.MIN_EXECUTION_DELAY, PermissionedPayloadsController.MAX_EXECUTION_DELAY
${\color{red}50\%}$
$1 / 2$
src/contracts/payloads/WithPayloadsManager.sol ${\color{orange}84.62\%}$
$11 / 13$
43, 46
${\color{orange}83.33\%}$
$5 / 6$
WithPayloadsManager.updatePayloadsManager
${\color{green}100\%}$
$4 / 4$
src/contracts/voting/DataWarehouse.sol ${\color{green}100\%}$
$21 / 21$
${\color{green}100\%}$
$5 / 5$
${\color{red}50\%}$
$1 / 2$
src/contracts/voting/VotingMachine.sol $^{↓-0.65\%}{\color{orange}88.89\%}$
$32 / 36$
135, 142, 165, 170
${\color{red}77.78\%}$
$7 / 9$
VotingMachine.decodeVoteMessage, VotingMachine._sendVoteResults
${\color{green}100\%}$
$14 / 14$
src/contracts/voting/VotingStrategy.sol ${\color{orange}90\%}$
$36 / 40$
77, 79, 115, 116
${\color{green}100\%}$
$3 / 3$
${\color{orange}86.96\%}$
$20 / 23$
src/contracts/voting/libs/MerklePatriciaProofVerifier.sol ${\color{red}67.33\%}$
$68 / 101$
41, 45, 56, 61, 94 and 28 more
${\color{green}100\%}$
$6 / 6$
${\color{red}30.43\%}$
$14 / 46$
src/contracts/voting/libs/RLPReader.sol ${\color{red}71.43\%}$
$105 / 147$
32, 33, 35, 36, 37 and 37 more
${\color{red}57.14\%}$
$12 / 21$
RLPReader.next, RLPReader.hasNext, RLPReader.iterator, RLPReader.rlpLen, RLPReader.payloadLen and 4 more
${\color{red}55.88\%}$
$19 / 34$
src/contracts/voting/libs/StateProofVerifier.sol ${\color{lightgreen}96.97\%}$
$32 / 33$
95
${\color{green}100\%}$
$4 / 4$
${\color{red}50\%}$
$4 / 8$

@github-actions
Copy link

github-actions bot commented Apr 29, 2025

🌈 Test Results
Compiling 131 files with Solc 0.8.22
Solc 0.8.22 finished in 15.61s
Compiler run successful with warnings:
Warning (2072): Unused local variable.
   --> tests/GovernanceCore.t.sol:882:5:
    |
882 |     uint256 balanceBefore = OWNER.balance;
    |     ^^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
   --> tests/GovernanceCore.t.sol:886:5:
    |
886 |     bytes32 blockHash = blockhash(block.number - 1);
    |     ^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> tests/MessageSizes.t.sol:33:5:
   |
33 |     bytes memory message = abi.encode(PROPOSAL_ID, blockHash, votingDuration);
   |     ^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> tests/MessageSizes.t.sol:49:5:
   |
49 |     bytes memory message = abi.encode(
   |     ^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> tests/MessageSizes.t.sol:63:5:
   |
63 |     bytes memory message = abi.encode(PROPOSAL_ID, forVotes, againstVotes);
   |     ^^^^^^^^^^^^^^^^^^^^

Warning (2018): Function state mutability can be restricted to view
   --> tests/GC_VotingConfigs.t.sol:568:3:
    |
568 |   function _validateConfigsLvl1(
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/GC_VotingConfigs.t.sol:597:3:
    |
597 |   function _validateConfigsLvl2(
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/GovernanceCore.t.sol:330:3:
    |
330 |   function testSetUp() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/GovernanceCore.t.sol:362:3:
    |
362 |   function testGetPrecisionDivider() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/GovernanceCore.t.sol:366:3:
    |
366 |   function testIsVotingPortalApproved() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/GovernanceCore.t.sol:370:3:
    |
370 |   function testGetVotingPortalCount() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/GovernanceCore.t.sol:374:3:
    |
374 |   function testGetCooldownPeriod() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/GovernanceCore.t.sol:378:3:
    |
378 |   function testGetProposalExpirationTime() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/GovernanceCore.t.sol:382:3:
    |
382 |   function testGetProposalsCount() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/GovernanceCore.t.sol:386:3:
    |
386 |   function testGetPowerStrategy() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/GovernanceCore.t.sol:390:3:
    |
390 |   function testGetVotingConfigs() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
    --> tests/GovernanceCore.t.sol:1929:3:
     |
1929 |   function testGetProposalStateNotExisting() public {
     |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
  --> tests/GovernancePowerStrategy.t.sol:54:3:
   |
54 |   function testSetUp(address randomToken) public {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
  --> tests/GovernancePowerStrategy.t.sol:66:3:
   |
66 |   function testGetVotingAssetList() public {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
  --> tests/GovernancePowerStrategy.t.sol:74:3:
   |
74 |   function testGetVotingAssetConfig() public {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
  --> tests/MessageSizes.t.sol:30:3:
   |
30 |   function testProposalVoteMessage() public {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to pure
  --> tests/MessageSizes.t.sol:39:3:
   |
39 |   function testExecuteProposalMessage() public {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to pure
  --> tests/MessageSizes.t.sol:59:3:
   |
59 |   function testQueueVoteResultsMessage() public {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to pure
  --> tests/MessageSizes.t.sol:69:3:
   |
69 |   function _cccEncode(bytes memory message) internal {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
  --> tests/payloads/PayloadsController.t.sol:67:3:
   |
67 |   function testGetCrossChainController() public {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
  --> tests/payloads/PayloadsController.t.sol:71:3:
   |
71 |   function testGetMessageOriginator() public {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
  --> tests/payloads/PayloadsController.t.sol:75:3:
   |
75 |   function testGetOriginChainId() public {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/payloads/PayloadsControllerCore.t.sol:154:3:
    |
154 |   function testPayloadCount() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/payloads/PayloadsControllerCore.t.sol:158:3:
    |
158 |   function testGetExecutorSettingsByAccessControl() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/payloads/PayloadsControllerCore.t.sol:193:3:
    |
193 |   function testGuardian() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to pure
   --> tests/voting/DataWarehouse.t.sol:104:3:
    |
104 |   function testGetAccountBalanceSlotHash() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/voting/SubmitVote.t.sol:214:3:
    |
214 |   function testRepresentativeSlot() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/voting/VotingMachine.t.sol:180:3:
    |
180 |   function testInitialization() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
  --> tests/voting/VotingStrategy.t.sol:24:3:
   |
24 |   function testGetVotingPowerAave() public {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
  --> tests/voting/VotingStrategy.t.sol:35:3:
   |
35 |   function testGetVotingPowerAAave() public {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
  --> tests/voting/VotingStrategyAToken.t.sol:46:3:
   |
46 |   function testGetPowerOfAToken() public {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/voting/votingMachineWithProofs.t.sol:144:3:
    |
144 |   function testGetProposalVoteConfigurationWhenNotExists() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/voting/votingMachineWithProofs.t.sol:151:3:
    |
151 |   function testGetDataWarehouse() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/voting/votingMachineWithProofs.t.sol:155:3:
    |
155 |   function testGetVotingStrategy() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/voting/votingMachineWithProofs.t.sol:178:3:
    |
178 |   function testGetUserProposalVoteWhenNoVote() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/voting/votingMachineWithProofs.t.sol:198:3:
    |
198 |   function testGetProposalByIdWhenNotExists() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/voting/votingMachineWithProofs.t.sol:207:3:
    |
207 |   function testGetProposalState() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
   --> tests/voting/votingMachineWithProofs.t.sol:219:3:
    |
219 |   function testGetProposalsVoteConfigurationIdsWhenLength0() public {
    |   ^ (Relevant source part starts here and spans across multiple lines).


Ran 6 tests for tests/GovernancePowerStrategy.t.sol:GovernancePowerStrategyTest
[PASS] testConstructor() (gas: 427806)
[PASS] testGetFullPropositionPower() (gas: 24639)
[PASS] testGetFullVotingPower() (gas: 24748)
[PASS] testGetVotingAssetConfig() (gas: 19240)
[PASS] testGetVotingAssetList() (gas: 14956)
[PASS] testSetUp(address) (runs: 256, μ: 18539, ~: 18539)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 21.64ms (21.25ms CPU time)

Ran 3 tests for tests/MessageSizes.t.sol:MessageSizesTest
[PASS] testExecuteProposalMessage() (gas: 534)
[PASS] testProposalVoteMessage() (gas: 491)
[PASS] testQueueVoteResultsMessage() (gas: 371)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 165.34µs (53.37µs CPU time)

Ran 11 tests for tests/payloads/PayloadsController.t.sol:PayloadsControllerTest
[PASS] testCreatePayloadsControllerWithInvalidCCC() (gas: 89625)
[PASS] testCreatePayloadsControllerWithInvalidMessageOriginator() (gas: 89723)
[PASS] testCreatePayloadsControllerWithInvalidOriginChain() (gas: 89761)
[PASS] testGetCrossChainController() (gas: 13476)
[PASS] testGetMessageOriginator() (gas: 13540)
[PASS] testGetOriginChainId() (gas: 13351)
[PASS] testReceiveCrossChainMessage() (gas: 170966)
[PASS] testReceiveCrossChainMessageWhenIncorrectCaller() (gas: 14957)
[PASS] testReceiveCrossChainMessageWhenIncorrectChainId() (gas: 15869)
[PASS] testReceiveCrossChainMessageWhenIncorrectMessage() (gas: 162700)
[PASS] testReceiveCrossChainMessageWhenIncorrectOriginator() (gas: 15901)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 1.65ms (936.56µs CPU time)

Ran 4 tests for tests/voting/DataWarehouse.t.sol:DataWarehouseTest
[PASS] testGetAccountBalanceSlotHash() (gas: 3578)
[PASS] testGetStorage() (gas: 797833)
[PASS] testProcessData() (gas: 582299)
[PASS] testRegisterExchangeRate() (gas: 836799)
Logs:
  1000000000000000000

Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 25.34ms (11.06ms CPU time)

Ran 8 tests for tests/payloads/Executor.t.sol:ExecutorTest
[PASS] testExecuteTransaction() (gas: 25571)
[PASS] testExecuteTransactionFails() (gas: 20775)
[PASS] testExecuteTransactionWhenInvalidTarget() (gas: 14915)
[PASS] testExecuteTransactionWhenNotOwner(address) (runs: 256, μ: 16024, ~: 16024)
[PASS] testExecuteTransactionWithDelegateAndNotEnoughValue() (gas: 22450)
[PASS] testExecuteTransactionWithDelegateAndValue() (gas: 32724)
[PASS] testExecuteTransactionWithoutDelegateCall() (gas: 32840)
[PASS] testExecuteTransactionWithoutSignature() (gas: 32633)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 17.48ms (17.14ms CPU time)

Ran 15 tests for tests/VotingPortal.t.sol:VotingPortalTest
[PASS] testContractCreationWhenInvalidCCC() (gas: 68749)
[PASS] testContractCreationWhenInvalidGasConfig() (gas: 631166)
[PASS] testContractCreationWhenInvalidGovernance() (gas: 68893)
[PASS] testContractCreationWhenInvalidOwner() (gas: 44911)
[PASS] testContractCreationWhenInvalidVotingMachine() (gas: 68973)
[PASS] testContractCreationWhenInvalidVotingMachineChainId() (gas: 66954)
[PASS] testForwardStartVotingMessage(uint256,bytes32,uint24) (runs: 256, μ: 19952, ~: 19952)
[PASS] testForwardStartVotingMessageWhenNotGovernance(uint256,bytes32,uint24) (runs: 256, μ: 11764, ~: 11764)
[PASS] testReceiveCrossChainMessage(uint256,uint128,uint128) (runs: 256, μ: 26407, ~: 26407)
[PASS] testReceiveCrossChainMessageWhenIncorrectCaller(address) (runs: 256, μ: 13433, ~: 13433)
[PASS] testReceiveCrossChainMessageWhenIncorrectChainId() (gas: 10761)
[PASS] testReceiveCrossChainMessageWhenIncorrectMessage() (gas: 21089)
[PASS] testReceiveCrossChainMessageWhenIncorrectOriginator() (gas: 12872)
[PASS] testUpdateGasLimit(uint128) (runs: 256, μ: 19395, ~: 19433)
[PASS] testUpdateGasLimitWhenNotOwner(uint128,address) (runs: 256, μ: 13524, ~: 13524)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 103.82ms (103.38ms CPU time)

Ran 8 tests for tests/voting/VotingStrategy.t.sol:VotingStrategyTest
[PASS] testContractCreation() (gas: 49659)
[PASS] testGetVotingPowerAAave() (gas: 27074)
[PASS] testGetVotingPowerAave() (gas: 18472)
[PASS] testGetVotingPowerStkAave() (gas: 25018)
[PASS] testHasRoots() (gas: 27615)
[PASS] testHasRootsWhenNotAaveRoots() (gas: 12746)
[PASS] testHasRootsWhenNotStkAaveExchangeRate() (gas: 24592)
[PASS] testHasRootsWhenNotStkAaveRoots() (gas: 20422)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 9.74ms (895.43µs CPU time)

Ran 1 test for tests/voting/VotingStrategyAToken.t.sol:VotingStrategyATokenTest
[PASS] testGetPowerOfAToken() (gas: 27756)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 13.86ms (72.13µs CPU time)

Ran 35 tests for tests/payloads/PayloadsControllerCore.t.sol:PayloadsControllerCoreTest
[PASS] testCancelPayloadWhenCreated() (gas: 347126)
[PASS] testCancelPayloadWhenExecuted() (gas: 393555)
[PASS] testCancelPayloadWhenNotExist() (gas: 24784)
[PASS] testCancelPayloadWhenNotGuardian() (gas: 326883)
[PASS] testCancelPayloadWhenQueued() (gas: 372318)
[PASS] testCreatePayload(address,address) (runs: 256, μ: 242222, ~: 242222)
[PASS] testCreatePayloadWithInvalidAccessLevel(address) (runs: 256, μ: 67773, ~: 67773)
[PASS] testCreatePayloadWithInvalidTarget() (gas: 66596)
[PASS] testCreatePayloadWithoutActions() (gas: 14605)
[PASS] testCreatePayloadWithoutExecutorForMaxActionLvl(address) (runs: 256, μ: 1189880, ~: 1189880)
[PASS] testExecutePayload() (gas: 405684)
[PASS] testExecutePayloadAfterGracePeriod() (gas: 351425)
[PASS] testExecutePayloadInTimelock() (gas: 351729)
[PASS] testExecutePayloadNotExists() (gas: 21624)
[PASS] testExecutePayloadNotQueued() (gas: 307888)
[PASS] testExpirationDelayCanNotBe0() (gas: 10508)
[PASS] testGetExecutorSettingsByAccessControl() (gas: 34688)
[PASS] testGuardian() (gas: 15548)
[PASS] testPayloadCount() (gas: 15511)
[PASS] testQueueNonExistingPayload() (gas: 22852)
[PASS] testQueuePayload() (gas: 342136)
[PASS] testQueuePayloadExpired() (gas: 325163)
[PASS] testQueuePayloadWhenLowerAccessLevel() (gas: 309698)
[PASS] testQueuePayloadWithBiggerAccessLevel() (gas: 260390)
[PASS] testQueuePayloadWithOlderProposalTimestamp() (gas: 325564)
[PASS] testToken() (gas: 2448)
[PASS] testUpdateExecutorWhenAlreadySetAsLevel1() (gas: 23324)
[PASS] testUpdateExecutorWhenAlreadySetAsLevel2() (gas: 23337)
[PASS] testUpdateExecutorWhenExecutor0Address() (gas: 18514)
[PASS] testUpdateExecutorsWhenAccessLevel1() (gas: 401029)
[PASS] testUpdateExecutorsWhenDelayToBig() (gas: 399417)
[PASS] testUpdateExecutorsWhenDelayToSmall() (gas: 399394)
[PASS] testUpdateExecutorsWhenIncorrectAccessLevel() (gas: 399206)
[PASS] testUpdateExecutorsWhenOwner() (gas: 423267)
[PASS] testUpdateGuardian() (gas: 26319)
Suite result: ok. 35 passed; 0 failed; 0 skipped; finished in 218.37ms (217.18ms CPU time)

Ran 78 tests for tests/GovernanceCore.t.sol:GovernanceCoreTest
[PASS] testActivateVoting() (gas: 298352)
[PASS] testActivateVotingWhenCoolDownNotPassed() (gas: 261580)
[PASS] testActivateVotingWhenIncorrectState() (gas: 19289)
[PASS] testActivateVotingWhenNoPower() (gas: 263668)
[PASS] testActivateVotingWhenVotingPortalNotApproved() (gas: 267177)
[PASS] testAddAddressZeroAsVotingPortal() (gas: 18186)
[PASS] testAddAndRemoveSameVotingPortalTwice() (gas: 48573)
[PASS] testAddVotingPortals() (gas: 51872)
[PASS] testAddVotingPortalsWhenNotOwner() (gas: 24932)
[PASS] testCancelProposalWhenCreator() (gas: 293680)
[PASS] testCancelProposalWhenExecuted() (gas: 370381)
Logs:
  state 3

[PASS] testCancelProposalWhenGuardian() (gas: 297899)
[PASS] testCancelProposalWhenNotGuardianOrCreatorAndPower() (gas: 295665)
[PASS] testCancelProposalWhenNotPower() (gas: 295758)
[PASS] testCancelProposalWhenVotingPortalNotApproved() (gas: 300247)
[PASS] testCreateGovernanceWhenInvalidCCC() (gas: 90699)
[PASS] testCreateGovernanceWhenInvalidCollector() (gas: 90567)
[PASS] testCreateProposal() (gas: 350430)
[PASS] testCreateProposalWhenInvalidAccessLevel() (gas: 145380)
[PASS] testCreateProposalWhenInvalidChain() (gas: 145655)
[PASS] testCreateProposalWhenInvalidIPFSHash() (gas: 49993)
[PASS] testCreateProposalWhenInvalidPayloadsController() (gas: 145540)
[PASS] testCreateProposalWhenNoPayloads() (gas: 21500)
[PASS] testCreateProposalWhenNotCorrectCancellationFee() (gas: 54666)
[PASS] testCreateProposalWhenPropositionPowerTooLow() (gas: 125061)
[PASS] testCreateProposalWhenVotingPortalNotApproved() (gas: 26884)
[PASS] testExecuteProposal() (gas: 369245)
[PASS] testExecuteProposalWhenInCoolDownPeriod() (gas: 330654)
[PASS] testExecuteProposalWhenNoPower() (gas: 344648)
[PASS] testExecuteProposalWhenNotInQueuedState() (gas: 289400)
[PASS] testGetCooldownPeriod() (gas: 13364)
[PASS] testGetPowerStrategy() (gas: 15605)
[PASS] testGetPrecisionDivider() (gas: 13341)
[PASS] testGetProposalExpirationTime() (gas: 13406)
[PASS] testGetProposalState() (gas: 242940)
[PASS] testGetProposalStateNotExisting() (gas: 15915)
[PASS] testGetProposalsCount() (gas: 15548)
[PASS] testGetVotingConfigs() (gas: 31033)
[PASS] testGetVotingPortalCount() (gas: 15415)
[PASS] testInitializerWhenBothOfSameLvl() (gas: 3621450)
[PASS] testInitializerWhenLvlNull() (gas: 3674531)
[PASS] testInitializerWhenNoConfigs() (gas: 3607382)
[PASS] testInitializerWhenOnlyLvl1() (gas: 3618184)
[PASS] testInitializerWhenOnlyLvl2() (gas: 3626933)
[PASS] testIsVotingPortalApproved() (gas: 15798)
[PASS] testQueueProposal() (gas: 338495)
[PASS] testQueueProposalWhenCallerNotVotingPortal() (gas: 299154)
[PASS] testQueueProposalWhenNotInCreatedState() (gas: 341863)
[PASS] testQueueProposalWhenNotPassingYesNoDifferential() (gas: 337681)
[PASS] testQueueProposalWhenNotPassingYesThreshold() (gas: 337819)
[PASS] testQueueProposalWhenNotPropositionPower() (gas: 337650)
[PASS] testQueueProposalWhenVotingDurationNotPassed() (gas: 293065)
[PASS] testRedeemWhenProposalAlreadyRedeemed() (gas: 361884)
[PASS] testRedeemWhenProposalCancelled() (gas: 323907)
[PASS] testRedeemWhenProposalExecuted() (gas: 361012)
[PASS] testRedeemWhenProposalExecutedAndFeeUpdated() (gas: 369281)
[PASS] testRedeemWhenProposalExpired() (gas: 261387)
[PASS] testRedeemWhenProposalFailed() (gas: 330975)
[PASS] testRedeemWhenProposalInInvalidState() (gas: 341836)
[PASS] testRemoveVotingPortals() (gas: 25184)
[PASS] testRemoveVotingPortalsWhenNotOwner() (gas: 24943)
[PASS] testRescueVotingPortal() (gas: 56498)
[PASS] testRescueVotingPortalWhenVotingPortalsCountNot0() (gas: 31495)
[PASS] testSetPowerStrategy() (gas: 28635)
[PASS] testSetPowerStrategyWhenNotOwner() (gas: 24530)
[PASS] testSetPowerStrategyWithNoPowerTokens() (gas: 19516)
[PASS] testSetUp() (gas: 19408)
[PASS] testSetVotingConfigs() (gas: 66907)
[PASS] testSetVotingConfigsWhenDurationToBig() (gas: 21026)
[PASS] testSetVotingConfigsWhenDurationToSmall() (gas: 19913)
[PASS] testSetVotingConfigsWhenInvalidAccessLevel() (gas: 19411)
[PASS] testSetVotingConfigsWhenNotOwner() (gas: 17384)
[PASS] testSetZeroPowerStrategy() (gas: 17346)
[PASS] testUpdateCancellationFee() (gas: 25463)
[PASS] testUpdateCancellationFeeWhenNotOwner() (gas: 16130)
[PASS] testUpdateGasLimit() (gas: 25514)
[PASS] testUpdateGasLimitWhenNotOwner() (gas: 16106)
[PASS] testUpdateRepresentativesForChain() (gas: 258594)
Suite result: ok. 78 passed; 0 failed; 0 skipped; finished in 21.76ms (20.17ms CPU time)

Ran 45 tests for tests/voting/votingMachineWithProofs.t.sol:VotingMachineWithProofsTest
[PASS] testCloseSendVoteResult() (gas: 209377)
[PASS] testCloseSendVoteResultWhenIncorrectState() (gas: 172002)
[PASS] testContractCreation() (gas: 65079)
[PASS] testContractCreationInvalidGov() (gas: 67287)
[PASS] testCreateBridgedProposal() (gas: 83740)
[PASS] testCreateBridgedProposalWhenAlreadyRegistered() (gas: 94546)
[PASS] testCreateBridgedProposalWhenInvalidDuration() (gas: 9396)
[PASS] testCreateBridgedProposalWhenInvalidHash() (gas: 9302)
[PASS] testCreateVote() (gas: 148270)
[PASS] testCreateVoteWhenBlockhashNotRegistered() (gas: 13523)
[PASS] testCreateVoteWhenNotRegisteredRoots() (gas: 68013)
[PASS] testCreateVoteWhenWrongProposalState() (gas: 135465)
[PASS] testGetDataWarehouse() (gas: 10667)
[PASS] testGetProposalById() (gas: 41672)
[PASS] testGetProposalByIdWhenNotExists() (gas: 18701)
[PASS] testGetProposalState() (gas: 10918)
[PASS] testGetProposalVoteConfiguration() (gas: 57106)
[PASS] testGetProposalVoteConfigurationWhenNotExists() (gas: 13597)
[PASS] testGetProposalsVoteConfigurationIdsWhenLength0() (gas: 11313)
[PASS] testGetProposalsVoteConfigurationIdsWhenSkipAndSizeBiggerThanLength() (gas: 242464)
[PASS] testGetProposalsVoteConfigurationIdsWhenSkipAndSizeCorrect() (gas: 243646)
[PASS] testGetProposalsVoteConfigurationIdsWhenSkipAndSizeToBig() (gas: 247576)
[PASS] testGetProposalsVoteConfigurationIdsWhenSkipToBig() (gas: 237166)
[PASS] testGetUserProposalVote() (gas: 33279)
[PASS] testGetUserProposalVoteWhenNoVote() (gas: 11831)
[PASS] testGetVotingStrategy() (gas: 10602)
[PASS] testSubmitVoteAgainst() (gas: 186795)
[PASS] testSubmitVoteAsRepresentative() (gas: 177463)
[PASS] testSubmitVoteAsRepresentativeWhenInvalidRepresentative() (gas: 125439)
[PASS] testSubmitVoteAsRepresentativeWhenInvalidVoter() (gas: 119002)
[PASS] testSubmitVoteAsRepresentativeWhenRepresentative0() (gas: 125509)
[PASS] testSubmitVoteBySignature() (gas: 200199)
[PASS] testSubmitVoteBySignatureAsRepresentative() (gas: 207423)
[PASS] testSubmitVoteBySignatureAsRepresentativeWhenWrongVoter() (gas: 151771)
[PASS] testSubmitVoteBySignatureWhenSigner0() (gas: 140403)
[PASS] testSubmitVoteBySignatureWrongAssetShouldRevert() (gas: 151048)
[PASS] testSubmitVoteBySignatureWrongSlotShouldRevert() (gas: 151068)
[PASS] testSubmitVoteInFavor() (gas: 168655)
[PASS] testSubmitVoteInFavorWithSameAssetDiffSlots() (gas: 177700)
[PASS] testSubmitVoteWhenNotCorrectState() (gas: 12143)
[PASS] testSubmitVoteWhenUserBalanceDoesNotExist() (gas: 124971)
[PASS] testSubmitVoteWhenUserVotingPowerIs0() (gas: 128290)
[PASS] testSubmitVoteWithRepeatedAssets() (gas: 127905)
[PASS] testSubmitWhenAlreadyVoted() (gas: 180659)
[PASS] testSubmitWhenVotedWithDifferentSupport() (gas: 180637)
Suite result: ok. 45 passed; 0 failed; 0 skipped; finished in 12.14ms (10.79ms CPU time)

Ran 3 tests for tests/voting/TokenDelegationTest.t.sol:TokenDelegationTest
[PASS] test_DelegateAAave() (gas: 110583)
[PASS] test_DelegateAave() (gas: 109212)
[PASS] test_DelegateStkAave() (gas: 113037)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 95.20ms (1.41ms CPU time)

Ran 1 test for tests/voting/VotingStrategyStkAave.t.sol:VotingStrategyStkAaveTest
[PASS] testFuzzGetPowerOfStkAaveToken(bytes32,uint256,uint104,uint104,uint104,uint8) (runs: 256, μ: 20603, ~: 20710)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 293.29ms (293.02ms CPU time)

Ran 15 tests for tests/voting/VotingMachine.t.sol:VotingMachineTest
[PASS] testContractCreationWhenInvalidCCC() (gas: 73877)
[PASS] testContractCreationWhenInvalidChainId() (gas: 71915)
[PASS] testContractCreationWhenInvalidGov() (gas: 70605)
[PASS] testContractCreationWhenInvalidVotingPortal() (gas: 74103)
[PASS] testInitialization() (gas: 11861)
[PASS] testReceiveCrossChainMessage() (gas: 161863)
[PASS] testReceiveCrossChainMessageWithWrongMessageType() (gas: 26285)
[PASS] testReceiveCrossChainMessageWithWrongOriginChainId() (gas: 12189)
[PASS] testReceiveCrossChainMessageWithWrongOriginSender() (gas: 14326)
[PASS] testReceiveCrossChainMessageWithWrongProposalMessage() (gas: 26115)
[PASS] testReceiveCrossChainMessageWithWrongSender() (gas: 13367)
[PASS] testReceiveCrossChainMessageWithWrongType() (gas: 25387)
[PASS] testReceiveCrossChainMessageWithoutRoots() (gas: 106867)
[PASS] testUpdateGasLimit() (gas: 19248)
[PASS] testUpdateGasLimitWhenNotOwner(address) (runs: 256, μ: 12537, ~: 12537)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 14.04ms (13.38ms CPU time)

Ran 5 tests for tests/voting/SubmitVote.t.sol:SubmitVoteTest
[PASS] testRepresentativeSlot() (gas: 10073)
[PASS] testSubmitVoteAsRepresentative_AAVE_and_STK_AAVE_and_A_AAVE() (gas: 1159491)
[PASS] testSubmitVoteInSupport_AAVE() (gas: 276406)
[PASS] testSubmitVoteInSupport_AAVE_and_STK_AAVE() (gas: 498865)
[PASS] testSubmitVoteInSupport_AAVE_and_STK_AAVE_and_A_AAVE() (gas: 906379)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 39.47ms (18.01ms CPU time)

Ran 15 tests for tests/GC_VotingConfigs.t.sol:GCore_VotingConfigsTest
[PASS] testInitialize() (gas: 847298)
[PASS] testInitializeWhenMissingVotingConfigs() (gas: 101510)
[PASS] testSetVotingConfigsLv1Lv2() (gas: 865320)
[PASS] testSetVotingConfigsLv2WhenDiffTooBig(uint256) (runs: 256, μ: 844386, ~: 844386)
[PASS] testSetVotingConfigsLv2WhenDiffTooLow() (gas: 848135)
[PASS] testSetVotingConfigsLv2WhenPowerTooBig(uint256) (runs: 256, μ: 844017, ~: 844017)
[PASS] testSetVotingConfigsLv2WhenPowerTooLow() (gas: 847821)
[PASS] testSetVotingConfigsLv2WhenYesThresholdTooBig(uint256) (runs: 256, μ: 844124, ~: 844124)
[PASS] testSetVotingConfigsLv2WhenYesThresholdTooLow() (gas: 848032)
[PASS] testSetVotingConfigsLvl1WhenDiffTooBig(uint256) (runs: 256, μ: 837897, ~: 837897)
[PASS] testSetVotingConfigsLvl1WhenPowerTooBig() (gas: 845431)
[PASS] testSetVotingConfigsLvl1WhenYesThresholdOfIsBiggerThenAchievableVotes(uint8,uint248) (runs: 256, μ: 843451, ~: 840748)
[PASS] testSetVotingConfigsLvl1WhenYesThresholdOfL1BiggerThenL2() (gas: 843776)
[PASS] testSetVotingConfigsLvl1WhenYesThresholdOfL2SmallerThenL1() (gas: 843735)
[PASS] testSetVotingConfigsNotOrdered() (gas: 864312)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 782.23ms (759.14ms CPU time)

Ran 11 tests for tests/payloads/PermissionedPayloadsController.t.sol:PermissionedPayloadsControllerTest
[PASS] testGetPayloadsManager(address,address,address,address) (runs: 256, μ: 5359418, ~: 5359418)
[PASS] testPayloadCancellationWithGuardian(address,address,address,address) (runs: 256, μ: 5503207, ~: 5503207)
[PASS] testPayloadCancellationWithInvalidCaller(address,address,address,address,address) (runs: 256, μ: 5499691, ~: 5499691)
[PASS] testPayloadCancellationWithPayloadsManager(address,address,address,address) (runs: 256, μ: 5503112, ~: 5503112)
[PASS] testPayloadExecution(address,address,address,address) (runs: 256, μ: 5606594, ~: 5606594)
[PASS] testPayloadTimeLockNotExceeded(address,address,address,address,uint256) (runs: 256, μ: 5502726, ~: 5502726)
[PASS] testPayloadsCreation(address,address,address,address) (runs: 256, μ: 5495244, ~: 5495244)
[PASS] testPayloadsCreationWithInvalidCaller(address,address,address,address,address) (runs: 256, μ: 5363941, ~: 5363941)
[PASS] testSetExecutionDelayWithGuardian(address,address,address,address,address) (runs: 256, μ: 5363974, ~: 5363974)
[PASS] testSetExecutionDelayWithInvalidCaller(address,address,address,address) (runs: 256, μ: 5359410, ~: 5359410)
[PASS] testUpdateExecutorsNotAvailable(address,address,address,address) (runs: 256, μ: 5741413, ~: 5741413)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 825.04ms (1.45s CPU time)

Ran 17 test suites in 827.23ms (2.50s CPU time): 264 tests passed, 0 failed, 0 skipped (264 total tests)

@sendra sendra merged commit f8a12bf into main May 2, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants