Skip to content

Commit

Permalink
Mark methods that are L1only as deprecated (#455)
Browse files Browse the repository at this point in the history
### Description

went thru
https://github.com/celo-org/celo-monorepo/tree/release/core-contracts/12/packages
and marked methdods that have onlyL1 modifier that are called in
contactkit as deprecated.



### Related issues

- Fixes [#458](#458)

<!-- start pr-codex -->

---

## PR-Codex overview
This PR primarily focuses on marking various contract wrapper methods as
deprecated, indicating they will be removed in the future. It also
includes a note on the transition to L2, where certain methods will no
longer function.

### Detailed summary
- Marked `GasPriceMinimumWrapper`, `BlockchainParametersWrapper`, and
`DoubleSigningSlasherWrapper` as deprecated.
- Added deprecation notes for methods in `ValidatorsWrapper` and
`ElectionWrapper`.
- Updated documentation to reflect deprecated status and replacements
for several methods.
- Indicated that `blsPublicKey` is no longer used.
- Specified that contracts will be removed as per the provided links.

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

<!-- end pr-codex -->
  • Loading branch information
aaronmgdr authored Nov 25, 2024
1 parent 449e0ac commit 36c4369
Show file tree
Hide file tree
Showing 25 changed files with 229 additions and 117 deletions.
17 changes: 17 additions & 0 deletions .changeset/real-camels-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'@celo/contractkit': patch
---

Mark contract wrapper methods that will not work on L2 because solidity contracts have onlyL1 modifier as deprecated.

| Deprecated Contract / Method | Replacement or none |
|--------|--------|
| Validators#registerValidator | Validators#registerValidatorNoBLS |
| BlockchainParams#getEpochNumberOfBlock | EpochManager#getEpochNumberOfBlock |
| BlockchainParams#getFirstBlockNumberForEpoch | EpochManager#getFirstBlockAtEpoch|
| Election#getCurrentValidatorSigners | EpochManager#getElectedSigners |
| Election#getGroupEpochRewards | Election#getGroupEpochRewardsBasedOnScore |
| GovernanceSlasher#slash | GovernanceSlasher#slashL2 |
| DoubleSigningSlasher | X |
| DowntimeSlasher | X |

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

[wrappers/BaseSlasher](../modules/wrappers_BaseSlasher.md).BaseSlasher

**`Deprecated`**

Contract will be complete removed see https://specs.celo.org/smart_contract_updates_from_l1.html

## Type parameters

| Name | Type |
Expand Down Expand Up @@ -144,7 +148,7 @@ Rewards and penalties for slashing.

#### Defined in

[packages/sdk/contractkit/src/wrappers/BaseSlasher.ts:70](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BaseSlasher.ts#L70)
[packages/sdk/contractkit/src/wrappers/BaseSlasher.ts:72](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BaseSlasher.ts#L72)

## Accessors

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

Network parameters that are configurable by governance.

**`Deprecated`**

Contract will be complete removed see https://specs.celo.org/smart_contract_updates_from_l1.html

## Hierarchy

- [`BaseWrapper`](wrappers_BaseWrapper.BaseWrapper.md)\<`BlockchainParameters`\>
Expand Down Expand Up @@ -135,7 +139,7 @@ Getting the block gas limit.

#### Defined in

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

___

Expand All @@ -159,7 +163,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:104](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L104)
[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:105](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L105)

___

Expand All @@ -183,7 +187,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:106](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L106)
[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:107](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L107)

___

Expand Down Expand Up @@ -211,7 +215,7 @@ Get the extra intrinsic gas for transactions, where gas is paid using non-gold c

#### Defined in

[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:17](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L17)
[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:18](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L18)

___

Expand Down Expand Up @@ -239,7 +243,7 @@ Getting the uptime lookback window.

#### Defined in

[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:54](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L54)
[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:55](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L55)

___

Expand Down Expand Up @@ -281,7 +285,7 @@ Setting the block gas limit.

#### Defined in

[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:39](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L39)
[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:40](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L40)

___

Expand Down Expand Up @@ -309,7 +313,7 @@ Setting the extra intrinsic gas for transactions, where gas is paid using non-go

#### Defined in

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

___

Expand Down Expand Up @@ -337,7 +341,7 @@ Setting the uptime lookback window.

#### Defined in

[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:62](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L62)
[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:63](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L63)

## Accessors

Expand Down Expand Up @@ -373,7 +377,7 @@ Returns current configuration parameters.

#### Defined in

[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:44](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L44)
[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:45](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L45)

___

Expand All @@ -393,7 +397,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:93](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L93)
[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:94](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L94)

___

Expand All @@ -407,7 +411,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:67](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L67)
[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:68](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L68)

