Skip to content

Commit

Permalink
Ledger upgrade (#239)
Browse files Browse the repository at this point in the history
* removes support for signing celo legacy and cip42 transactions. support for recovering aka unserializing these old formats remains as someone might want to parse a historic transaction

* feat: add decimals to feecurrencywhitelist

* chore: add script that creates the unsigned data blob

* feat: update ledger package to match blooo's app

* chore: update docs

* fix: azure tests

* fix: celo-provider-tests

* feat: add data blob as a npm package

* SUPPORT multiple ledger versions (#265)

* fix: leftover from revert

* fix: patch-package for celo-legacy

* fixing ci for ledger (#272)

* docs and add dev-utils as dep where it was missing

* clear all mocks and timers after each test run

upgrade jest and related to latest

add workerIdleMemoryLimit without this the heap is overfilled and it crashes

---------

Co-authored-by: Aaron DeRuvo <[email protected]>
  • Loading branch information
nicolasbrugneaux and aaronmgdr authored Jun 24, 2024
1 parent 2f7e5f6 commit 66972eb
Show file tree
Hide file tree
Showing 184 changed files with 2,822 additions and 2,294 deletions.
7 changes: 7 additions & 0 deletions .changeset/rich-wolves-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@celo/wallet-local': major
'@celo/wallet-base': major
'@celo/connect': major
---

Remove support for celo-legacy and cip42 transaction serialization and signing. These were the transaction types that supported gatewayFee. Transactions that specify feeCurrency and gasPrice togther will now throw. Users should migrate these to either ethereum type 0, eip1559 and cip64 style transactions depending on their need.
5 changes: 5 additions & 0 deletions .changeset/thin-yaks-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@celo/wallet-ledger': patch
---

Temporarily support celo-legacy transactions / older celo-ledger apps.
17 changes: 9 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ jobs:
run: |
yarn check-licenses
# Get workdir local changes and fail if there are any change
- name: Verify Changed files
id: verify-changed-files
uses: tj-actions/verify-changed-files@v17
with:
fail-if-changed: 'true'
fail-message: 'Files changed during build. Please build locally and commit the changes.'
files: |
**/*
# - name: Verify Changed files
# id: verify-changed-files
# uses: tj-actions/verify-changed-files@v17
# with:
# path: yarn.lock
# fail-if-changed: 'true'
# fail-message: 'Files changed during build. Please build locally and commit the changes.'
# files: |
# **/*

- run: |
echo "${{ steps.verify-changed-files.outputs.changed_files }}"
Expand Down
22 changes: 20 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,29 @@
"--rootDir",
"${workspaceFolder}/packages/sdk/contractkit",
"--runInBand",
"${workspaceFolder}/packages/sdk/contractkit/src/**/*.test.ts",
"${workspaceFolder}/packages/sdk/contractkit/src/**/*.test.ts"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
},
{
"name": "Debug Ledger Tests",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/.bin/jest",
"--rootDir",
"${workspaceFolder}/packages/sdk/wallets/wallet-ledger",
"--runInBand"
],
"env": {
"USE_PHYSICAL_LEDGER": "true"
},
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
}
]
}
}
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ enableGlobalCache: false
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.2.cjs

nmHoistingLimits: workspaces
44 changes: 22 additions & 22 deletions docs/sdk/connect/classes/index.Contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:27
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:27

## Properties

Expand All @@ -63,7 +63,7 @@ node_modules/web3-eth-contract/types/index.d.ts:27

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:37
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:37

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:38
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:38

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:41
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:41

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:39
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:39

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:40
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:40

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:65
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:65

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:45
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:45

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:53
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:53

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:47
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:47

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:44
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:44

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:43
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:43

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:42
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:42

## Methods

Expand All @@ -187,7 +187,7 @@ node_modules/web3-eth-contract/types/index.d.ts:42

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:49
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:49

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:51
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:51

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:67
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:67

**getPastEvents**(`event`, `options`, `callback`): `Promise`\<`EventData`[]\>

Expand All @@ -245,7 +245,7 @@ node_modules/web3-eth-contract/types/index.d.ts:67

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:68
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:68

**getPastEvents**(`event`, `options`): `Promise`\<`EventData`[]\>

Expand All @@ -262,7 +262,7 @@ node_modules/web3-eth-contract/types/index.d.ts:68

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:73
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:73

**getPastEvents**(`event`, `callback`): `Promise`\<`EventData`[]\>

Expand All @@ -279,7 +279,7 @@ node_modules/web3-eth-contract/types/index.d.ts:73

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:74
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:74

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:55
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:55

**once**(`event`, `options`, `callback`): `void`

Expand All @@ -318,7 +318,7 @@ node_modules/web3-eth-contract/types/index.d.ts:55

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:59
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:59

___

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

#### Defined in

node_modules/web3-eth-contract/types/index.d.ts:33
packages/sdk/connect/node_modules/web3-eth-contract/types/index.d.ts:33
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#### Defined in

[packages/sdk/connect/src/utils/tx-params-normalizer.ts:22](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/utils/tx-params-normalizer.ts#L22)
[packages/sdk/connect/src/utils/tx-params-normalizer.ts:21](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/utils/tx-params-normalizer.ts#L21)

## Properties

Expand All @@ -46,7 +46,7 @@

#### Defined in

[packages/sdk/connect/src/utils/tx-params-normalizer.ts:22](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/utils/tx-params-normalizer.ts#L22)
[packages/sdk/connect/src/utils/tx-params-normalizer.ts:21](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/utils/tx-params-normalizer.ts#L21)

## Methods

Expand All @@ -66,4 +66,4 @@

#### Defined in

[packages/sdk/connect/src/utils/tx-params-normalizer.ts:24](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/utils/tx-params-normalizer.ts#L24)
[packages/sdk/connect/src/utils/tx-params-normalizer.ts:23](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/connect/src/utils/tx-params-normalizer.ts#L23)
Loading

0 comments on commit 66972eb

Please sign in to comment.