Skip to content

Commit

Permalink
L2 Hotfix safe support (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
shazarre authored Nov 13, 2024
1 parent 7d42a05 commit fb08485
Show file tree
Hide file tree
Showing 21 changed files with 1,122 additions and 382 deletions.
5 changes: 5 additions & 0 deletions .changeset/lemon-gorillas-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@celo/celocli': minor
---

Adds support for safe integration for L2 hotfix security council approvals
5 changes: 5 additions & 0 deletions .changeset/sharp-shirts-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@celo/dev-utils': patch
---

Adds actual Celo chain id when running anvil
5 changes: 5 additions & 0 deletions .changeset/warm-papayas-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@celo/connect': minor
---

Now CeloProvider can be wrapped in EIP-1193 partially compatible object (request + args)
4 changes: 3 additions & 1 deletion docs/command-line-interface/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Approve a dequeued governance proposal (or hotfix)
USAGE
$ celocli governance:approvehotfix --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d
[--gasCurrency 0x1234567890123456789012345678901234567890] [--globalHelp]
[--proposalID <value> | --hotfix <value>] [--useMultiSig] [--type
[--proposalID <value> | --hotfix <value>] [--useMultiSig | --useSafe] [--type
approver|securityCouncil ]
FLAGS
Expand All @@ -55,6 +55,8 @@ FLAGS
approver|securityCouncil>
--useMultiSig True means the request will
be sent through multisig.
--useSafe True means the request will
be sent through safe.
DESCRIPTION
Approve a dequeued governance proposal (or hotfix)
Expand Down
37 changes: 26 additions & 11 deletions docs/sdk/connect/classes/celo_provider.CeloProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- [send](celo_provider.CeloProvider.md#send)
- [stop](celo_provider.CeloProvider.md#stop)
- [supportsSubscriptions](celo_provider.CeloProvider.md#supportssubscriptions)
- [toEip1193Provider](celo_provider.CeloProvider.md#toeip1193provider)

## Constructors

Expand All @@ -52,7 +53,7 @@

#### Defined in

[packages/sdk/connect/src/celo-provider.ts:54](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L54)
[packages/sdk/connect/src/celo-provider.ts:56](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L56)

## Properties

Expand All @@ -62,7 +63,7 @@

#### Defined in

[packages/sdk/connect/src/celo-provider.ts:54](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L54)
[packages/sdk/connect/src/celo-provider.ts:56](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L56)

___

Expand All @@ -72,7 +73,7 @@ ___

#### Defined in

[packages/sdk/connect/src/celo-provider.ts:54](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L54)
[packages/sdk/connect/src/celo-provider.ts:56](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L56)

## Accessors

Expand All @@ -86,7 +87,7 @@ ___

#### Defined in

[packages/sdk/connect/src/celo-provider.ts:261](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L261)
[packages/sdk/connect/src/celo-provider.ts:287](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L287)

## Methods

Expand All @@ -106,7 +107,7 @@ ___

#### Defined in

[packages/sdk/connect/src/celo-provider.ts:59](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L59)
[packages/sdk/connect/src/celo-provider.ts:61](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L61)

___

Expand All @@ -120,7 +121,7 @@ ___

#### Defined in

[packages/sdk/connect/src/celo-provider.ts:69](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L69)
[packages/sdk/connect/src/celo-provider.ts:71](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L71)

___

Expand All @@ -140,7 +141,7 @@ ___

#### Defined in

[packages/sdk/connect/src/celo-provider.ts:73](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L73)
[packages/sdk/connect/src/celo-provider.ts:75](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L75)

___

Expand All @@ -160,7 +161,7 @@ ___

#### Defined in

[packages/sdk/connect/src/celo-provider.ts:64](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L64)
[packages/sdk/connect/src/celo-provider.ts:66](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L66)

___

Expand All @@ -187,7 +188,7 @@ Send method as expected by web3.js

#### Defined in

[packages/sdk/connect/src/celo-provider.ts:80](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L80)
[packages/sdk/connect/src/celo-provider.ts:82](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L82)

___

Expand All @@ -201,7 +202,7 @@ ___

#### Defined in

[packages/sdk/connect/src/celo-provider.ts:159](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L159)
[packages/sdk/connect/src/celo-provider.ts:161](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L161)

___

Expand All @@ -215,4 +216,18 @@ ___

#### Defined in

[packages/sdk/connect/src/celo-provider.ts:265](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L265)
[packages/sdk/connect/src/celo-provider.ts:291](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L291)

___

### toEip1193Provider

**toEip1193Provider**(): [`Eip1193Provider`](../interfaces/types.Eip1193Provider.md)

#### Returns

[`Eip1193Provider`](../interfaces/types.Eip1193Provider.md)

#### Defined in

[packages/sdk/connect/src/celo-provider.ts:173](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L173)
31 changes: 31 additions & 0 deletions docs/sdk/connect/interfaces/types.Eip1193Provider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[@celo/connect](../README.md) / [Exports](../modules.md) / [types](../modules/types.md) / Eip1193Provider

# Interface: Eip1193Provider

[types](../modules/types.md).Eip1193Provider

## Table of contents

### Methods

- [request](types.Eip1193Provider.md#request)

## Methods

### request

**request**(`args`): `Promise`\<`unknown`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `args` | [`Eip1193RequestArguments`](types.Eip1193RequestArguments.md) |

#### Returns

`Promise`\<`unknown`\>

#### Defined in

[packages/sdk/connect/src/types.ts:158](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L158)
32 changes: 32 additions & 0 deletions docs/sdk/connect/interfaces/types.Eip1193RequestArguments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[@celo/connect](../README.md) / [Exports](../modules.md) / [types](../modules/types.md) / Eip1193RequestArguments

# Interface: Eip1193RequestArguments

[types](../modules/types.md).Eip1193RequestArguments

## Table of contents

### Properties

- [method](types.Eip1193RequestArguments.md#method)
- [params](types.Eip1193RequestArguments.md#params)

## Properties

### method

`Readonly` **method**: `string`

#### Defined in

[packages/sdk/connect/src/types.ts:153](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L153)

___

### params

`Optional` `Readonly` **params**: `object` \| readonly `unknown`[]

#### Defined in

[packages/sdk/connect/src/types.ts:154](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L154)
2 changes: 1 addition & 1 deletion docs/sdk/connect/modules/celo_provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ asserts provider is CeloProvider

#### Defined in

[packages/sdk/connect/src/celo-provider.ts:35](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L35)
[packages/sdk/connect/src/celo-provider.ts:37](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/celo-provider.ts#L37)
14 changes: 14 additions & 0 deletions docs/sdk/connect/modules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
- [DecodedParamsArray](index.md#decodedparamsarray)
- [DecodedParamsObject](index.md#decodedparamsobject)
- [EIP1559TXProperties](index.md#eip1559txproperties)
- [Eip1193Provider](index.md#eip1193provider)
- [Eip1193RequestArguments](index.md#eip1193requestarguments)
- [EncodedTransaction](index.md#encodedtransaction)
- [Error](index.md#error)
- [EthereumLegacyTXProperties](index.md#ethereumlegacytxproperties)
Expand Down Expand Up @@ -226,6 +228,18 @@ Re-exports [EIP1559TXProperties](../interfaces/types.EIP1559TXProperties.md)

___

### Eip1193Provider

Re-exports [Eip1193Provider](../interfaces/types.Eip1193Provider.md)

___

### Eip1193RequestArguments

Re-exports [Eip1193RequestArguments](../interfaces/types.Eip1193RequestArguments.md)

___

### EncodedTransaction

Re-exports [EncodedTransaction](../interfaces/types.EncodedTransaction.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/sdk/connect/modules/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
- [CeloParams](../interfaces/types.CeloParams.md)
- [CeloTxObject](../interfaces/types.CeloTxObject.md)
- [EIP1559TXProperties](../interfaces/types.EIP1559TXProperties.md)
- [Eip1193Provider](../interfaces/types.Eip1193Provider.md)
- [Eip1193RequestArguments](../interfaces/types.Eip1193RequestArguments.md)
- [EncodedTransaction](../interfaces/types.EncodedTransaction.md)
- [Error](../interfaces/types.Error.md)
- [EthereumLegacyTXProperties](../interfaces/types.EthereumLegacyTXProperties.md)
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
"@oclif/plugin-not-found": "^3.2.15",
"@oclif/plugin-plugins": "^4.3.10",
"@oclif/plugin-warn-if-update-available": "^3.1.11",
"@safe-global/protocol-kit": "^5.0.4",
"@safe-global/types-kit": "^1.0.0",
"@types/command-exists": "^1.2.3",
"bignumber.js": "9.0.0",
"chalk": "^2.4.2",
Expand Down
Loading

0 comments on commit fb08485

Please sign in to comment.