___

Expand All @@ -427,7 +431,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:73](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L73)
[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:74](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L74)

___

Expand All @@ -447,7 +451,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:83](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L83)
[packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts:84](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L84)

___

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

Contract handling slashing for Validator double-signing

**`Deprecated`**

Contract will be complete removed see https://specs.celo.org/smart_contract_updates_from_l1.html

## Hierarchy

- [`BaseSlasher`](wrappers_BaseSlasher.BaseSlasher.md)\<`DoubleSigningSlasher`\>
Expand Down Expand Up @@ -147,7 +151,7 @@ Rewards and penalties for slashing.

#### Defined in

[packages/sdk/contractkit/src/wrappers/BaseSlasher.ts:70](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BaseSlasher.ts#L70)
[packages/sdk/contractkit/src/wrappers/BaseSlasher.ts:72](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BaseSlasher.ts#L72)

## Accessors

Expand Down Expand Up @@ -191,7 +195,7 @@ Block number.

#### Defined in

[packages/sdk/contractkit/src/wrappers/DoubleSigningSlasher.ts:15](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DoubleSigningSlasher.ts#L15)
[packages/sdk/contractkit/src/wrappers/DoubleSigningSlasher.ts:16](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DoubleSigningSlasher.ts#L16)

___

Expand Down Expand Up @@ -242,7 +246,7 @@ Slash a Validator signer for double-signing.

#### Defined in

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

___

Expand All @@ -266,7 +270,7 @@ Slash a Validator for double-signing.

#### Defined in

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

___

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

Contract handling slashing for Validator downtime using intervals.

**`Deprecated`**

Contract will be complete removed https://github.com/celo-org/celo-monorepo/blob/release/core-contracts/12/packages/protocol/contracts/governance/DowntimeSlasher.sol

## Hierarchy

- [`BaseSlasher`](wrappers_BaseSlasher.BaseSlasher.md)\<`DowntimeSlasher`\>
Expand Down Expand Up @@ -168,7 +172,7 @@ the current block.

#### Defined in

[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:73](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L73)
[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:74](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L74)

___

Expand Down Expand Up @@ -205,7 +209,7 @@ the specific interval.

#### Defined in

[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:132](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L132)
[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:133](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L133)

___

Expand All @@ -229,7 +233,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:146](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L146)
[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:147](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L147)

___

Expand Down Expand Up @@ -285,7 +289,7 @@ interval.start and interval.end must be in the same epoch.

#### Defined in

[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:85](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L85)
[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:86](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L86)

___

Expand Down Expand Up @@ -316,7 +320,7 @@ can be slashed.

#### Defined in

[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:37](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L37)
[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:38](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L38)

___

Expand Down Expand Up @@ -350,7 +354,7 @@ Rewards and penalties for slashing.

#### Defined in

[packages/sdk/contractkit/src/wrappers/BaseSlasher.ts:70](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BaseSlasher.ts#L70)
[packages/sdk/contractkit/src/wrappers/BaseSlasher.ts:72](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/BaseSlasher.ts#L72)

## Accessors

Expand Down Expand Up @@ -386,7 +390,7 @@ Returns current configuration parameters.

#### Defined in

[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:42](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L42)
[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:43](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L43)

___

Expand All @@ -406,7 +410,7 @@ Returns human readable configuration of the downtime slasher contract

#### Defined in

[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:54](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L54)
[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:55](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L55)

___

Expand Down Expand Up @@ -457,7 +461,7 @@ True if the user already called the `setBitmapForInterval` for intervals.

#### Defined in

[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:139](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L139)
[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:140](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L140)

___

Expand All @@ -481,7 +485,7 @@ intervals.

#### Defined in

[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:180](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L180)
[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:181](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L181)

___

Expand Down Expand Up @@ -510,7 +514,7 @@ if block is undefined, latest will be used

#### Defined in

[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:98](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L98)
[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:99](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L99)

___

Expand Down Expand Up @@ -551,7 +555,7 @@ Tests if the given validator or signer did not sign any blocks in the interval.

#### Defined in

[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:153](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L153)
[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:154](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L154)

___

Expand All @@ -577,4 +581,4 @@ True if the validator signature does not appear in any block within the window.

#### Defined in

[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:167](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L167)
[packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts:168](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L168)
Loading

0 comments on commit 36c4369

Please sign in to comment.