Skip to content

Commit

Permalink
upgrade abis to include governance (#463)
Browse files Browse the repository at this point in the history
### Description

although not a new contract governanceslasher was missing from from
registered contracts list.

#### Other changes

no
### Tested
existing tests, called celocli governance:build-proposal and selected
GovernanceSlasher from the list
### Related issues

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces the `GovernanceSlasher` to the
`RegisteredContractsEnum`, updates dependencies, and modifies related
contract factory and documentation files.

### Detailed summary
- Added `GovernanceSlasher` to `RegisteredContractsEnum` in `base.ts`.
- Updated dependencies for `@celo/abis-12` in `package.json` files.
- Imported `newGovernanceSlasher` in `web3-contract-cache.ts`.
- Updated `ContractFactories` to include `GovernanceSlasher`.
- Updated documentation to reflect the addition of `GovernanceSlasher`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
  • Loading branch information
aaronmgdr authored Nov 26, 2024
1 parent 721e26d commit eba89a3
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 67 deletions.
7 changes: 7 additions & 0 deletions .changeset/breezy-panthers-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@celo/contractkit': patch
'@celo/governance': patch
'@celo/celocli': patch
---

Add GovernanceSlasher to RegisteredContractsEnum

Large diffs are not rendered by default.

39 changes: 25 additions & 14 deletions docs/sdk/contractkit/enums/base.CeloContract.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- [GasPriceMinimum](base.CeloContract.md#gaspriceminimum)
- [GoldToken](base.CeloContract.md#goldtoken)
- [Governance](base.CeloContract.md#governance)
- [GovernanceSlasher](base.CeloContract.md#governanceslasher)
- [LockedGold](base.CeloContract.md#lockedgold)
- [MentoFeeHandlerSeller](base.CeloContract.md#mentofeehandlerseller)
- [MultiSig](base.CeloContract.md#multisig)
Expand Down Expand Up @@ -245,13 +246,23 @@ ___

___

### GovernanceSlasher

**GovernanceSlasher** = ``"GovernanceSlasher"``

#### Defined in

[packages/sdk/contractkit/src/base.ts:22](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L22)

___

### LockedGold

**LockedGold** = ``"LockedGold"``

#### Defined in

[packages/sdk/contractkit/src/base.ts:22](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L22)
[packages/sdk/contractkit/src/base.ts:23](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L23)

___

Expand All @@ -261,7 +272,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:23](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L23)
[packages/sdk/contractkit/src/base.ts:24](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L24)

___

Expand All @@ -271,7 +282,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:25](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L25)
[packages/sdk/contractkit/src/base.ts:26](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L26)

___

Expand All @@ -281,7 +292,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:26](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L26)
[packages/sdk/contractkit/src/base.ts:27](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L27)

___

Expand All @@ -291,7 +302,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:27](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L27)
[packages/sdk/contractkit/src/base.ts:28](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L28)

___

Expand All @@ -301,7 +312,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:28](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L28)
[packages/sdk/contractkit/src/base.ts:29](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L29)

___

Expand All @@ -311,7 +322,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:29](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L29)
[packages/sdk/contractkit/src/base.ts:30](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L30)

___

Expand All @@ -321,7 +332,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:30](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L30)
[packages/sdk/contractkit/src/base.ts:31](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L31)

___

Expand All @@ -331,7 +342,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:31](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L31)
[packages/sdk/contractkit/src/base.ts:32](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L32)

___

Expand All @@ -341,7 +352,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:32](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L32)
[packages/sdk/contractkit/src/base.ts:33](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L33)

___

Expand All @@ -351,7 +362,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:34](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L34)
[packages/sdk/contractkit/src/base.ts:35](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L35)

___

Expand All @@ -361,7 +372,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:33](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L33)
[packages/sdk/contractkit/src/base.ts:34](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L34)

___

Expand All @@ -371,7 +382,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:24](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L24)
[packages/sdk/contractkit/src/base.ts:25](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L25)

___

Expand All @@ -381,4 +392,4 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:35](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L35)
[packages/sdk/contractkit/src/base.ts:36](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L36)
16 changes: 8 additions & 8 deletions docs/sdk/contractkit/modules/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Use CeloTokenContract instead

