Skip to content

Commit

Permalink
L2 coverage (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
shazarre authored Nov 6, 2024
1 parent 23d36cc commit 76045eb
Show file tree
Hide file tree
Showing 68 changed files with 5,763 additions and 48 deletions.
5 changes: 5 additions & 0 deletions .changeset/smart-berries-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@celo/contractkit': minor
---

ValidatorsWrapper: add registerValidatorNoBls to allow registration without BLS keys which are not supported in L2
5 changes: 5 additions & 0 deletions .changeset/twenty-rocks-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@celo/celocli': minor
---

BLS keys are now optional as being deprecated on L2, validator:register and releasecelo:authorize no longer require them in L2 context
9 changes: 4 additions & 5 deletions docs/command-line-interface/validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,12 @@ Register a new Validator
```
USAGE
$ celocli validator:register --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d
--ecdsaKey 0x --blsKey 0x --blsSignature 0x [--gasCurrency
0x1234567890123456789012345678901234567890] [--globalHelp] [--yes]
--ecdsaKey 0x [--gasCurrency 0x1234567890123456789012345678901234567890]
[--globalHelp] [--blsKey 0x] [--blsSignature 0x] [--yes]
FLAGS
--blsKey=0x (required) BLS Public Key
--blsSignature=0x (required) BLS
Proof-of-Possession
--blsKey=0x BLS Public Key
--blsSignature=0x BLS Proof-of-Possession
--ecdsaKey=0x (required) ECDSA Public Key
--from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address for the
Validator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Contract for voting for validators and managing validator groups.
- [isValidatorGroup](wrappers_Validators.ValidatorsWrapper.md#isvalidatorgroup)
- [methodIds](wrappers_Validators.ValidatorsWrapper.md#methodids)
- [registerValidator](wrappers_Validators.ValidatorsWrapper.md#registervalidator)
- [registerValidatorNoBls](wrappers_Validators.ValidatorsWrapper.md#registervalidatornobls)
- [removeMember](wrappers_Validators.ValidatorsWrapper.md#removemember)
- [resetSlashingMultiplier](wrappers_Validators.ValidatorsWrapper.md#resetslashingmultiplier)
- [setNextCommissionUpdate](wrappers_Validators.ValidatorsWrapper.md#setnextcommissionupdate)
Expand Down Expand Up @@ -140,7 +141,7 @@ De-affiliates with the previously affiliated group if present.

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:487](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L487)
[packages/sdk/contractkit/src/wrappers/Validators.ts:493](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L493)

___

Expand Down Expand Up @@ -170,7 +171,7 @@ Fails if the account is not a validator with non-zero affiliation.

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:497](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L497)
[packages/sdk/contractkit/src/wrappers/Validators.ts:503](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L503)

___

Expand Down Expand Up @@ -259,7 +260,7 @@ Removes a validator from the group for which it is a member.

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:503](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L503)
[packages/sdk/contractkit/src/wrappers/Validators.ts:509](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L509)

___

Expand Down Expand Up @@ -369,7 +370,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:436](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L436)
[packages/sdk/contractkit/src/wrappers/Validators.ts:442](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L442)

___

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

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:438](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L438)
[packages/sdk/contractkit/src/wrappers/Validators.ts:444](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L444)

___

Expand Down Expand Up @@ -678,6 +679,30 @@ Fails if the account is already a validator or validator group.

___

### registerValidatorNoBls

**registerValidatorNoBls**: (`ecdsaPublicKey`: `string`) => `CeloTransactionObject`\<`boolean`\>

#### Type declaration

▸ (`ecdsaPublicKey`): `CeloTransactionObject`\<`boolean`\>

##### Parameters

| Name | Type |
| :------ | :------ |
| `ecdsaPublicKey` | `string` |

##### Returns

`CeloTransactionObject`\<`boolean`\>

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:436](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L436)

___

### removeMember

**removeMember**: (...`args`: [validator: string]) => `CeloTransactionObject`\<`boolean`\>
Expand Down Expand Up @@ -708,7 +733,7 @@ The ValidatorGroup is specified by the `from` of the tx.

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:544](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L544)
[packages/sdk/contractkit/src/wrappers/Validators.ts:550](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L550)

___

Expand Down Expand Up @@ -738,7 +763,7 @@ the last time the group was slashed.

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:512](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L512)
[packages/sdk/contractkit/src/wrappers/Validators.ts:518](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L518)

___

Expand Down Expand Up @@ -878,7 +903,7 @@ Fails if `validator` has not set their affiliation to this account.

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:522](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L522)
[packages/sdk/contractkit/src/wrappers/Validators.ts:528](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L528)

___

Expand All @@ -894,7 +919,7 @@ Returns the current set of validator signer addresses

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:637](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L637)
[packages/sdk/contractkit/src/wrappers/Validators.ts:643](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L643)

___

Expand All @@ -910,7 +935,7 @@ Returns the current set of validator signer and account addresses

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:647](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L647)
[packages/sdk/contractkit/src/wrappers/Validators.ts:653](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L653)

___

Expand All @@ -932,7 +957,7 @@ De-registers a validator, removing it from the group for which it is a member.

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:444](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L444)
[packages/sdk/contractkit/src/wrappers/Validators.ts:450](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L450)

___

Expand All @@ -954,7 +979,7 @@ De-registers a validator Group

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:472](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L472)
[packages/sdk/contractkit/src/wrappers/Validators.ts:478](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L478)

___

Expand All @@ -979,7 +1004,7 @@ Index for epoch or -1.

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:680](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L680)
[packages/sdk/contractkit/src/wrappers/Validators.ts:686](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L686)

___

Expand Down Expand Up @@ -1015,7 +1040,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:594](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L594)
[packages/sdk/contractkit/src/wrappers/Validators.ts:600](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L600)

___

Expand All @@ -1029,7 +1054,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:582](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L582)
[packages/sdk/contractkit/src/wrappers/Validators.ts:588](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L588)

___

Expand Down Expand Up @@ -1087,7 +1112,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:588](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L588)
[packages/sdk/contractkit/src/wrappers/Validators.ts:594](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L594)

___

Expand Down Expand Up @@ -1285,7 +1310,7 @@ Group and membership history index for `validator`.

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:661](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L661)
[packages/sdk/contractkit/src/wrappers/Validators.ts:667](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L667)

___

Expand All @@ -1308,7 +1333,7 @@ Retrieves ValidatorRewards for epochNumber.

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:604](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L604)
[packages/sdk/contractkit/src/wrappers/Validators.ts:610](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L610)

___

Expand Down Expand Up @@ -1400,7 +1425,7 @@ Fails if the account does not have sufficient weight.

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:461](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L461)
[packages/sdk/contractkit/src/wrappers/Validators.ts:467](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L467)

___

Expand All @@ -1425,7 +1450,7 @@ Fails if `validator` is not a member of the account's validator group.

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:553](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L553)
[packages/sdk/contractkit/src/wrappers/Validators.ts:559](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L559)

___

Expand Down
2 changes: 1 addition & 1 deletion docs/sdk/contractkit/modules/wrappers_Validators.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@

#### Defined in

[packages/sdk/contractkit/src/wrappers/Validators.ts:689](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L689)
[packages/sdk/contractkit/src/wrappers/Validators.ts:695](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L695)
Loading

0 comments on commit 76045eb

Please sign in to comment.