Skip to content

Commit

Permalink
L2 hotfix (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
shazarre authored Jul 19, 2024
1 parent 041886c commit 06019bf
Show file tree
Hide file tree
Showing 70 changed files with 1,899 additions and 337 deletions.
6 changes: 6 additions & 0 deletions .changeset/two-rats-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@celo/contractkit': minor
'@celo/celocli': minor
---

Adds support for <1.5.0.0 and >=1.5.0.0 Governance contract version
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ jobs:
version: ${{ env.SUPPORTED_FOUNDRY_VERSION }}
- name: Run tests
run: |
yarn workspace @celo/celocli test --coverage
yarn workspace @celo/celocli test-ci --coverage
- name: Verify that a new account can be created
run: |
yarn workspace @celo/celocli run celocli account:new
Expand Down
10 changes: 9 additions & 1 deletion docs/command-line-interface/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ Approve a dequeued governance proposal (or hotfix)
```
USAGE
$ celocli governance:approvehotfix --from <value> [--gasCurrency <value>] [--globalHelp]
[--proposalID <value> | --hotfix <value>] [--useMultiSig]
[--proposalID <value> | --hotfix <value>] [--useMultiSig] [--type
approver|securityCouncil ]
FLAGS
--from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Approver's
Expand All @@ -46,6 +47,11 @@ FLAGS
flags
--hotfix=<value> Hash of hotfix proposal
--proposalID=<value> UUID of proposal to approve
--type=<option> Determines which type of
hotfix approval (approver or
security council) to use.
<options:
approver|securityCouncil>
--useMultiSig True means the request will
be sent through multisig.
Expand All @@ -62,6 +68,8 @@ EXAMPLES
approve --proposalID 99 --from 0x5409ed021d9299bf6814279a6a1411a7e866a631 --useMultiSig
approve --hotfix 0xfcfc98ec3db7c56f0866a7149e811bf7f9e30c9d40008b0def497fcc6fe90649 --from 0xCc50EaC48bA71343dC76852FAE1892c6Bd2971DA --useMultiSig
approve --hotfix 0xfcfc98ec3db7c56f0866a7149e811bf7f9e30c9d40008b0def497fcc6fe90649 --from 0xCc50EaC48bA71343dC76852FAE1892c6Bd2971DA --useMultiSig --type securityCouncil
```

## `celocli governance:build-proposal`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ ___

### methodIds

• **methodIds**: `Record`\<``"initialized"`` \| ``"isOwner"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"eip712DomainSeparator"`` \| ``"EIP712_AUTHORIZE_SIGNER_TYPEHASH"`` \| ``"authorizedBy"`` \| ``"offchainStorageRoots"`` \| ``"setEip712DomainSeparator"`` \| ``"setAccount"`` \| ``"createAccount"`` \| ``"setName"`` \| ``"setWalletAddress"`` \| ``"setAccountDataEncryptionKey"`` \| ``"setMetadataURL"`` \| ``"addStorageRoot"`` \| ``"removeStorageRoot"`` \| ``"getOffchainStorageRoots"`` \| ``"setPaymentDelegation"`` \| ``"deletePaymentDelegation"`` \| ``"getPaymentDelegation"`` \| ``"setIndexedSigner"`` \| ``"authorizeSignerWithSignature"`` \| ``"authorizeVoteSigner"`` \| ``"authorizeValidatorSigner"`` \| ``"authorizeValidatorSignerWithPublicKey"`` \| ``"authorizeValidatorSignerWithKeys"`` \| ``"authorizeAttestationSigner"`` \| ``"authorizeSigner"`` \| ``"completeSignerAuthorization"`` \| ``"isLegacySigner"`` \| ``"isDefaultSigner"`` \| ``"isIndexedSigner"`` \| ``"isSigner"`` \| ``"removeDefaultSigner"`` \| ``"removeIndexedSigner"`` \| ``"removeSigner"`` \| ``"removeVoteSigner"`` \| ``"removeValidatorSigner"`` \| ``"removeAttestationSigner"`` \| ``"attestationSignerToAccount"`` \| ``"validatorSignerToAccount"`` \| ``"voteSignerToAccount"`` \| ``"signerToAccount"`` \| ``"isLegacyRole"`` \| ``"getLegacySigner"`` \| ``"getDefaultSigner"`` \| ``"getIndexedSigner"`` \| ``"getVoteSigner"`` \| ``"getValidatorSigner"`` \| ``"getAttestationSigner"`` \| ``"hasLegacySigner"`` \| ``"hasDefaultSigner"`` \| ``"hasIndexedSigner"`` \| ``"hasAuthorizedSigner"`` \| ``"hasAuthorizedVoteSigner"`` \| ``"hasAuthorizedValidatorSigner"`` \| ``"hasAuthorizedAttestationSigner"`` \| ``"getName"`` \| ``"getMetadataURL"`` \| ``"batchGetMetadataURL"`` \| ``"getDataEncryptionKey"`` \| ``"getWalletAddress"`` \| ``"isAccount"`` \| ``"isAuthorizedSigner"`` \| ``"getRoleAuthorizationSigner"``, `string`\>
• **methodIds**: `Record`\<``"initialized"`` \| ``"isOwner"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"initialize"`` \| ``"getVersionNumber"`` \| ``"eip712DomainSeparator"`` \| ``"EIP712_AUTHORIZE_SIGNER_TYPEHASH"`` \| ``"authorizedBy"`` \| ``"offchainStorageRoots"`` \| ``"setEip712DomainSeparator"`` \| ``"setAccount"`` \| ``"createAccount"`` \| ``"setName"`` \| ``"setWalletAddress"`` \| ``"setAccountDataEncryptionKey"`` \| ``"setMetadataURL"`` \| ``"addStorageRoot"`` \| ``"removeStorageRoot"`` \| ``"getOffchainStorageRoots"`` \| ``"setPaymentDelegation"`` \| ``"deletePaymentDelegation"`` \| ``"getPaymentDelegation"`` \| ``"setIndexedSigner"`` \| ``"authorizeSignerWithSignature"`` \| ``"authorizeVoteSigner"`` \| ``"authorizeValidatorSigner"`` \| ``"authorizeValidatorSignerWithPublicKey"`` \| ``"authorizeValidatorSignerWithKeys"`` \| ``"authorizeAttestationSigner"`` \| ``"authorizeSigner"`` \| ``"completeSignerAuthorization"`` \| ``"isLegacySigner"`` \| ``"isDefaultSigner"`` \| ``"isIndexedSigner"`` \| ``"isSigner"`` \| ``"removeDefaultSigner"`` \| ``"removeIndexedSigner"`` \| ``"removeSigner"`` \| ``"removeVoteSigner"`` \| ``"removeValidatorSigner"`` \| ``"removeAttestationSigner"`` \| ``"attestationSignerToAccount"`` \| ``"validatorSignerToAccount"`` \| ``"voteSignerToAccount"`` \| ``"signerToAccount"`` \| ``"isLegacyRole"`` \| ``"getLegacySigner"`` \| ``"getDefaultSigner"`` \| ``"getIndexedSigner"`` \| ``"getVoteSigner"`` \| ``"getValidatorSigner"`` \| ``"getAttestationSigner"`` \| ``"hasLegacySigner"`` \| ``"hasDefaultSigner"`` \| ``"hasIndexedSigner"`` \| ``"hasAuthorizedSigner"`` \| ``"hasAuthorizedVoteSigner"`` \| ``"hasAuthorizedValidatorSigner"`` \| ``"hasAuthorizedAttestationSigner"`` \| ``"getName"`` \| ``"getMetadataURL"`` \| ``"batchGetMetadataURL"`` \| ``"getDataEncryptionKey"`` \| ``"getWalletAddress"`` \| ``"isAccount"`` \| ``"isAuthorizedSigner"`` \| ``"getRoleAuthorizationSigner"``, `string`\>

#### Inherited from

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ ___

### methodIds

• **methodIds**: `Record`\<``"attestationRequestFees"`` \| ``"attestationExpiryBlocks"`` \| ``"pendingWithdrawals"`` \| ``"checkProofOfPossession"`` \| ``"fractionMulExp"`` \| ``"getBlockNumberFromHeader"`` \| ``"getEpochNumber"`` \| ``"getEpochNumberOfBlock"`` \| ``"getEpochSize"`` \| ``"getParentSealBitmap"`` \| ``"getVerifiedSealBitmapFromHeader"`` \| ``"hashHeader"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"minQuorumSize"`` \| ``"minQuorumSizeInCurrentSet"`` \| ``"numberValidatorsInCurrentSet"`` \| ``"numberValidatorsInSet"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"validatorSignerAddressFromCurrentSet"`` \| ``"validatorSignerAddressFromSet"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"withdraw"`` \| ``"maxAttestations"`` \| ``"selectIssuersWaitBlocks"`` \| ``"transferApprovals"`` \| ``"revoke"`` \| ``"getUnselectedRequest"`` \| ``"getAttestationIssuers"`` \| ``"getAttestationStats"`` \| ``"batchGetAttestationStats"`` \| ``"getAttestationState"`` \| ``"getCompletableAttestations"`` \| ``"getAttestationRequestFee"`` \| ``"setAttestationRequestFee"`` \| ``"setAttestationExpiryBlocks"`` \| ``"setSelectIssuersWaitBlocks"`` \| ``"setMaxAttestations"`` \| ``"getMaxAttestations"`` \| ``"validateAttestationCode"`` \| ``"lookupAccountsForIdentifier"`` \| ``"requireNAttestationsRequested"``, `string`\>
• **methodIds**: `Record`\<``"attestationRequestFees"`` \| ``"attestationExpiryBlocks"`` \| ``"pendingWithdrawals"`` \| ``"checkProofOfPossession"`` \| ``"fractionMulExp"`` \| ``"getBlockNumberFromHeader"`` \| ``"getEpochNumber"`` \| ``"getEpochNumberOfBlock"`` \| ``"getEpochSize"`` \| ``"getParentSealBitmap"`` \| ``"getVerifiedSealBitmapFromHeader"`` \| ``"hashHeader"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"minQuorumSize"`` \| ``"minQuorumSizeInCurrentSet"`` \| ``"numberValidatorsInCurrentSet"`` \| ``"numberValidatorsInSet"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"validatorSignerAddressFromCurrentSet"`` \| ``"validatorSignerAddressFromSet"`` \| ``"initialize"`` \| ``"withdraw"`` \| ``"getVersionNumber"`` \| ``"maxAttestations"`` \| ``"selectIssuersWaitBlocks"`` \| ``"transferApprovals"`` \| ``"revoke"`` \| ``"getUnselectedRequest"`` \| ``"getAttestationIssuers"`` \| ``"getAttestationStats"`` \| ``"batchGetAttestationStats"`` \| ``"getAttestationState"`` \| ``"getCompletableAttestations"`` \| ``"getAttestationRequestFee"`` \| ``"setAttestationRequestFee"`` \| ``"setAttestationExpiryBlocks"`` \| ``"setSelectIssuersWaitBlocks"`` \| ``"setMaxAttestations"`` \| ``"getMaxAttestations"`` \| ``"validateAttestationCode"`` \| ``"lookupAccountsForIdentifier"`` \| ``"requireNAttestationsRequested"``, `string`\>

#### Inherited from

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ ___

### methodIds

**methodIds**: `Record`\<``"blockGasLimit"`` \| ``"intrinsicGasForAlternativeFeeCurrency"`` \| ``"checkProofOfPossession"`` \| ``"fractionMulExp"`` \| ``"getBlockNumberFromHeader"`` \| ``"getEpochNumber"`` \| ``"getEpochNumberOfBlock"`` \| ``"getEpochSize"`` \| ``"getParentSealBitmap"`` \| ``"getVerifiedSealBitmapFromHeader"`` \| ``"hashHeader"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"minQuorumSize"`` \| ``"minQuorumSizeInCurrentSet"`` \| ``"numberValidatorsInCurrentSet"`` \| ``"numberValidatorsInSet"`` \| ``"owner"`` \| ``"renounceOwnership"`` \| ``"transferOwnership"`` \| ``"validatorSignerAddressFromCurrentSet"`` \| ``"validatorSignerAddressFromSet"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"uptimeLookbackWindow"`` \| ``"setBlockGasLimit"`` \| ``"setIntrinsicGasForAlternativeFeeCurrency"`` \| ``"setUptimeLookbackWindow"`` \| ``"getUptimeLookbackWindow"``, `string`\>
**methodIds**: `Record`\<``"blockGasLimit"`` \| ``"intrinsicGasForAlternativeFeeCurrency"`` \| ``"checkProofOfPossession"`` \| ``"fractionMulExp"`` \| ``"getBlockNumberFromHeader"`` \| ``"getEpochNumber"`` \| ``"getEpochNumberOfBlock"`` \| ``"getEpochSize"`` \| ``"getParentSealBitmap"`` \| ``"getVerifiedSealBitmapFromHeader"`` \| ``"hashHeader"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"minQuorumSize"`` \| ``"minQuorumSizeInCurrentSet"`` \| ``"numberValidatorsInCurrentSet"`` \| ``"numberValidatorsInSet"`` \| ``"owner"`` \| ``"renounceOwnership"`` \| ``"transferOwnership"`` \| ``"validatorSignerAddressFromCurrentSet"`` \| ``"validatorSignerAddressFromSet"`` \| ``"initialize"`` \| ``"getVersionNumber"`` \| ``"uptimeLookbackWindow"`` \| ``"setBlockGasLimit"`` \| ``"setIntrinsicGasForAlternativeFeeCurrency"`` \| ``"setUptimeLookbackWindow"`` \| ``"getUptimeLookbackWindow"``, `string`\>

#### Inherited from

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
- [getCommunityRewardFraction](wrappers_CeloDistributionScheduleWrapper.CeloDistributionScheduleWrapper.md#getcommunityrewardfraction)
- [getDistributableAmount](wrappers_CeloDistributionScheduleWrapper.CeloDistributionScheduleWrapper.md#getdistributableamount)
- [getRemainingBalanceToDistribute](wrappers_CeloDistributionScheduleWrapper.CeloDistributionScheduleWrapper.md#getremainingbalancetodistribute)
- [getTargetCeloTotalSupply](wrappers_CeloDistributionScheduleWrapper.CeloDistributionScheduleWrapper.md#gettargetcelototalsupply)
- [getTargetCeloDistribution](wrappers_CeloDistributionScheduleWrapper.CeloDistributionScheduleWrapper.md#gettargetcelodistribution)
- [getTotalDistributedBySchedule](wrappers_CeloDistributionScheduleWrapper.CeloDistributionScheduleWrapper.md#gettotaldistributedbyschedule)
- [methodIds](wrappers_CeloDistributionScheduleWrapper.CeloDistributionScheduleWrapper.md#methodids)

Expand Down Expand Up @@ -276,9 +276,9 @@ ___

___

### getTargetCeloTotalSupply
### getTargetCeloDistribution

**getTargetCeloTotalSupply**: () => `Promise`\<`TargetTotalSupplyResponse`\>
**getTargetCeloDistribution**: () => `Promise`\<`TargetTotalSupplyResponse`\>

#### Type declaration

Expand Down Expand Up @@ -320,7 +320,7 @@ ___

### methodIds

**methodIds**: `Record`\<``"initialized"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"activate"`` \| ``"carbonOffsettingPartner"`` \| ``"setCommunityRewardFraction"`` \| ``"getCommunityRewardFraction"`` \| ``"setCarbonOffsettingFund"`` \| ``"getCarbonOffsettingFraction"`` \| ``"areDependenciesSet"`` \| ``"communityRewardFund"`` \| ``"isL2"`` \| ``"l2StartTime"`` \| ``"totalDistributedBySchedule"`` \| ``"totalSupplyAtL2Start"`` \| ``"distributeAccordingToSchedule"`` \| ``"getTotalDistributedBySchedule"`` \| ``"getRemainingBalanceToDistribute"`` \| ``"getDistributableAmount"`` \| ``"getTargetCeloTotalSupply"``, `string`\>
**methodIds**: `Record`\<``"initialized"`` \| ``"isL2"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"initialize"`` \| ``"getVersionNumber"`` \| ``"activate"`` \| ``"carbonOffsettingPartner"`` \| ``"setCommunityRewardFraction"`` \| ``"getCommunityRewardFraction"`` \| ``"setCarbonOffsettingFund"`` \| ``"getCarbonOffsettingFraction"`` \| ``"areDependenciesSet"`` \| ``"communityRewardFund"`` \| ``"l2StartTime"`` \| ``"totalAllocatedAtL2Start"`` \| ``"totalDistributedBySchedule"`` \| ``"distributeAccordingToSchedule"`` \| ``"getTotalDistributedBySchedule"`` \| ``"getRemainingBalanceToDistribute"`` \| ``"getDistributableAmount"`` \| ``"getTargetCeloDistribution"``, `string`\>

#### Inherited from

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ ___

### methodIds

**methodIds**: `Record`\<``"slash"`` \| ``"slashingIncentives"`` \| ``"checkProofOfPossession"`` \| ``"fractionMulExp"`` \| ``"getBlockNumberFromHeader"`` \| ``"getEpochNumber"`` \| ``"getEpochNumberOfBlock"`` \| ``"getEpochSize"`` \| ``"getParentSealBitmap"`` \| ``"getVerifiedSealBitmapFromHeader"`` \| ``"hashHeader"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"minQuorumSize"`` \| ``"minQuorumSizeInCurrentSet"`` \| ``"numberValidatorsInCurrentSet"`` \| ``"numberValidatorsInSet"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"validatorSignerAddressFromCurrentSet"`` \| ``"validatorSignerAddressFromSet"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"groupMembershipAtBlock"`` \| ``"setSlashingIncentives"`` \| ``"checkForDoubleSigning"``, `string`\>
**methodIds**: `Record`\<``"slash"`` \| ``"slashingIncentives"`` \| ``"checkProofOfPossession"`` \| ``"fractionMulExp"`` \| ``"getBlockNumberFromHeader"`` \| ``"getEpochNumber"`` \| ``"getEpochNumberOfBlock"`` \| ``"getEpochSize"`` \| ``"getParentSealBitmap"`` \| ``"getVerifiedSealBitmapFromHeader"`` \| ``"hashHeader"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"minQuorumSize"`` \| ``"minQuorumSizeInCurrentSet"`` \| ``"numberValidatorsInCurrentSet"`` \| ``"numberValidatorsInSet"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"validatorSignerAddressFromCurrentSet"`` \| ``"validatorSignerAddressFromSet"`` \| ``"initialize"`` \| ``"getVersionNumber"`` \| ``"groupMembershipAtBlock"`` \| ``"setSlashingIncentives"`` \| ``"checkForDoubleSigning"``, `string`\>

#### Inherited from

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ ___

### methodIds

• **methodIds**: `Record`\<``"slash"`` \| ``"slashingIncentives"`` \| ``"slashableDowntime"`` \| ``"checkProofOfPossession"`` \| ``"fractionMulExp"`` \| ``"getBlockNumberFromHeader"`` \| ``"getEpochNumber"`` \| ``"getEpochNumberOfBlock"`` \| ``"getEpochSize"`` \| ``"getParentSealBitmap"`` \| ``"getVerifiedSealBitmapFromHeader"`` \| ``"hashHeader"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"minQuorumSize"`` \| ``"minQuorumSizeInCurrentSet"`` \| ``"numberValidatorsInCurrentSet"`` \| ``"numberValidatorsInSet"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"validatorSignerAddressFromCurrentSet"`` \| ``"validatorSignerAddressFromSet"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"bitmaps"`` \| ``"groupMembershipAtBlock"`` \| ``"lastSlashedBlock"`` \| ``"setSlashingIncentives"`` \| ``"setSlashableDowntime"`` \| ``"getBitmapForInterval"`` \| ``"setBitmapForInterval"`` \| ``"wasDownForInterval"`` \| ``"isBitmapSetForInterval"`` \| ``"wasDownForIntervals"``, `string`\>
• **methodIds**: `Record`\<``"slash"`` \| ``"slashingIncentives"`` \| ``"slashableDowntime"`` \| ``"checkProofOfPossession"`` \| ``"fractionMulExp"`` \| ``"getBlockNumberFromHeader"`` \| ``"getEpochNumber"`` \| ``"getEpochNumberOfBlock"`` \| ``"getEpochSize"`` \| ``"getParentSealBitmap"`` \| ``"getVerifiedSealBitmapFromHeader"`` \| ``"hashHeader"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"minQuorumSize"`` \| ``"minQuorumSizeInCurrentSet"`` \| ``"numberValidatorsInCurrentSet"`` \| ``"numberValidatorsInSet"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"validatorSignerAddressFromCurrentSet"`` \| ``"validatorSignerAddressFromSet"`` \| ``"initialize"`` \| ``"getVersionNumber"`` \| ``"bitmaps"`` \| ``"groupMembershipAtBlock"`` \| ``"lastSlashedBlock"`` \| ``"setSlashingIncentives"`` \| ``"setSlashableDowntime"`` \| ``"getBitmapForInterval"`` \| ``"setBitmapForInterval"`` \| ``"wasDownForInterval"`` \| ``"isBitmapSetForInterval"`` \| ``"wasDownForIntervals"``, `string`\>

#### Inherited from

Expand Down
Loading

0 comments on commit 06019bf

Please sign in to comment.