#### Defined in

[packages/sdk/contractkit/src/base.ts:48](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L48)
[packages/sdk/contractkit/src/base.ts:49](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L49)

___

Expand All @@ -49,7 +49,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:43](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L43)
[packages/sdk/contractkit/src/base.ts:44](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L44)

___

Expand All @@ -59,7 +59,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:38](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L38)
[packages/sdk/contractkit/src/base.ts:39](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L39)

## Variables

Expand All @@ -69,7 +69,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:50](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L50)
[packages/sdk/contractkit/src/base.ts:51](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L51)

___

Expand All @@ -79,7 +79,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:61](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L61)
[packages/sdk/contractkit/src/base.ts:62](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L62)

___

Expand All @@ -89,7 +89,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:52](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L52)
[packages/sdk/contractkit/src/base.ts:53](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L53)

## Functions

Expand All @@ -109,7 +109,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:55](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L55)
[packages/sdk/contractkit/src/base.ts:56](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L56)

___

Expand All @@ -129,4 +129,4 @@ ___

#### Defined in

[packages/sdk/contractkit/src/base.ts:58](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L58)
[packages/sdk/contractkit/src/base.ts:59](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/base.ts#L59)
5 changes: 3 additions & 2 deletions docs/sdk/contractkit/modules/web3_contract_cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#### Defined in

[packages/sdk/contractkit/src/web3-contract-cache.ts:84](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L84)
[packages/sdk/contractkit/src/web3-contract-cache.ts:86](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L86)

## Variables

Expand Down Expand Up @@ -56,6 +56,7 @@
| `GasPriceMinimum` | (`web3`: `default`, `address`: `string`) => `GasPriceMinimum` |
| `GoldToken` | (`web3`: `default`, `address`: `string`) => `GoldToken` |
| `Governance` | (`web3`: `default`, `address`: `string`) => `Governance` |
| `GovernanceSlasher` | (`web3`: `default`, `address`: `string`) => `GovernanceSlasher` |
| `LockedGold` | (`web3`: `default`, `address`: `string`) => `LockedGold` |
| `MentoFeeHandlerSeller` | (`web3`: `default`, `address`: `string`) => `MentoFeeHandlerSeller` |
| `MultiSig` | (`web3`: `default`, `address`: `string`) => `MultiSig` |
Expand All @@ -73,4 +74,4 @@

#### Defined in

[packages/sdk/contractkit/src/web3-contract-cache.ts:41](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L41)
[packages/sdk/contractkit/src/web3-contract-cache.ts:42](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L42)
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ exports[`network:contracts runs 1`] = `
"implementation": "0x063BDb2e9A86e8aD2ad9fc488e9E45Dc2a845c3a",
"version": "1.4.2.0"
},
{
"contract": "GovernanceSlasher",
"proxy": "0xDDA88a8ebeaaB19d2a58374D8c72200AFAF94bB4",
"implementation": "0x76C05a43234EB2804aa83Cd40BA10080a43d07AE",
"version": "1.1.1.0"
},
{
"contract": "LockedGold",
"proxy": "0x619b4767f6A955E63ED7d334DF3384bc4eacFdB8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ exports[`network:contracts runs 1`] = `
"implementation": "0x063BDb2e9A86e8aD2ad9fc488e9E45Dc2a845c3a",
"version": "1.4.2.0"
},
{
"contract": "GovernanceSlasher",
"proxy": "0xDDA88a8ebeaaB19d2a58374D8c72200AFAF94bB4",
"implementation": "0x76C05a43234EB2804aa83Cd40BA10080a43d07AE",
"version": "1.1.1.0"
},
{
"contract": "LockedGold",
"proxy": "0x619b4767f6A955E63ED7d334DF3384bc4eacFdB8",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/contractkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"dependencies": {
"@celo/abis": "11.0.0",
"@celo/abis-12": "npm:@celo/[email protected].66",
"@celo/abis-12": "npm:@celo/[email protected].76",
"@celo/base": "^7.0.0-beta.0",
"@celo/connect": "^6.1.0-beta.1",
"@celo/utils": "^8.0.0-beta.0",
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/contractkit/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export enum CeloContract {
GasPriceMinimum = 'GasPriceMinimum',
GoldToken = 'GoldToken',
Governance = 'Governance',
GovernanceSlasher = 'GovernanceSlasher',
LockedGold = 'LockedGold',
MentoFeeHandlerSeller = 'MentoFeeHandlerSeller',
UniswapFeeHandlerSeller = 'UniswapFeeHandlerSeller',
Expand Down
2 changes: 2 additions & 0 deletions packages/sdk/contractkit/src/web3-contract-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { newEpochManagerEnabler } from '@celo/abis-12/web3/EpochManagerEnabler'
import { newFeeCurrencyDirectory } from '@celo/abis-12/web3/FeeCurrencyDirectory'
import { newGoldToken } from '@celo/abis-12/web3/GoldToken'
import { newGovernance } from '@celo/abis-12/web3/Governance'
import { newGovernanceSlasher } from '@celo/abis-12/web3/GovernanceSlasher'
import { newLockedGold } from '@celo/abis-12/web3/LockedGold'
import { newScoreManager } from '@celo/abis-12/web3/ScoreManager'
import { newValidators } from '@celo/abis-12/web3/Validators'
Expand Down Expand Up @@ -61,6 +62,7 @@ export const ContractFactories = {
[CeloContract.GasPriceMinimum]: newGasPriceMinimum,
[CeloContract.GoldToken]: newGoldToken,
[CeloContract.Governance]: newGovernance,
[CeloContract.GovernanceSlasher]: newGovernanceSlasher,
[CeloContract.LockedGold]: newLockedGold,
[CeloContract.MultiSig]: newMultiSig,
[CeloContract.OdisPayments]: newOdisPayments,
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/governance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@celo/abis": "11.0.0",
"@celo/abis-12": "npm:@celo/[email protected].66",
"@celo/abis-12": "npm:@celo/[email protected].76",
"@celo/base": "^7.0.0-beta.0",
"@celo/connect": "^6.1.0-beta.1",
"@celo/contractkit": "^9.0.0-beta.3",
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1631,10 +1631,10 @@ __metadata:
languageName: node
linkType: hard

"@celo/abis-12@npm:@celo/[email protected].66":
version: 12.0.0-canary.66
resolution: "@celo/abis@npm:12.0.0-canary.66"
checksum: 71f85edda338c651e214e77d983a9fb644cdc2f5bb0fe6bc471d73e3a8f87256dc4dc6e966e79d7b239fd5729d4862606c384a8f601e030829111e32b0824279
"@celo/abis-12@npm:@celo/[email protected].76":
version: 12.0.0-canary.76
resolution: "@celo/abis@npm:12.0.0-canary.76"
checksum: af199e39218c048653cf4ddb304e5bc238c71fb21398af36c821ff1165a69cdb6ab9c29e2a10f3c98bc92cc57985c3649217ca343944013d801e421074349fc3
languageName: node
linkType: hard

Expand Down Expand Up @@ -1835,7 +1835,7 @@ __metadata:
resolution: "@celo/contractkit@workspace:packages/sdk/contractkit"
dependencies:
"@celo/abis": "npm:11.0.0"
"@celo/abis-12": "npm:@celo/[email protected].66"
"@celo/abis-12": "npm:@celo/[email protected].76"
"@celo/base": "npm:^7.0.0-beta.0"
"@celo/celo-devchain": "npm:^7.0.0"
"@celo/connect": "npm:^6.1.0-beta.1"
Expand Down Expand Up @@ -1935,7 +1935,7 @@ __metadata:
resolution: "@celo/governance@workspace:packages/sdk/governance"
dependencies:
"@celo/abis": "npm:11.0.0"
"@celo/abis-12": "npm:@celo/[email protected].66"
"@celo/abis-12": "npm:@celo/[email protected].76"
"@celo/base": "npm:^7.0.0-beta.0"
"@celo/connect": "npm:^6.1.0-beta.1"
"@celo/contractkit": "npm:^9.0.0-beta.3"
Expand Down

0 comments on commit eba89a3

Please sign in to comment.