-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bump @ethereumjs/tx from 4.1.2 to 5.2.1 (#1293)
* chore: bump @ethereumjs/tx from 4.1.2 to 5.0.0 Bumps [@ethereumjs/tx](https://github.com/ethereumjs/ethereumjs-monorepo) from 4.1.2 to 5.0.0. - [Release notes](https://github.com/ethereumjs/ethereumjs-monorepo/releases) - [Commits](https://github.com/ethereumjs/ethereumjs-monorepo/compare/@ethereumjs/[email protected]...@ethereumjs/[email protected]) --- updated-dependencies: - dependency-name: "@ethereumjs/tx" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * update codebase to ethereumjs update * rename buffer * fix: use correct package * chore: revert type conversion * chore: rename buffer -> array * chore: move packages to shared folder --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mark Nardi <[email protected]> Co-authored-by: Tuditi <[email protected]> Co-authored-by: Tuditi <[email protected]>
- Loading branch information
1 parent
fdadc57
commit 20f3755
Showing
14 changed files
with
1,661 additions
and
1,353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/shared/src/lib/core/layer-2/types/evm-transaction-data.type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import type { TxData } from '@ethereumjs/tx' | ||
import type { TypedTxData } from '@ethereumjs/tx' | ||
|
||
export type EvmTransactionData = TxData & { estimatedGas?: number; timestamp?: number } | ||
export type EvmTransactionData = TypedTxData & { estimatedGas?: number; timestamp?: number } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 9 additions & 10 deletions
19
packages/shared/src/lib/core/stronghold/utils/signEvmTransactionWithStronghold.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export function removeLeadingZeros(array: Uint8Array): Uint8Array { | ||
let indexToSliceFrom = 0 | ||
for (let i = 0; i < array.length; i++) { | ||
if (array[i] === 0) { | ||
indexToSliceFrom = i + 1 | ||
} else { | ||
break | ||
} | ||
} | ||
return array.subarray(indexToSliceFrom) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { removeLeadingZeros } from '../array' | ||
|
||
describe('array', () => { | ||
test('Removes leading zeros', () => { | ||
const array = Uint8Array.from([0, 0, 1]) | ||
expect(removeLeadingZeros(array)).toEqual(Uint8Array.from([1])) | ||
}) | ||
|
||
test('Uint8Array contains non-zero elements only', () => { | ||
const array1 = Uint8Array.from([1, 2, 3]) | ||
expect(removeLeadingZeros(array1)).toEqual(array1) | ||
|
||
const array2 = Uint8Array.from([1]) | ||
expect(removeLeadingZeros(array2)).toEqual(array2) | ||
|
||
const array3 = Uint8Array.from([1, 0, 0]) | ||
expect(removeLeadingZeros(array3)).toEqual(array3) | ||
}) | ||
|
||
test('Keeps non-leading zeros untouched', () => { | ||
const array = Uint8Array.from([1, 0, 0, 1]) | ||
expect(removeLeadingZeros(array)).toEqual(array) | ||
}) | ||
}) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.