Skip to content

Commit

Permalink
Add Ethereum-compatible legacy TXs support (#182)
Browse files Browse the repository at this point in the history
* Added Ethereum-compatible legacy Type 0 TXs support

---------

Co-authored-by: Aaron DeRuvo <aaron.deruvo@clabs.co>
  • Loading branch information
carterqw2 and aaronmgdr authored Mar 21, 2024
1 parent 08b0d6a commit 5335af5
Show file tree
Hide file tree
Showing 17 changed files with 413 additions and 77 deletions.
6 changes: 6 additions & 0 deletions .changeset/quick-tips-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@celo/connect": minor
"@celo/wallet-base": minor
---

Add support Type 0 Ethereum-compatible legacy TXs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

#### Defined in

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

___

### tx

**tx**: [`EIP1559TXProperties`](types.EIP1559TXProperties.md) \| [`CIP64TXProperties`](types.CIP64TXProperties.md) \| [`CIP42TXProperties`](types.CIP42TXProperties.md) \| [`LegacyTXProperties`](types.LegacyTXProperties.md)
**tx**: [`EIP1559TXProperties`](types.EIP1559TXProperties.md) \| [`CIP64TXProperties`](types.CIP64TXProperties.md) \| [`CIP42TXProperties`](types.CIP42TXProperties.md) \| [`LegacyTXProperties`](types.LegacyTXProperties.md) \| [`EthereumLegacyTXProperties`](types.EthereumLegacyTXProperties.md)

#### Defined in

[packages/sdk/connect/src/types.ts:119](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L119)
[packages/sdk/connect/src/types.ts:124](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L124)
6 changes: 3 additions & 3 deletions packages/docs/sdk/docs/connect/interfaces/types.Error.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#### 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)
[packages/sdk/connect/src/types.ts:163](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L163)

___

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

#### 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)
[packages/sdk/connect/src/types.ts:164](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L164)

___

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

#### Defined in

[packages/sdk/connect/src/types.ts:155](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L155)
[packages/sdk/connect/src/types.ts:165](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L165)
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
[@celo/connect](../README.md) / [Exports](../modules.md) / [types](../modules/types.md) / EthereumLegacyTXProperties

# Interface: EthereumLegacyTXProperties

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

## Hierarchy

- `CommonTXProperties`

**`EthereumLegacyTXProperties`**

## Table of contents

### Properties

- [gas](types.EthereumLegacyTXProperties.md#gas)
- [gasPrice](types.EthereumLegacyTXProperties.md#gasprice)
- [hash](types.EthereumLegacyTXProperties.md#hash)
- [input](types.EthereumLegacyTXProperties.md#input)
- [nonce](types.EthereumLegacyTXProperties.md#nonce)
- [r](types.EthereumLegacyTXProperties.md#r)
- [s](types.EthereumLegacyTXProperties.md#s)
- [to](types.EthereumLegacyTXProperties.md#to)
- [type](types.EthereumLegacyTXProperties.md#type)
- [v](types.EthereumLegacyTXProperties.md#v)
- [value](types.EthereumLegacyTXProperties.md#value)

## Properties

### gas

**gas**: `string`

#### Inherited from

CommonTXProperties.gas

#### Defined in

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

___

### gasPrice

**gasPrice**: `string`

#### Defined in

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

___

### hash

**hash**: `string`

#### Inherited from

CommonTXProperties.hash

#### Defined in

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

___

### input

**input**: `string`

#### Inherited from

CommonTXProperties.input

#### Defined in

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

___

### nonce

**nonce**: `string`

#### Inherited from

CommonTXProperties.nonce

#### Defined in

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

___

### r

**r**: `string`

#### Inherited from

CommonTXProperties.r

#### Defined in

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

___

### s

**s**: `string`

#### Inherited from

CommonTXProperties.s

#### Defined in

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

___

### to

**to**: `string`

#### Inherited from

CommonTXProperties.to

#### Defined in

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

___

### type

**type**: ``"ethereum-legacy"``

#### Overrides

CommonTXProperties.type

#### Defined in

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

___

### v

**v**: `string`

#### Inherited from

CommonTXProperties.v

#### Defined in

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

___

### value

**value**: `string`

#### Inherited from

CommonTXProperties.value

#### Defined in

[packages/sdk/connect/src/types.ts:75](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L75)
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@

#### Defined in

[packages/sdk/connect/src/types.ts:159](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L159)
[packages/sdk/connect/src/types.ts:169](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L169)
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#### Defined in

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

___

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

#### Defined in

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

___

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

#### Defined in

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

___

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

#### Defined in

[packages/sdk/connect/src/types.ts:141](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L141)
[packages/sdk/connect/src/types.ts:151](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L151)
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#### Defined in

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

___

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

#### Defined in

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

___

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

#### Defined in

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

___

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

#### Defined in

[packages/sdk/connect/src/types.ts:130](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L130)
[packages/sdk/connect/src/types.ts:140](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L140)
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@

#### Defined in

[packages/sdk/connect/src/types.ts:146](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L146)
[packages/sdk/connect/src/types.ts:156](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L156)
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#### Defined in

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

___

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

#### Defined in

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

___

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

#### Defined in

[packages/sdk/connect/src/types.ts:168](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L168)
[packages/sdk/connect/src/types.ts:178](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/types.ts#L178)
7 changes: 7 additions & 0 deletions packages/docs/sdk/docs/connect/modules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- [EIP1559TXProperties](index.md#eip1559txproperties)
- [EncodedTransaction](index.md#encodedtransaction)
- [Error](index.md#error)
- [EthereumLegacyTXProperties](index.md#ethereumlegacytxproperties)
- [FormattedCeloTx](index.md#formattedcelotx)
- [Hex](index.md#hex)
- [HexOrMissing](index.md#hexormissing)
Expand Down Expand Up @@ -235,6 +236,12 @@ Re-exports [Error](../interfaces/types.Error.md)

___

### EthereumLegacyTXProperties

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

___

### FormattedCeloTx

Re-exports [FormattedCeloTx](../interfaces/types.FormattedCeloTx.md)
Expand Down
9 changes: 5 additions & 4 deletions packages/docs/sdk/docs/connect/modules/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- [EIP1559TXProperties](../interfaces/types.EIP1559TXProperties.md)
- [EncodedTransaction](../interfaces/types.EncodedTransaction.md)
- [Error](../interfaces/types.Error.md)
- [EthereumLegacyTXProperties](../interfaces/types.EthereumLegacyTXProperties.md)
- [FormattedCeloTx](../interfaces/types.FormattedCeloTx.md)
- [HttpProvider](../interfaces/types.HttpProvider.md)
- [JsonRpcPayload](../interfaces/types.JsonRpcPayload.md)
Expand Down Expand Up @@ -163,7 +164,7 @@ ___

#### Defined in

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

___

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

#### Defined in

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

___

Expand All @@ -193,7 +194,7 @@ ___

#### Defined in

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

___

Expand Down Expand Up @@ -229,7 +230,7 @@ ___

### TransactionTypes

Ƭ **TransactionTypes**: ``"eip1559"`` \| ``"celo-legacy"`` \| ``"cip42"`` \| ``"cip64"``
Ƭ **TransactionTypes**: ``"ethereum-legacy"`` \| ``"eip1559"`` \| ``"celo-legacy"`` \| ``"cip42"`` \| ``"cip64"``

#### Defined in

Expand Down
Loading

0 comments on commit 5335af5

Please sign in to comment.