diff --git a/.changeset/blue-coins-call.md b/.changeset/blue-coins-call.md new file mode 100644 index 000000000..0abc38aaa --- /dev/null +++ b/.changeset/blue-coins-call.md @@ -0,0 +1,9 @@ +--- +'@celo/contractkit': minor +'@celo/governance': minor +'@celo/celocli': minor +--- + +Support for Core Contracts Release 11 (upgrade @celo/abis) + +see https://github.com/celo-org/celo-monorepo/releases/tag/core-contracts.v11 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b13d7b326..3320e8784 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ on: - changeset-release/master - prerelease/* pull_request: - types: [opened, reopened] + types: [opened, reopened, synchronize, edited, ready_for_review] concurrency: group: dev-tooling-${{ github.ref }} diff --git a/.gitignore b/.gitignore index d9350001d..9b32745dc 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,4 @@ package.json-e # Ignore generated credentials from google-github-actions/auth gha-creds-*.json +transactions.json diff --git a/packages/cli/package.json b/packages/cli/package.json index c42f6ab2a..9bc4803dc 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -32,7 +32,7 @@ "test": "TZ=UTC yarn jest --runInBand" }, "dependencies": { - "@celo/abis": "10.0.0", + "@celo/abis": "11.0.0", "@celo/base": "^6.0.0", "@celo/compliance": "~1.0.17", "@celo/connect": "^5.2.0", @@ -73,7 +73,7 @@ "web3-utils": "^1.10.0" }, "devDependencies": { - "@celo/celo-devchain": "^6.0.3", + "@celo/celo-devchain": "^7.0.0", "@celo/dev-utils": "0.0.1-beta.1", "@celo/typescript": "workspace:^", "@types/debug": "^4.1.4", diff --git a/packages/cli/src/commands/network/__snapshots__/contracts.test.ts.snap b/packages/cli/src/commands/network/__snapshots__/contracts.test.ts.snap index 61aee9a0e..8ec7fba33 100644 --- a/packages/cli/src/commands/network/__snapshots__/contracts.test.ts.snap +++ b/packages/cli/src/commands/network/__snapshots__/contracts.test.ts.snap @@ -128,7 +128,7 @@ exports[`network:contracts runs 1`] = ` "contract": "GasPriceMinimum", "proxy": "0x038F9B392Fb9A9676DbAddF78EA5fdbf6C7d9710", "implementation": "0x371b13d97f4bF77d724E78c16B7dC74099f40e84", - "version": "1.2.0.0", + "version": "1.2.0.1", "CELO": "0", "cUSD": "0", "cEUR": "0", @@ -148,7 +148,7 @@ exports[`network:contracts runs 1`] = ` "contract": "Governance", "proxy": "0x82E9A894F6b752E5c1058ea69898Ff5D3EBA3939", "implementation": "0xc98E260cBF7041cc2C42D7e055fb4350DF22dd68", - "version": "1.4.0.0", + "version": "1.4.1.0", "CELO": "0", "cUSD": "0", "cEUR": "0", @@ -158,7 +158,7 @@ exports[`network:contracts runs 1`] = ` "contract": "LockedGold", "proxy": "0x4A86aD5f263260f24483Df2B1B3a23ea4788B6AB", "implementation": "0x0221652D4306F6b3CB7B23E43C3e25D8F9a142Ca", - "version": "1.1.3.0", + "version": "1.1.4.0", "CELO": "0", "cUSD": "0", "cEUR": "0", @@ -218,7 +218,7 @@ exports[`network:contracts runs 1`] = ` "contract": "SortedOracles", "proxy": "0x4D3d5c850Dd5bD9D6F4AdDA3DD039a3C8054CA29", "implementation": "0xA31E64EA55B9B6Bbb9d6A676738e9A5b23149f84", - "version": "1.1.2.2", + "version": "1.1.3.0", "CELO": "0", "cUSD": "0", "cEUR": "0", diff --git a/packages/cli/src/test-utils/setup.global.ts b/packages/cli/src/test-utils/setup.global.ts index 3c90e3cc3..f44e92126 100644 --- a/packages/cli/src/test-utils/setup.global.ts +++ b/packages/cli/src/test-utils/setup.global.ts @@ -9,8 +9,8 @@ import * as path from 'path' export default async function globalSetup() { console.log('\nstarting ganache...') const chainDataPath = path.join(path.dirname(require.resolve('@celo/celo-devchain')), '../chains') - // v10 refers to core contract release 10 - await baseSetup(path.resolve(chainDataPath), 'v10.tar.gz', { + // v X refers to core contract release X + await baseSetup(path.resolve(chainDataPath), 'v11.tar.gz', { from_targz: true, }) console.log('\n ganache started...') diff --git a/packages/docs/command-line-interface/exchange.md b/packages/docs/command-line-interface/exchange.md index 11c127d0f..0cc2233f2 100644 --- a/packages/docs/command-line-interface/exchange.md +++ b/packages/docs/command-line-interface/exchange.md @@ -168,7 +168,7 @@ _See code: [src/commands/exchange/reals.ts](https://github.com/celo-org/develope ## `celocli exchange:show` -Show the current exchange rates offered by the Exchange +Show the current exchange rates offered by the Broker ``` USAGE @@ -180,7 +180,7 @@ FLAGS --globalHelp View all available global flags DESCRIPTION - Show the current exchange rates offered by the Exchange + Show the current exchange rates offered by the Broker EXAMPLES list diff --git a/packages/docs/command-line-interface/governance.md b/packages/docs/command-line-interface/governance.md index d24fe2e33..0dff4736b 100644 --- a/packages/docs/command-line-interface/governance.md +++ b/packages/docs/command-line-interface/governance.md @@ -238,8 +238,8 @@ Submit a governance proposal ``` USAGE $ celocli governance:propose --jsonTransactions --deposit --from - --descriptionURL [--globalHelp] [--force] [--afterExecutingProposal - | --afterExecutingID ] + --descriptionURL [--globalHelp] [--force] [--noInfo] + [--afterExecutingProposal | --afterExecutingID ] FLAGS --afterExecutingID= Governance proposal identifier @@ -247,7 +247,7 @@ FLAGS proposal --afterExecutingProposal= Path to proposal which will be executed prior to proposal - --deposit= (required) Amount of Gold to attach + --deposit= (required) Amount of Celo to attach to proposal --descriptionURL= (required) A URL where further information about the proposal can @@ -257,6 +257,7 @@ FLAGS --globalHelp View all available global flags --jsonTransactions= (required) Path to json transactions + --noInfo Skip printing the proposal info DESCRIPTION Submit a governance proposal diff --git a/packages/docs/sdk/docs/contractkit/classes/wrappers_GasPriceMinimum.GasPriceMinimumWrapper.md b/packages/docs/sdk/docs/contractkit/classes/wrappers_GasPriceMinimum.GasPriceMinimumWrapper.md index d78276f72..0ae41bbec 100644 --- a/packages/docs/sdk/docs/contractkit/classes/wrappers_GasPriceMinimum.GasPriceMinimumWrapper.md +++ b/packages/docs/sdk/docs/contractkit/classes/wrappers_GasPriceMinimum.GasPriceMinimumWrapper.md @@ -198,7 +198,7 @@ ___ ### methodIds -• **methodIds**: `Record`\<``"gasPriceMinimum"`` \| ``"targetDensity"`` \| ``"adjustmentSpeed"`` \| ``"initialized"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"baseFeeOpCodeActivationBlock"`` \| ``"deprecated_gasPriceMinimum"`` \| ``"gasPriceMinimumFloor"`` \| ``"setAdjustmentSpeed"`` \| ``"setTargetDensity"`` \| ``"setGasPriceMinimumFloor"`` \| ``"setBaseFeeOpCodeActivationBlock"`` \| ``"getGasPriceMinimum"`` \| ``"updateGasPriceMinimum"`` \| ``"getUpdatedGasPriceMinimum"``, `string`\> +• **methodIds**: `Record`\<``"gasPriceMinimum"`` \| ``"targetDensity"`` \| ``"adjustmentSpeed"`` \| ``"initialized"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"ABSOLUTE_MINIMAL_GAS_PRICE"`` \| ``"baseFeeOpCodeActivationBlock"`` \| ``"deprecated_gasPriceMinimum"`` \| ``"gasPriceMinimumFloor"`` \| ``"setAdjustmentSpeed"`` \| ``"setTargetDensity"`` \| ``"setGasPriceMinimumFloor"`` \| ``"setBaseFeeOpCodeActivationBlock"`` \| ``"getGasPriceMinimum"`` \| ``"updateGasPriceMinimum"`` \| ``"getUpdatedGasPriceMinimum"``, `string`\> #### Inherited from diff --git a/packages/docs/sdk/docs/contractkit/classes/wrappers_Governance.GovernanceWrapper.md b/packages/docs/sdk/docs/contractkit/classes/wrappers_Governance.GovernanceWrapper.md index e9fdccda8..02c763b66 100644 --- a/packages/docs/sdk/docs/contractkit/classes/wrappers_Governance.GovernanceWrapper.md +++ b/packages/docs/sdk/docs/contractkit/classes/wrappers_Governance.GovernanceWrapper.md @@ -930,7 +930,7 @@ ___ ### methodIds -• **methodIds**: `Record`\<``"propose"`` \| ``"executeHotfix"`` \| ``"concurrentProposals"`` \| ``"dequeueFrequency"`` \| ``"minDeposit"`` \| ``"queueExpiry"`` \| ``"stageDurations"`` \| ``"upvote"`` \| ``"refundedDeposits"`` \| ``"approver"`` \| ``"checkProofOfPossession"`` \| ``"dequeued"`` \| ``"emptyIndices"`` \| ``"fractionMulExp"`` \| ``"getBlockNumberFromHeader"`` \| ``"getEpochNumber"`` \| ``"getEpochNumberOfBlock"`` \| ``"getEpochSize"`` \| ``"getParentSealBitmap"`` \| ``"getVerifiedSealBitmapFromHeader"`` \| ``"hashHeader"`` \| ``"hotfixes"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"lastDequeue"`` \| ``"minQuorumSize"`` \| ``"minQuorumSizeInCurrentSet"`` \| ``"numberValidatorsInCurrentSet"`` \| ``"numberValidatorsInSet"`` \| ``"owner"`` \| ``"proposalCount"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"validatorSignerAddressFromCurrentSet"`` \| ``"validatorSignerAddressFromSet"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"setApprover"`` \| ``"setConcurrentProposals"`` \| ``"setMinDeposit"`` \| ``"setQueueExpiry"`` \| ``"setDequeueFrequency"`` \| ``"setReferendumStageDuration"`` \| ``"setExecutionStageDuration"`` \| ``"setParticipationBaseline"`` \| ``"setParticipationFloor"`` \| ``"setBaselineUpdateFactor"`` \| ``"setBaselineQuorumFactor"`` \| ``"setConstitution"`` \| ``"getProposalStage"`` \| ``"revokeUpvote"`` \| ``"approve"`` \| ``"vote"`` \| ``"votePartially"`` \| ``"revokeVotes"`` \| ``"execute"`` \| ``"approveHotfix"`` \| ``"isHotfixWhitelistedBy"`` \| ``"whitelistHotfix"`` \| ``"prepareHotfix"`` \| ``"withdraw"`` \| ``"isVoting"`` \| ``"getReferendumStageDuration"`` \| ``"getExecutionStageDuration"`` \| ``"getParticipationParameters"`` \| ``"proposalExists"`` \| ``"getProposal"`` \| ``"getProposalTransaction"`` \| ``"isApproved"`` \| ``"getVoteTotals"`` \| ``"getVoteRecord"`` \| ``"getQueueLength"`` \| ``"getUpvotes"`` \| ``"getQueue"`` \| ``"getDequeue"`` \| ``"getUpvoteRecord"`` \| ``"getMostRecentReferendumProposal"`` \| ``"hotfixWhitelistValidatorTally"`` \| ``"isHotfixPassing"`` \| ``"getHotfixRecord"`` \| ``"dequeueProposalsIfReady"`` \| ``"isQueued"`` \| ``"isProposalPassing"`` \| ``"isDequeuedProposal"`` \| ``"isDequeuedProposalExpired"`` \| ``"isQueuedProposalExpired"`` \| ``"getConstitution"`` \| ``"getAmountOfGoldUsedForVoting"`` \| ``"removeVotesWhenRevokingDelegatedVotes"``, `string`\> +• **methodIds**: `Record`\<``"propose"`` \| ``"executeHotfix"`` \| ``"concurrentProposals"`` \| ``"dequeueFrequency"`` \| ``"minDeposit"`` \| ``"queueExpiry"`` \| ``"stageDurations"`` \| ``"upvote"`` \| ``"refundedDeposits"`` \| ``"approver"`` \| ``"checkProofOfPossession"`` \| ``"dequeued"`` \| ``"emptyIndices"`` \| ``"fractionMulExp"`` \| ``"getBlockNumberFromHeader"`` \| ``"getEpochNumber"`` \| ``"getEpochNumberOfBlock"`` \| ``"getEpochSize"`` \| ``"getParentSealBitmap"`` \| ``"getVerifiedSealBitmapFromHeader"`` \| ``"hashHeader"`` \| ``"hotfixes"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"lastDequeue"`` \| ``"minQuorumSize"`` \| ``"minQuorumSizeInCurrentSet"`` \| ``"numberValidatorsInCurrentSet"`` \| ``"numberValidatorsInSet"`` \| ``"owner"`` \| ``"proposalCount"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"validatorSignerAddressFromCurrentSet"`` \| ``"validatorSignerAddressFromSet"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"setApprover"`` \| ``"setConcurrentProposals"`` \| ``"setMinDeposit"`` \| ``"setQueueExpiry"`` \| ``"setDequeueFrequency"`` \| ``"setReferendumStageDuration"`` \| ``"setExecutionStageDuration"`` \| ``"setParticipationBaseline"`` \| ``"setParticipationFloor"`` \| ``"setBaselineUpdateFactor"`` \| ``"setBaselineQuorumFactor"`` \| ``"setConstitution"`` \| ``"getProposalStage"`` \| ``"revokeUpvote"`` \| ``"approve"`` \| ``"vote"`` \| ``"votePartially"`` \| ``"revokeVotes"`` \| ``"execute"`` \| ``"approveHotfix"`` \| ``"isHotfixWhitelistedBy"`` \| ``"whitelistHotfix"`` \| ``"prepareHotfix"`` \| ``"withdraw"`` \| ``"isVoting"`` \| ``"getReferendumStageDuration"`` \| ``"getExecutionStageDuration"`` \| ``"getParticipationParameters"`` \| ``"proposalExists"`` \| ``"getProposal"`` \| ``"getProposalTransaction"`` \| ``"isApproved"`` \| ``"getVoteTotals"`` \| ``"getVoteRecord"`` \| ``"getQueueLength"`` \| ``"getUpvotes"`` \| ``"getQueue"`` \| ``"getDequeue"`` \| ``"getUpvoteRecord"`` \| ``"getMostRecentReferendumProposal"`` \| ``"hotfixWhitelistValidatorTally"`` \| ``"isHotfixPassing"`` \| ``"getHotfixRecord"`` \| ``"dequeueProposalsIfReady"`` \| ``"isQueued"`` \| ``"isProposalPassing"`` \| ``"isDequeuedProposal"`` \| ``"isDequeuedProposalExpired"`` \| ``"isQueuedProposalExpired"`` \| ``"getConstitution"`` \| ``"getAmountOfGoldUsedForVoting"`` \| ``"removeVotesWhenRevokingDelegatedVotes"`` \| ``"getHotfixHash"``, `string`\> #### Inherited from diff --git a/packages/docs/sdk/docs/contractkit/classes/wrappers_LockedGold.LockedGoldWrapper.md b/packages/docs/sdk/docs/contractkit/classes/wrappers_LockedGold.LockedGoldWrapper.md index 30942e99b..832908497 100644 --- a/packages/docs/sdk/docs/contractkit/classes/wrappers_LockedGold.LockedGoldWrapper.md +++ b/packages/docs/sdk/docs/contractkit/classes/wrappers_LockedGold.LockedGoldWrapper.md @@ -88,7 +88,7 @@ Contract for handling deposits needed for voting. ### \_getTotalPendingWithdrawalsCount -• **\_getTotalPendingWithdrawalsCount**: (...`args`: `any`[]) => `Promise`\<`BigNumber`\> +• **\_getTotalPendingWithdrawalsCount**: (...`args`: [account: string]) => `Promise`\<`BigNumber`\> #### Type declaration @@ -98,7 +98,7 @@ Contract for handling deposits needed for voting. | Name | Type | | :------ | :------ | -| `...args` | `any`[] | +| `...args` | [account: string] | ##### Returns @@ -106,7 +106,7 @@ Contract for handling deposits needed for voting. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:412](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L412) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:402](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L402) ___ @@ -143,7 +143,7 @@ Relocks gold that has been unlocked but not withdrawn. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:191](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L191) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:190](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L190) ___ @@ -171,7 +171,7 @@ Delegates locked gold. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:94](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L94) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:93](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L93) ___ @@ -252,7 +252,7 @@ The total amount of non-voting locked gold for an account. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:224](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L224) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:223](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L223) ___ @@ -286,7 +286,7 @@ The total amount of locked gold for an account. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:202](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L202) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:201](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L201) ___ @@ -318,7 +318,7 @@ The total amount of locked gold in the system. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:213](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L213) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:212](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L212) ___ @@ -348,13 +348,13 @@ The gold to be locked, must be specified as the `tx.value` #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:89](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L89) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:88](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L88) ___ ### methodIds -• **methodIds**: `Record`\<``"unlockingPeriod"`` \| ``"slash"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"withdraw"`` \| ``"slashingWhitelist"`` \| ``"totalDelegatedCelo"`` \| ``"totalNonvoting"`` \| ``"isSlasher"`` \| ``"setUnlockingPeriod"`` \| ``"setMaxDelegateesCount"`` \| ``"lock"`` \| ``"incrementNonvotingAccountBalance"`` \| ``"decrementNonvotingAccountBalance"`` \| ``"unlock"`` \| ``"relock"`` \| ``"getTotalLockedGold"`` \| ``"getNonvotingLockedGold"`` \| ``"delegateGovernanceVotes"`` \| ``"revokeDelegatedGovernanceVotes"`` \| ``"updateDelegatedAmount"`` \| ``"getAccountTotalDelegatedFraction"`` \| ``"getAccountTotalLockedGold"`` \| ``"getAccountTotalGovernanceVotingPower"`` \| ``"getDelegatorDelegateeInfo"`` \| ``"getDelegatorDelegateeExpectedAndRealAmount"`` \| ``"getDelegateesOfDelegator"`` \| ``"getAccountNonvotingLockedGold"`` \| ``"getPendingWithdrawals"`` \| ``"getPendingWithdrawal"`` \| ``"getTotalPendingWithdrawals"`` \| ``"getSlashingWhitelist"`` \| ``"addSlasher"`` \| ``"removeSlasher"``, `string`\> +• **methodIds**: `Record`\<``"unlockingPeriod"`` \| ``"slash"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"owner"`` \| ``"registry"`` \| ``"renounceOwnership"`` \| ``"setRegistry"`` \| ``"transferOwnership"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"withdraw"`` \| ``"slashingWhitelist"`` \| ``"totalDelegatedCelo"`` \| ``"totalNonvoting"`` \| ``"isSlasher"`` \| ``"setUnlockingPeriod"`` \| ``"setMaxDelegateesCount"`` \| ``"lock"`` \| ``"incrementNonvotingAccountBalance"`` \| ``"decrementNonvotingAccountBalance"`` \| ``"unlock"`` \| ``"relock"`` \| ``"getTotalLockedGold"`` \| ``"getNonvotingLockedGold"`` \| ``"delegateGovernanceVotes"`` \| ``"revokeDelegatedGovernanceVotes"`` \| ``"updateDelegatedAmount"`` \| ``"getAccountTotalDelegatedFraction"`` \| ``"getAccountTotalLockedGold"`` \| ``"getAccountTotalGovernanceVotingPower"`` \| ``"getDelegatorDelegateeInfo"`` \| ``"getDelegatorDelegateeExpectedAndRealAmount"`` \| ``"getDelegateesOfDelegator"`` \| ``"getAccountNonvotingLockedGold"`` \| ``"getPendingWithdrawals"`` \| ``"getPendingWithdrawal"`` \| ``"getTotalPendingWithdrawalsCount"`` \| ``"getTotalPendingWithdrawals"`` \| ``"getSlashingWhitelist"`` \| ``"addSlasher"`` \| ``"removeSlasher"``, `string`\> #### Inherited from @@ -390,7 +390,7 @@ Revokes delegated locked gold. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:105](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L105) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:104](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L104) ___ @@ -422,7 +422,7 @@ Unlocks gold that becomes withdrawable after the unlocking period. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:140](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L140) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:139](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L139) ___ @@ -452,7 +452,7 @@ and the amount of delegated locked gold because of received rewards. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:100](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L100) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:99](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L99) ___ @@ -484,7 +484,7 @@ Withdraws a gold that has been unlocked after the unlocking period has passed. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:80](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L80) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:79](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L79) ## Accessors @@ -529,7 +529,7 @@ List of (group, voting gold) to decrement from `account`. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:342](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L342) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:341](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L341) ___ @@ -551,7 +551,7 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:349](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L349) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:348](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L348) ___ @@ -571,7 +571,7 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:252](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L252) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:251](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L251) ___ @@ -595,7 +595,7 @@ The total amount of governance voting power for an account. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:276](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L276) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:275](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L275) ___ @@ -617,7 +617,7 @@ Retrieves AccountSlashed for epochNumber. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:319](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L319) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:318](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L318) ___ @@ -633,7 +633,7 @@ Returns current configuration parameters. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:233](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L233) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:232](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L232) ___ @@ -653,7 +653,7 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:116](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L116) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:115](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L115) ___ @@ -673,7 +673,7 @@ Returns human readable configuration of the lockedgold contract #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:244](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L244) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:243](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L243) ___ @@ -687,7 +687,7 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:107](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L107) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:106](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L106) ___ @@ -741,7 +741,7 @@ The timestamp of the pending withdrawal. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:307](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L307) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:306](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L306) ___ @@ -765,7 +765,7 @@ The value and timestamp for each pending withdrawal. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:288](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L288) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:287](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L287) ___ @@ -785,7 +785,7 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:146](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L146) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:145](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L145) ___ @@ -807,13 +807,9 @@ Returns the number of pending withdrawals for the specified account. The count of pending withdrawals. -**`Notice`** - -This method is only available in version 1.1.4 or higher of the LockedGold contract. - #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:400](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L400) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:398](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L398) ___ @@ -836,7 +832,7 @@ Relocks gold that has been unlocked but not withdrawn. #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:158](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L158) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:157](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L157) ___ diff --git a/packages/docs/sdk/docs/contractkit/classes/wrappers_SortedOracles.SortedOraclesWrapper.md b/packages/docs/sdk/docs/contractkit/classes/wrappers_SortedOracles.SortedOraclesWrapper.md index 96c20d459..00958c4b2 100644 --- a/packages/docs/sdk/docs/contractkit/classes/wrappers_SortedOracles.SortedOraclesWrapper.md +++ b/packages/docs/sdk/docs/contractkit/classes/wrappers_SortedOracles.SortedOraclesWrapper.md @@ -99,6 +99,8 @@ ___ | Name | Type | | :------ | :------ | +| `BreakerBoxUpdated` | `ContractEvent`\<`string`\> | +| `EquivalentTokenSet` | `ContractEvent`\<\{ `0`: `string` ; `1`: `string` ; `equivalentToken`: `string` ; `token`: `string` }\> | | `MedianUpdated` | `ContractEvent`\<\{ `0`: `string` ; `1`: `string` ; `token`: `string` ; `value`: `string` }\> | | `OracleAdded` | `ContractEvent`\<\{ `0`: `string` ; `1`: `string` ; `oracleAddress`: `string` ; `token`: `string` }\> | | `OracleRemoved` | `ContractEvent`\<\{ `0`: `string` ; `1`: `string` ; `oracleAddress`: `string` ; `token`: `string` }\> | @@ -121,7 +123,7 @@ ___ ### methodIds -• **methodIds**: `Record`\<``"reportExpirySeconds"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"owner"`` \| ``"renounceOwnership"`` \| ``"transferOwnership"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"isOracle"`` \| ``"oracles"`` \| ``"tokenReportExpirySeconds"`` \| ``"setReportExpiry"`` \| ``"setTokenReportExpiry"`` \| ``"addOracle"`` \| ``"removeOracle"`` \| ``"removeExpiredReports"`` \| ``"isOldestReportExpired"`` \| ``"report"`` \| ``"numRates"`` \| ``"medianRate"`` \| ``"getRates"`` \| ``"numTimestamps"`` \| ``"medianTimestamp"`` \| ``"getTimestamps"`` \| ``"getOracles"`` \| ``"getTokenReportExpirySeconds"``, `string`\> +• **methodIds**: `Record`\<``"reportExpirySeconds"`` \| ``"initialized"`` \| ``"isOwner"`` \| ``"owner"`` \| ``"renounceOwnership"`` \| ``"transferOwnership"`` \| ``"getVersionNumber"`` \| ``"initialize"`` \| ``"breakerBox"`` \| ``"equivalentTokens"`` \| ``"isOracle"`` \| ``"oracles"`` \| ``"tokenReportExpirySeconds"`` \| ``"setReportExpiry"`` \| ``"setTokenReportExpiry"`` \| ``"setBreakerBox"`` \| ``"addOracle"`` \| ``"removeOracle"`` \| ``"removeExpiredReports"`` \| ``"isOldestReportExpired"`` \| ``"setEquivalentToken"`` \| ``"deleteEquivalentToken"`` \| ``"getEquivalentToken"`` \| ``"report"`` \| ``"numRates"`` \| ``"medianRateWithoutEquivalentMapping"`` \| ``"medianRate"`` \| ``"getRates"`` \| ``"numTimestamps"`` \| ``"medianTimestamp"`` \| ``"getTimestamps"`` \| ``"getOracles"`` \| ``"getTokenReportExpirySeconds"``, `string`\> #### Inherited from @@ -253,7 +255,7 @@ Contract getPastEvents | Name | Type | | :------ | :------ | -| `event` | ``"OwnershipTransferred"`` \| ``"allEvents"`` \| ``"MedianUpdated"`` \| ``"OracleAdded"`` \| ``"OracleRemoved"`` \| ``"OracleReportRemoved"`` \| ``"OracleReported"`` \| ``"ReportExpirySet"`` \| ``"TokenReportExpirySet"`` | +| `event` | ``"OwnershipTransferred"`` \| ``"allEvents"`` \| ``"BreakerBoxUpdated"`` \| ``"EquivalentTokenSet"`` \| ``"MedianUpdated"`` \| ``"OracleAdded"`` \| ``"OracleRemoved"`` \| ``"OracleReportRemoved"`` \| ``"OracleReported"`` \| ``"ReportExpirySet"`` \| ``"TokenReportExpirySet"`` | | `options` | `PastEventOptions` | #### Returns diff --git a/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.AccountSlashed.md b/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.AccountSlashed.md index 629413240..3724e7647 100644 --- a/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.AccountSlashed.md +++ b/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.AccountSlashed.md @@ -22,7 +22,7 @@ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:58](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L58) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:57](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L57) ___ @@ -32,7 +32,7 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:55](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L55) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:54](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L54) ___ @@ -42,7 +42,7 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:56](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L56) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:55](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L55) ___ @@ -52,7 +52,7 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:57](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L57) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:56](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L56) ___ @@ -62,4 +62,4 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:54](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L54) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:53](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L53) diff --git a/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.DelegateInfo.md b/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.DelegateInfo.md index 69741ed80..c9996bee0 100644 --- a/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.DelegateInfo.md +++ b/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.DelegateInfo.md @@ -20,7 +20,7 @@ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:39](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L39) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:38](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L38) ___ @@ -30,7 +30,7 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:38](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L38) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:37](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L37) ___ @@ -40,4 +40,4 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:40](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L40) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:39](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L39) diff --git a/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.LockedGoldConfig.md b/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.LockedGoldConfig.md index c04cb6c78..98feed7ee 100644 --- a/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.LockedGoldConfig.md +++ b/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.LockedGoldConfig.md @@ -19,7 +19,7 @@ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:68](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L68) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:67](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L67) ___ @@ -29,4 +29,4 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:67](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L67) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:66](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L66) diff --git a/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.PendingWithdrawal.md b/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.PendingWithdrawal.md index 01b2788dd..234eadf4c 100644 --- a/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.PendingWithdrawal.md +++ b/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.PendingWithdrawal.md @@ -19,7 +19,7 @@ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:62](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L62) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:61](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L61) ___ @@ -29,4 +29,4 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:63](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L63) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:62](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L62) diff --git a/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.VotingDetails.md b/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.VotingDetails.md index 7976cd204..9d42fc60f 100644 --- a/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.VotingDetails.md +++ b/packages/docs/sdk/docs/contractkit/interfaces/wrappers_LockedGold.VotingDetails.md @@ -20,7 +20,7 @@ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:31](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L31) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:30](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L30) ___ @@ -30,7 +30,7 @@ ___ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:32](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L32) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:31](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L31) ___ @@ -42,4 +42,4 @@ vote's weight #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:34](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L34) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:33](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L33) diff --git a/packages/docs/sdk/docs/contractkit/modules/test_utils_setup_global.md b/packages/docs/sdk/docs/contractkit/modules/test_utils_setup_global.md index 5fa6aab99..07b55a3cf 100644 --- a/packages/docs/sdk/docs/contractkit/modules/test_utils_setup_global.md +++ b/packages/docs/sdk/docs/contractkit/modules/test_utils_setup_global.md @@ -20,4 +20,4 @@ #### Defined in -[packages/sdk/contractkit/src/test-utils/setup.global.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/test-utils/setup.global.ts#L10) +[packages/sdk/contractkit/src/test-utils/setup.global.ts:9](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/test-utils/setup.global.ts#L9) diff --git a/packages/docs/sdk/docs/contractkit/modules/wrappers_LockedGold.md b/packages/docs/sdk/docs/contractkit/modules/wrappers_LockedGold.md index 45defb8d0..21fbc87de 100644 --- a/packages/docs/sdk/docs/contractkit/modules/wrappers_LockedGold.md +++ b/packages/docs/sdk/docs/contractkit/modules/wrappers_LockedGold.md @@ -28,4 +28,4 @@ #### Defined in -[packages/sdk/contractkit/src/wrappers/LockedGold.ts:420](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L420) +[packages/sdk/contractkit/src/wrappers/LockedGold.ts:409](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L409) diff --git a/packages/sdk/contractkit/package.json b/packages/sdk/contractkit/package.json index ef4f419e3..567d97cda 100644 --- a/packages/sdk/contractkit/package.json +++ b/packages/sdk/contractkit/package.json @@ -24,7 +24,7 @@ "lint": "yarn run --top-level eslint -c .eslintrc.js " }, "dependencies": { - "@celo/abis": "10.0.0", + "@celo/abis": "11.0.0", "@celo/base": "^6.0.0", "@celo/connect": "^5.2.0", "@celo/utils": "^6.0.0", @@ -41,7 +41,7 @@ "web3-core-helpers": "1.10.0" }, "devDependencies": { - "@celo/celo-devchain": "^6.0.3", + "@celo/celo-devchain": "^7.0.0", "@celo/dev-utils": "0.0.1-beta.1", "@celo/odis-identifiers": "^1.0.0", "@truffle/contract": "4.6.31", diff --git a/packages/sdk/contractkit/src/test-utils/setup.global.ts b/packages/sdk/contractkit/src/test-utils/setup.global.ts index 016be0d32..1094dd063 100644 --- a/packages/sdk/contractkit/src/test-utils/setup.global.ts +++ b/packages/sdk/contractkit/src/test-utils/setup.global.ts @@ -1,17 +1,16 @@ import baseSetup from '@celo/dev-utils/lib/ganache-setup' // Has to import the matchers somewhere so that typescript knows the matchers have been made available -import _unused from '@celo/dev-utils/lib/matchers' +import _very_important from '@celo/dev-utils/lib/matchers' import { waitForPortOpen } from '@celo/dev-utils/lib/network' import * as path from 'path' // Warning: There should be an unused import of '@celo/dev-utils/lib/matchers' above. // If there is not, then your editor probably deleted it automatically. - export default async function globalSetup() { console.log('\nstarting ganache...') const chainDataPath = path.join(path.dirname(require.resolve('@celo/celo-devchain')), '../chains') - // v10 refers to core contract release 10 - await baseSetup(path.resolve(chainDataPath), 'v10.tar.gz', { + // v refers to core contract release version + await baseSetup(path.resolve(chainDataPath), 'v11.tar.gz', { from_targz: true, }) await waitForPortOpen('localhost', 8545, 60) diff --git a/packages/sdk/contractkit/src/wrappers/LockedGold.test.ts b/packages/sdk/contractkit/src/wrappers/LockedGold.test.ts index b8cee9ba7..65f89578b 100644 --- a/packages/sdk/contractkit/src/wrappers/LockedGold.test.ts +++ b/packages/sdk/contractkit/src/wrappers/LockedGold.test.ts @@ -43,14 +43,7 @@ testWithGanache('LockedGold Wrapper', (web3) => { await Promise.all(txos.map((txo) => txo.sendAndWaitForReceipt())) // }) - // when this fails the 2 tests below should pass. - test('getTotalPendingWithdrawalsCount throws when version is below minimum', async () => { - // eslint-disable-next-line @typescript-eslint/no-floating-promises - expect(lockedGold.getTotalPendingWithdrawalsCount(account)).rejects.toThrowError( - 'getTotalPendingWithdrawalsCount not implemented for LockedGold version (1.1.3.0) deployed to this chain' - ) - }) - test.failing('should return the count of pending withdrawals', async () => { + test('should return the count of pending withdrawals', async () => { await lockedGold.lock().sendAndWaitForReceipt({ value: value * 2 }) await lockedGold.unlock(value).sendAndWaitForReceipt() await lockedGold.unlock(value).sendAndWaitForReceipt() @@ -59,7 +52,7 @@ testWithGanache('LockedGold Wrapper', (web3) => { expect(count).toEqBigNumber(2) }) - test.failing('should return zero when there are no pending withdrawals', async () => { + test('should return zero when there are no pending withdrawals', async () => { const count = await lockedGold.getTotalPendingWithdrawalsCount(account) expect(count).toEqBigNumber(0) }) diff --git a/packages/sdk/contractkit/src/wrappers/LockedGold.ts b/packages/sdk/contractkit/src/wrappers/LockedGold.ts index 4ed5912b3..efcba7f20 100644 --- a/packages/sdk/contractkit/src/wrappers/LockedGold.ts +++ b/packages/sdk/contractkit/src/wrappers/LockedGold.ts @@ -7,7 +7,6 @@ import { } from '@celo/base/lib/collections' import { Address, CeloTransactionObject, EventLog } from '@celo/connect' import BigNumber from 'bignumber.js' -import { ContractVersion } from '../versions' import { proxyCall, proxySend, @@ -394,23 +393,13 @@ export class LockedGoldWrapper extends BaseWrapperForGoverning { /** * Returns the number of pending withdrawals for the specified account. * @param account The account. - * @notice This method is only available in version 1.1.4 or higher of the LockedGold contract. * @returns The count of pending withdrawals. */ async getTotalPendingWithdrawalsCount(account: string) { - const minVersion = new ContractVersion(1, 1, 4, 0) - const version = await this.version() - if (version.isAtLeast(minVersion)) { - return this._getTotalPendingWithdrawalsCount(account) - } else { - throw new Error( - `getTotalPendingWithdrawalsCount not implemented for LockedGold version (${version.toString()}) deployed to this chain` - ) - } + return this._getTotalPendingWithdrawalsCount(account) } _getTotalPendingWithdrawalsCount = proxyCall( - // @ts-expect-error this.contract.methods.getTotalPendingWithdrawalsCount, undefined, valueToBigNumber diff --git a/packages/sdk/governance/package.json b/packages/sdk/governance/package.json index 3029c481f..e9ea10d72 100644 --- a/packages/sdk/governance/package.json +++ b/packages/sdk/governance/package.json @@ -21,7 +21,7 @@ "prepublishOnly": "yarn build" }, "dependencies": { - "@celo/abis": "10.0.0", + "@celo/abis": "11.0.0", "@celo/base": "^6.0.0", "@celo/connect": "^5.2.0", "@celo/contractkit": "^7.1.0", diff --git a/packages/sdk/transactions-uri/package.json b/packages/sdk/transactions-uri/package.json index 61ded538b..c69598ada 100644 --- a/packages/sdk/transactions-uri/package.json +++ b/packages/sdk/transactions-uri/package.json @@ -31,7 +31,7 @@ "web3-eth-abi": "1.10.0" }, "devDependencies": { - "@celo/celo-devchain": "^6.0.3", + "@celo/celo-devchain": "^7.0.0", "@celo/contractkit": "^7.1.0", "@celo/dev-utils": "0.0.1-beta.1", "dotenv": "^8.2.0" diff --git a/packages/sdk/transactions-uri/src/test-utils/setup.global.ts b/packages/sdk/transactions-uri/src/test-utils/setup.global.ts index c6605fd24..5acd592ee 100644 --- a/packages/sdk/transactions-uri/src/test-utils/setup.global.ts +++ b/packages/sdk/transactions-uri/src/test-utils/setup.global.ts @@ -1,6 +1,6 @@ import baseSetup from '@celo/dev-utils/lib/ganache-setup' // Has to import the matchers somewhere so that typescript knows the matchers have been made available -import _unused from '@celo/dev-utils/lib/matchers' +import _must_be_imported from '@celo/dev-utils/lib/matchers' import { waitForPortOpen } from '@celo/dev-utils/lib/network' import * as path from 'path' @@ -9,8 +9,8 @@ import * as path from 'path' export default async function globalSetup() { const chainDataPath = path.join(path.dirname(require.resolve('@celo/celo-devchain')), '../chains') - // v10 refers to core contract release 10 - await baseSetup(path.resolve(chainDataPath), 'v10.tar.gz', { + // vX refers to core contract release version X + await baseSetup(path.resolve(chainDataPath), 'v11.tar.gz', { from_targz: true, }) await waitForPortOpen('localhost', 8545, 60) diff --git a/yarn.lock b/yarn.lock index 7b5612d85..6c9479e40 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1536,10 +1536,10 @@ __metadata: languageName: node linkType: hard -"@celo/abis@npm:10.0.0": - version: 10.0.0 - resolution: "@celo/abis@npm:10.0.0" - checksum: 963571a9ed7d749df2437305df05cac7ed32c4902c00345fc678964faad01a28e3bc67dc7b29132945dec4ee0d177920d803bdf62b8250767a02a263cdee0213 +"@celo/abis@npm:11.0.0": + version: 11.0.0 + resolution: "@celo/abis@npm:11.0.0" + checksum: f54204d2fad17e01201b03efbea02837c9b360130d201f229cca6f048031ca20aeea964599ac8ba8c3a367f8dba861f79ace4d47376cbd5379f9987fec4a10c8 languageName: node linkType: hard @@ -1571,9 +1571,9 @@ __metadata: languageName: node linkType: hard -"@celo/celo-devchain@npm:^6.0.3": - version: 6.0.3 - resolution: "@celo/celo-devchain@npm:6.0.3" +"@celo/celo-devchain@npm:^7.0.0": + version: 7.0.0 + resolution: "@celo/celo-devchain@npm:7.0.0" dependencies: commander: "npm:^10.0.0" ganache: "npm:@celo/ganache@7.8.0-unofficial.0" @@ -1582,7 +1582,7 @@ __metadata: tmp: "npm:^0.2.1" bin: celo-devchain: dist/run.js - checksum: 23acd0626b13e2805c2d3e57614f3998ec18fe6b0d8bcba9bca3d59d0e8f9d70b6f115f161fcec6e11b98f2e9acef14cdf106a2657d5c94abfb5980eba0df034 + checksum: 91f3fd48475eb0a9ee1e0c8ad1adb9461ac884023ae87b49e5080421f66b57c9d28764bcdd21cb4c5de0af72b802037330bf8e5b1a82177d716aaf1c3f64bb8f languageName: node linkType: hard @@ -1590,9 +1590,9 @@ __metadata: version: 0.0.0-use.local resolution: "@celo/celocli@workspace:packages/cli" dependencies: - "@celo/abis": "npm:10.0.0" + "@celo/abis": "npm:11.0.0" "@celo/base": "npm:^6.0.0" - "@celo/celo-devchain": "npm:^6.0.3" + "@celo/celo-devchain": "npm:^7.0.0" "@celo/compliance": "npm:~1.0.17" "@celo/connect": "npm:^5.2.0" "@celo/contractkit": "npm:^7.1.0" @@ -1728,9 +1728,9 @@ __metadata: version: 0.0.0-use.local resolution: "@celo/contractkit@workspace:packages/sdk/contractkit" dependencies: - "@celo/abis": "npm:10.0.0" + "@celo/abis": "npm:11.0.0" "@celo/base": "npm:^6.0.0" - "@celo/celo-devchain": "npm:^6.0.3" + "@celo/celo-devchain": "npm:^7.0.0" "@celo/connect": "npm:^5.2.0" "@celo/dev-utils": "npm:0.0.1-beta.1" "@celo/odis-identifiers": "npm:^1.0.0" @@ -1816,7 +1816,7 @@ __metadata: version: 0.0.0-use.local resolution: "@celo/governance@workspace:packages/sdk/governance" dependencies: - "@celo/abis": "npm:10.0.0" + "@celo/abis": "npm:11.0.0" "@celo/base": "npm:^6.0.0" "@celo/connect": "npm:^5.2.0" "@celo/contractkit": "npm:^7.1.0" @@ -1938,7 +1938,7 @@ __metadata: resolution: "@celo/transactions-uri@workspace:packages/sdk/transactions-uri" dependencies: "@celo/base": "npm:^6.0.0" - "@celo/celo-devchain": "npm:^6.0.3" + "@celo/celo-devchain": "npm:^7.0.0" "@celo/connect": "npm:^5.2.0" "@celo/contractkit": "npm:^7.1.0" "@celo/dev-utils": "npm:0.0.1-beta.1"