This repository was archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 377
feat: native bigint support, modernization of sdk #69
Open
koraykoska
wants to merge
20
commits into
Uniswap:main
Choose a base branch
from
koraykoska:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
e49b14e
chore: remove lock files from git
koraykoska a8186b9
chore: remove tsdx dependency
koraykoska b5ed41b
feat: internally use native bigint
koraykoska 18992f0
feat: update test suite
koraykoska 38ebef5
chore: postinstall compile typescript
koraykoska 10fec9f
fix: revert postinstall
koraykoska 884ec52
chore: generate commonjs code with tsc for npm build
koraykoska 4d560ca
fix: remove dependency to instanceof for JSBI
koraykoska ba01736
chore: remove bigintish non-jsbi
koraykoska 4715793
chore: exclude tests from compilation
koraykoska c7a223e
chore: bump version to 4.0.0
koraykoska fac2ae1
Merge branch 'main' into main
koraykoska 8801341
fix: remove comments
koraykoska b78bcb0
feat: remove package lock
koraykoska 699b316
Merge remote-tracking branch 'origin/main'
koraykoska 855f728
fix: add yarn.lock, remove package-lock
koraykoska 3c533ae
feat: switch to esm
koraykoska c5af903
Merge remote-tracking branch 'origin/main'
koraykoska 9be32ff
fix: add dev dependency prettier for ci
koraykoska a6757fe
Fix incorrect checksums in yarn.lock
Florian-S-A-W File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,2 +1,5 @@ | ||
| dist | ||
| node_modules | ||
|
|
||
| package-lock.json | ||
| yarn.lock | ||
koraykoska marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or 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,27 @@ | ||
| /** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
| module.exports = { | ||
| // preset: 'ts-jest', | ||
| // testEnvironment: 'node', | ||
koraykoska marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
koraykoska marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| preset: 'ts-jest', | ||
| testEnvironment: 'jsdom', | ||
| transform: { | ||
| // transform files with ts-jest | ||
| '^.+\\.(js|ts)$': [ | ||
| 'ts-jest', | ||
| { | ||
| tsconfig: { | ||
| // allow js in typescript | ||
| allowJs: true, | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| transformIgnorePatterns: [ | ||
| // allow lit-html transformation | ||
| 'node_modules/(?!lit-html)', | ||
| ], | ||
| // for absolute imports | ||
| moduleNameMapper: { | ||
| 'src/(.*)': '<rootDir>/src/$1', | ||
| }, | ||
| } | ||
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
src/entities/currency.test.ts → src/__tests__/entities/currency.test.ts
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
src/entities/ether.test.ts → src/__tests__/entities/ether.test.ts
This file contains hidden or 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
10 changes: 5 additions & 5 deletions
10
...entities/fractions/currencyAmount.test.ts → ...entities/fractions/currencyAmount.test.ts
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
src/entities/fractions/fraction.test.ts → ...sts__/entities/fractions/fraction.test.ts
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
src/entities/fractions/percent.test.ts → ...ests__/entities/fractions/percent.test.ts
This file contains hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
src/entities/token.test.ts → src/__tests__/entities/token.test.ts
This file contains hidden or 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
src/utils/computePriceImpact.test.ts → ..._tests__/utils/computePriceImpact.test.ts
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
src/utils/sortedInsert.test.ts → src/__tests__/utils/sortedInsert.test.ts
This file contains hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
src/utils/validateAndParseAddress.test.ts → ...s__/utils/validateAndParseAddress.test.ts
This file contains hidden or 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 hidden or 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,17 +1,18 @@ | ||
| import JSBI from 'jsbi' | ||
|
|
||
| // exports for external consumption | ||
| export type BigintIsh = JSBI | string | number | ||
| export type BigintIsh = bigint | JSBI | string | number | ||
|
|
||
| export enum TradeType { | ||
| EXACT_INPUT, | ||
| EXACT_OUTPUT | ||
| EXACT_OUTPUT, | ||
| } | ||
|
|
||
| export enum Rounding { | ||
| ROUND_DOWN, | ||
| ROUND_HALF_UP, | ||
| ROUND_UP | ||
| ROUND_UP, | ||
| } | ||
|
|
||
| export const MaxUint256 = JSBI.BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff') | ||
| export const MaxUint256BigInt = BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff') |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.