Skip to content

Commit

Permalink
ci: test storage and 4bytes (ArbitrumFoundation#316)
Browse files Browse the repository at this point in the history
* test: storage and 4bytes

* test: commit storage and 4bytes

* ci: test storage and 4bytes
  • Loading branch information
gzeoneth authored Oct 3, 2024
1 parent be337bc commit 0d210c6
Show file tree
Hide file tree
Showing 27 changed files with 669 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ jobs:
- name: Install packages
run: yarn

- name: Test Storage Layouts
run: yarn run test:storage

- name: Test function signatures
run: yarn run test:signatures

- name: Run tests
run: make test

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ lcov.info
lcov.info.pruned
types/
proposalState.json
/test/storage/*-old
/test/signatures/*-old
.DS_Store
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"verify:foundation-wallet": "tsc && node ./dist/scripts/foundation-wallet-deployment/verifyDeployment.js",
"test:integration": "hardhat test",
"test:proposals": "ts-node ./scripts/proposalTests.ts",
"test:storage": "./test/storage/test.bash",
"test:signatures": "./test/signatures/test-sigs.bash",
"format:sol": "forge fmt",
"coverage:filtered-report": "forge coverage --report lcov && lcov --remove ./lcov.info -o ./lcov.info.pruned 'node_modules' 'test' 'hardhatTest' 'gov-action-contracts'",
"coverage:htmlreport": "rm -rf ./report && genhtml ./lcov.info.pruned -o report --branch-coverage",
Expand Down
7 changes: 7 additions & 0 deletions test/signatures/FixedDelegateErc20Wallet
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"initialize(address,address,address)": "c0c53b8b",
"owner()": "8da5cb5b",
"renounceOwnership()": "715018a6",
"transfer(address,address,uint256)": "beabacc8",
"transferOwnership(address)": "f2fde38b"
}
35 changes: 35 additions & 0 deletions test/signatures/L1ArbitrumTimelock
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"CANCELLER_ROLE()": "b08e51c0",
"DEFAULT_ADMIN_ROLE()": "a217fddf",
"EXECUTOR_ROLE()": "07bd0265",
"PROPOSER_ROLE()": "8f61f4f5",
"RETRYABLE_TICKET_MAGIC()": "3994073d",
"TIMELOCK_ADMIN_ROLE()": "0d3cf6fc",
"cancel(bytes32)": "c4d252f5",
"execute(address,uint256,bytes,bytes32,bytes32)": "134008d3",
"executeBatch(address[],uint256[],bytes[],bytes32,bytes32)": "e38335e5",
"getMinDelay()": "f27a0c92",
"getRoleAdmin(bytes32)": "248a9ca3",
"getTimestamp(bytes32)": "d45c4435",
"governanceChainInbox()": "c4c31307",
"grantRole(bytes32,address)": "2f2ff15d",
"hasRole(bytes32,address)": "91d14854",
"hashOperation(address,uint256,bytes,bytes32,bytes32)": "8065657f",
"hashOperationBatch(address[],uint256[],bytes[],bytes32,bytes32)": "b1c5f427",
"initialize(uint256,address[],address,address)": "f9538ff5",
"initialize(uint256,address[],address[])": "7fbc79c6",
"isOperation(bytes32)": "31d50750",
"isOperationDone(bytes32)": "2ab0f529",
"isOperationPending(bytes32)": "584b153e",
"isOperationReady(bytes32)": "13bc9f20",
"l2Timelock()": "72152844",
"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": "bc197c81",
"onERC1155Received(address,address,uint256,uint256,bytes)": "f23a6e61",
"onERC721Received(address,address,uint256,bytes)": "150b7a02",
"renounceRole(bytes32,address)": "36568abe",
"revokeRole(bytes32,address)": "d547741f",
"schedule(address,uint256,bytes,bytes32,bytes32,uint256)": "01d5062a",
"scheduleBatch(address[],uint256[],bytes[],bytes32,bytes32,uint256)": "8f2a0bb0",
"supportsInterface(bytes4)": "01ffc9a7",
"updateDelay(uint256)": "64d62353"
}
25 changes: 25 additions & 0 deletions test/signatures/L1ArbitrumToken
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"DOMAIN_SEPARATOR()": "3644e515",
"allowance(address,address)": "dd62ed3e",
"approve(address,uint256)": "095ea7b3",
"arbOneGateway()": "eaeb679b",
"balanceOf(address)": "70a08231",
"bridgeBurn(address,uint256)": "74f4f547",
"bridgeMint(address,uint256)": "8c2a993e",
"decimals()": "313ce567",
"decreaseAllowance(address,uint256)": "a457c2d7",
"increaseAllowance(address,uint256)": "39509351",
"initialize(address,address,address)": "c0c53b8b",
"isArbitrumEnabled()": "8e5f5ad1",
"name()": "06fdde03",
"nonces(address)": "7ecebe00",
"novaGateway()": "04e48887",
"novaRouter()": "0cf2e808",
"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf",
"registerTokenOnL2((address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address))": "67d71a32",
"symbol()": "95d89b41",
"totalSupply()": "18160ddd",
"transfer(address,uint256)": "a9059cbb",
"transferAndCall(address,uint256,bytes)": "4000aea0",
"transferFrom(address,address,uint256)": "23b872dd"
}
51 changes: 51 additions & 0 deletions test/signatures/L2ArbitrumGovernor
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"BALLOT_TYPEHASH()": "deaaa7cc",
"COUNTING_MODE()": "dd4e2ba5",
"EXCLUDE_ADDRESS()": "5e12ebbd",
"EXTENDED_BALLOT_TYPEHASH()": "2fe3e261",
"castVote(uint256,uint8)": "56781388",
"castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": "3bccf4fd",
"castVoteWithReason(uint256,uint8,string)": "7b3c71d3",
"castVoteWithReasonAndParams(uint256,uint8,string,bytes)": "5f398a14",
"castVoteWithReasonAndParamsBySig(uint256,uint8,string,bytes,uint8,bytes32,bytes32)": "03420181",
"execute(address[],uint256[],bytes[],bytes32)": "2656227d",
"getPastCirculatingSupply(uint256)": "6e462680",
"getVotes(address,uint256)": "eb9019d4",
"getVotesWithParams(address,uint256,bytes)": "9a802a6d",
"hasVoted(uint256,address)": "43859632",
"hashProposal(address[],uint256[],bytes[],bytes32)": "c59057e4",
"initialize(address,address,address,uint256,uint256,uint256,uint256,uint64)": "5b447a57",
"lateQuorumVoteExtension()": "32b8113e",
"name()": "06fdde03",
"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": "bc197c81",
"onERC1155Received(address,address,uint256,uint256,bytes)": "f23a6e61",
"onERC721Received(address,address,uint256,bytes)": "150b7a02",
"owner()": "8da5cb5b",
"proposalDeadline(uint256)": "c01f9e37",
"proposalEta(uint256)": "ab58fb8e",
"proposalSnapshot(uint256)": "2d63f693",
"proposalThreshold()": "b58131b0",
"proposalVotes(uint256)": "544ffc9c",
"propose(address[],uint256[],bytes[],string)": "7d5e81e2",
"queue(address[],uint256[],bytes[],bytes32)": "160cbed7",
"quorum(uint256)": "f8ce560a",
"quorumDenominator()": "97c3d334",
"quorumNumerator()": "a7713a70",
"quorumNumerator(uint256)": "60c4247f",
"relay(address,uint256,bytes)": "c28bc2fa",
"renounceOwnership()": "715018a6",
"setLateQuorumVoteExtension(uint64)": "d07f91e9",
"setProposalThreshold(uint256)": "ece40cc1",
"setVotingDelay(uint256)": "70b0f660",
"setVotingPeriod(uint256)": "ea0217cf",
"state(uint256)": "3e4f49e6",
"supportsInterface(bytes4)": "01ffc9a7",
"timelock()": "d33219b4",
"token()": "fc0c546a",
"transferOwnership(address)": "f2fde38b",
"updateQuorumNumerator(uint256)": "06f3f9e6",
"updateTimelock(address)": "a890c910",
"version()": "54fd4d50",
"votingDelay()": "3932abb1",
"votingPeriod()": "02a251a3"
}
Empty file.
37 changes: 37 additions & 0 deletions test/signatures/L2ArbitrumToken
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"DOMAIN_SEPARATOR()": "3644e515",
"MINT_CAP_DENOMINATOR()": "89110e5d",
"MINT_CAP_NUMERATOR()": "e6be4876",
"MIN_MINT_INTERVAL()": "a9f8ad04",
"allowance(address,address)": "dd62ed3e",
"approve(address,uint256)": "095ea7b3",
"balanceOf(address)": "70a08231",
"burn(uint256)": "42966c68",
"burnFrom(address,uint256)": "79cc6790",
"checkpoints(address,uint32)": "f1127ed8",
"decimals()": "313ce567",
"decreaseAllowance(address,uint256)": "a457c2d7",
"delegate(address)": "5c19a95c",
"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": "c3cda520",
"delegates(address)": "587cde1e",
"getPastTotalSupply(uint256)": "8e539e8c",
"getPastVotes(address,uint256)": "3a46b1a8",
"getVotes(address)": "9ab24eb0",
"increaseAllowance(address,uint256)": "39509351",
"initialize(address,uint256,address)": "c350a1b5",
"l1Address()": "c2eeeebd",
"mint(address,uint256)": "40c10f19",
"name()": "06fdde03",
"nextMint()": "cf665443",
"nonces(address)": "7ecebe00",
"numCheckpoints(address)": "6fcfff45",
"owner()": "8da5cb5b",
"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf",
"renounceOwnership()": "715018a6",
"symbol()": "95d89b41",
"totalSupply()": "18160ddd",
"transfer(address,uint256)": "a9059cbb",
"transferAndCall(address,uint256,bytes)": "4000aea0",
"transferFrom(address,address,uint256)": "23b872dd",
"transferOwnership(address)": "f2fde38b"
}
39 changes: 39 additions & 0 deletions test/signatures/SecurityCouncilManager
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"COHORT_REPLACER_ROLE()": "279684e2",
"DEFAULT_ADMIN_ROLE()": "a217fddf",
"MAX_SECURITY_COUNCILS()": "c7b3f5ca",
"MEMBER_ADDER_ROLE()": "ab738506",
"MEMBER_REMOVER_ROLE()": "b8df7c7f",
"MEMBER_REPLACER_ROLE()": "8e8c3210",
"MEMBER_ROTATOR_ROLE()": "903e7ad6",
"RETRYABLE_TICKET_MAGIC()": "3994073d",
"addMember(address,uint8)": "62d0d1c3",
"addSecurityCouncil((address,address,uint256))": "6eaff79e",
"cohortIncludes(uint8,address)": "f5f4fde0",
"cohortSize()": "c6db8129",
"firstCohortIncludes(address)": "53901f8f",
"generateSalt(address[],uint256)": "927a0380",
"getBothCohorts()": "d0946961",
"getFirstCohort()": "a7b20c29",
"getRoleAdmin(bytes32)": "248a9ca3",
"getScheduleUpdateInnerData(uint256)": "8bbd5149",
"getSecondCohort()": "bdc9f17c",
"grantRole(bytes32,address)": "2f2ff15d",
"hasRole(bytes32,address)": "91d14854",
"initialize(address[],address[],(address,address,uint256)[],(address,address,address,address[],address,address),address,address)": "a386a802",
"l2CoreGovTimelock()": "eea3e4d4",
"removeMember(address)": "0b1ca49a",
"removeSecurityCouncil((address,address,uint256))": "60052890",
"renounceRole(bytes32,address)": "36568abe",
"replaceCohort(address[],uint8)": "b9862f27",
"replaceMember(address,address)": "e577e32e",
"revokeRole(bytes32,address)": "d547741f",
"rotateMember(address,address)": "0931d37e",
"router()": "f887ea40",
"secondCohortIncludes(address)": "e9d9f048",
"securityCouncils(uint256)": "bef3f745",
"securityCouncilsLength()": "7889acb2",
"setUpgradeExecRouteBuilder(address)": "0e5e43d7",
"supportsInterface(bytes4)": "01ffc9a7",
"updateNonce()": "0feca68a"
}
53 changes: 53 additions & 0 deletions test/signatures/SecurityCouncilMemberElectionGovernor
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"BALLOT_TYPEHASH()": "deaaa7cc",
"COUNTING_MODE()": "dd4e2ba5",
"EXTENDED_BALLOT_TYPEHASH()": "2fe3e261",
"castVote(uint256,uint8)": "56781388",
"castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": "3bccf4fd",
"castVoteWithReason(uint256,uint8,string)": "7b3c71d3",
"castVoteWithReasonAndParams(uint256,uint8,string,bytes)": "5f398a14",
"castVoteWithReasonAndParamsBySig(uint256,uint8,string,bytes,uint8,bytes32,bytes32)": "03420181",
"electionIndexToCohort(uint256)": "33bb6f4b",
"electionIndexToDescription(uint256)": "276ae91a",
"execute(address[],uint256[],bytes[],bytes32)": "2656227d",
"fullWeightDuration()": "d63e9c67",
"fullWeightVotingDeadline(uint256)": "03da91f9",
"getProposeArgs(uint256)": "1f0ac182",
"getVotes(address,uint256)": "eb9019d4",
"getVotesWithParams(address,uint256,bytes)": "9a802a6d",
"hasVoted(uint256,address)": "43859632",
"hashProposal(address[],uint256[],bytes[],bytes32)": "c59057e4",
"initialize(address,address,address,address,uint256,uint256)": "d7c41c79",
"name()": "06fdde03",
"nomineeElectionGovernor()": "a6b2a892",
"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": "bc197c81",
"onERC1155Received(address,address,uint256,uint256,bytes)": "f23a6e61",
"onERC721Received(address,address,uint256,bytes)": "150b7a02",
"owner()": "8da5cb5b",
"proposalDeadline(uint256)": "c01f9e37",
"proposalSnapshot(uint256)": "2d63f693",
"proposalThreshold()": "b58131b0",
"propose(address[],uint256[],bytes[],string)": "7d5e81e2",
"proposeFromNomineeElectionGovernor(uint256)": "f2ff01e6",
"quorum(uint256)": "f8ce560a",
"relay(address,uint256,bytes)": "c28bc2fa",
"renounceOwnership()": "715018a6",
"securityCouncilManager()": "03d1ce8a",
"selectTopNominees(address[],uint240[],uint256)": "9a9d6102",
"setFullWeightDuration(uint256)": "1395bfcd",
"setProposalThreshold(uint256)": "ece40cc1",
"setVotingDelay(uint256)": "70b0f660",
"setVotingPeriod(uint256)": "ea0217cf",
"state(uint256)": "3e4f49e6",
"supportsInterface(bytes4)": "01ffc9a7",
"token()": "fc0c546a",
"topNominees(uint256)": "b8f9270b",
"transferOwnership(address)": "f2fde38b",
"usedNonces(bytes32)": "feb61724",
"version()": "54fd4d50",
"votesToWeight(uint256,uint256,uint256)": "5fdef9d5",
"votesUsed(uint256,address)": "9523730e",
"votingDelay()": "3932abb1",
"votingPeriod()": "02a251a3",
"weightReceived(uint256,address)": "d39fb128"
}
54 changes: 54 additions & 0 deletions test/signatures/SecurityCouncilMemberRemovalGovernor
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"BALLOT_TYPEHASH()": "deaaa7cc",
"COUNTING_MODE()": "dd4e2ba5",
"EXCLUDE_ADDRESS()": "5e12ebbd",
"EXTENDED_BALLOT_TYPEHASH()": "2fe3e261",
"VOTE_SUCCESS_DENOMINATOR()": "b565aa1f",
"castVote(uint256,uint8)": "56781388",
"castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": "3bccf4fd",
"castVoteWithReason(uint256,uint8,string)": "7b3c71d3",
"castVoteWithReasonAndParams(uint256,uint8,string,bytes)": "5f398a14",
"castVoteWithReasonAndParamsBySig(uint256,uint8,string,bytes,uint8,bytes32,bytes32)": "03420181",
"execute(address[],uint256[],bytes[],bytes32)": "2656227d",
"getPastCirculatingSupply(uint256)": "6e462680",
"getVotes(address,uint256)": "eb9019d4",
"getVotesWithParams(address,uint256,bytes)": "9a802a6d",
"hasVoted(uint256,address)": "43859632",
"hashProposal(address[],uint256[],bytes[],bytes32)": "c59057e4",
"initialize(uint256,address,address,address,uint256,uint256,uint256,uint256,uint64,uint256)": "3a707fc3",
"lateQuorumVoteExtension()": "32b8113e",
"name()": "06fdde03",
"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": "bc197c81",
"onERC1155Received(address,address,uint256,uint256,bytes)": "f23a6e61",
"onERC721Received(address,address,uint256,bytes)": "150b7a02",
"owner()": "8da5cb5b",
"proposalDeadline(uint256)": "c01f9e37",
"proposalExpirationBlocks()": "8a897387",
"proposalExpirationDeadline(uint256)": "7ed2a469",
"proposalSnapshot(uint256)": "2d63f693",
"proposalThreshold()": "b58131b0",
"proposalVotes(uint256)": "544ffc9c",
"propose(address[],uint256[],bytes[],string)": "7d5e81e2",
"quorum(uint256)": "f8ce560a",
"quorumDenominator()": "97c3d334",
"quorumNumerator()": "a7713a70",
"quorumNumerator(uint256)": "60c4247f",
"relay(address,uint256,bytes)": "c28bc2fa",
"renounceOwnership()": "715018a6",
"securityCouncilManager()": "03d1ce8a",
"separateSelector(bytes)": "4de20e79",
"setLateQuorumVoteExtension(uint64)": "d07f91e9",
"setProposalThreshold(uint256)": "ece40cc1",
"setVoteSuccessNumerator(uint256)": "b1305218",
"setVotingDelay(uint256)": "70b0f660",
"setVotingPeriod(uint256)": "ea0217cf",
"state(uint256)": "3e4f49e6",
"supportsInterface(bytes4)": "01ffc9a7",
"token()": "fc0c546a",
"transferOwnership(address)": "f2fde38b",
"updateQuorumNumerator(uint256)": "06f3f9e6",
"version()": "54fd4d50",
"voteSuccessNumerator()": "c7bd35b6",
"votingDelay()": "3932abb1",
"votingPeriod()": "02a251a3"
}
Loading

0 comments on commit 0d210c6

Please sign in to comment.