Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adding semgrep #2

Closed
wants to merge 1,099 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1099 commits
Select commit Hold shift + click to select a range
0a48e10
fix: use chainid
marktoda Feb 9, 2023
69ba2bb
Merge pull request #37 from Uniswap/add-builder-from-order
marktoda Feb 9, 2023
4886f34
0.6.0
marktoda Feb 9, 2023
027cf97
fix: update package json
marktoda Feb 13, 2023
2a14d24
Merge pull request #38 from Uniswap/update-pjson
marktoda Feb 13, 2023
2aad0ae
0.6.1
marktoda Feb 13, 2023
3e3a311
fix: signature sanitization (#102)
marktoda Feb 14, 2023
1c24804
1.3.6
marktoda Feb 14, 2023
ca241c9
feat: add order toJSON
marktoda Feb 14, 2023
5968026
Merge pull request #39 from Uniswap/add-order-tojson
marktoda Feb 14, 2023
f264344
Cryptopunks should be revertable (#103)
ewilz Feb 15, 2023
fa07f09
1.3.7
ewilz Feb 15, 2023
d324829
check endTime, startTime, and deadline invariants only on build
tinaszheng Feb 17, 2023
be05fc4
update tests
tinaszheng Feb 17, 2023
eb07f61
Merge pull request #40 from Uniswap/tina/builder-invariant
marktoda Feb 17, 2023
955c49c
0.6.2
marktoda Feb 17, 2023
29b54e1
feat: add dutch decay helper
marktoda Feb 17, 2023
7844289
Merge pull request #41 from Uniswap/add-dutch-decay-helper
marktoda Feb 17, 2023
78f21fc
0.6.3
marktoda Feb 17, 2023
51faf24
check deadline on build step
tinaszheng Feb 21, 2023
5d32c20
lint
tinaszheng Feb 21, 2023
7de5aea
Merge pull request #43 from Uniswap/tina/builder-invariant-2
marktoda Feb 21, 2023
e5fb664
chore: bump patch
marktoda Feb 21, 2023
073eefc
feat: update constants
marktoda Feb 23, 2023
8b210ab
Merge pull request #44 from Uniswap/update-constants
ConjunctiveNormalForm Feb 23, 2023
0b8dd61
chore: update to 0.7.0
marktoda Feb 23, 2023
4a1174d
feat: add resolution
marktoda Feb 18, 2023
97e6236
Merge pull request #42 from Uniswap/add-resolution
marktoda Feb 27, 2023
da6026e
feat: add BSC SupportedChainId (#41)
JFrankfurt Feb 27, 2023
7dda5b3
Fix code style issues with Prettier
lint-action Feb 27, 2023
125d3ad
build: 3.1.2 (#44)
JFrankfurt Feb 27, 2023
edfe713
add nonFeeRecipient
snreynolds Feb 28, 2023
3da5d44
fixing comment
snreynolds Feb 28, 2023
59766bb
add tests
snreynolds Feb 28, 2023
e76f3cb
Merge pull request #45 from Uniswap/sra/recipient
snreynolds Feb 28, 2023
f079431
bump version
rileydcampbell Feb 28, 2023
91e6de8
Merge pull request #46 from Uniswap/bump_version_0.7.1
rileydcampbell Feb 28, 2023
201f2f2
BSC deploy (#104)
hensha256 Mar 1, 2023
1fd2aa2
feat: remove ropsten, rinkeby, kovan, arbitrum_rinkeby support (#45)
vm Mar 1, 2023
ad8d7e2
build: 3.2.0 (#46)
zzmp Mar 1, 2023
a3e7fc3
add NonceUsed hash
ConjunctiveNormalForm Mar 2, 2023
2f9fa0f
remove console logs
ConjunctiveNormalForm Mar 3, 2023
782acea
Merge pull request #47 from Uniswap/fix-watcher
ConjunctiveNormalForm Mar 3, 2023
70345e7
feat: bump version number
rileydcampbell Mar 3, 2023
71e4e7a
Merge pull request #48 from Uniswap/bump_version_0.7.2
rileydcampbell Mar 3, 2023
0a2cffe
Revert "fix: add NonceUsed prefix"
ConjunctiveNormalForm Mar 6, 2023
4d5e277
Merge pull request #49 from Uniswap/revert-47-fix-watcher
ConjunctiveNormalForm Mar 6, 2023
4dc0058
feat: lowercase address checking when doing token comparisons (#47)
tinaszheng Mar 6, 2023
10f1fc8
build: 3.2.1 (#48)
tinaszheng Mar 6, 2023
6959b21
merge main
ConjunctiveNormalForm Mar 7, 2023
d8727be
remove script
ConjunctiveNormalForm Mar 7, 2023
f6faae1
patch version bump
ConjunctiveNormalForm Mar 7, 2023
117f43b
add exclusivity period check and integration test
ConjunctiveNormalForm Mar 7, 2023
f651d5c
lte
ConjunctiveNormalForm Mar 7, 2023
20b441b
remove unnecessary timestamp check
ConjunctiveNormalForm Mar 7, 2023
32d312c
Merge pull request #50 from Uniswap/fix-watcher
ConjunctiveNormalForm Mar 8, 2023
4dadc8b
fix: expose contracts
marktoda Mar 8, 2023
aad64be
0.7.4
marktoda Mar 8, 2023
4e8d2c2
Update bsc deployment addr for UR (#106)
zhongeric Mar 10, 2023
75ff6c0
New BSC deploy (#107)
hensha256 Mar 10, 2023
24e5e21
fix: bsc -> bnb (#49)
JFrankfurt Mar 10, 2023
86d2d82
chore: publish 3.2.2 (#50)
JFrankfurt Mar 10, 2023
147cc04
Add seaport v1.4 support (#105)
zhongeric Mar 13, 2023
2e1996c
Seaport V1.4 Revertible (#109)
hensha256 Mar 14, 2023
e34e47a
Seaport SDK bug fix (#111)
hensha256 Mar 14, 2023
64f43f1
npm bump
hensha256 Mar 14, 2023
43e3e63
Standardise router usage in tests (#110)
hensha256 Mar 17, 2023
0c52c12
ERC20->NFT on seaport (#112)
hensha256 Mar 21, 2023
d8c363f
Element market support (#114)
hensha256 Mar 21, 2023
80b7c1d
1.5.0-beta.0
hensha256 Mar 21, 2023
328425a
feat: update SDK for latest contracts
marktoda Apr 22, 2023
fb85a7e
fix: validation
marktoda Apr 22, 2023
36806d1
fix: review comments
marktoda Apr 24, 2023
0adbe31
Merge pull request #51 from Uniswap/update-sdk-for-contracts
marktoda Apr 24, 2023
5824cd9
feat: update address
marktoda Apr 25, 2023
9cdb472
Merge pull request #52 from Uniswap/update-address
marktoda Apr 25, 2023
9d3ab42
0.8.0
marktoda Apr 25, 2023
9f190a8
Merge pull request #53 from Uniswap/bump
marktoda Apr 25, 2023
2a440f8
feat: add polygon deploy
marktoda Apr 25, 2023
811a551
Merge pull request #54 from Uniswap/add-polygon-deploy
marktoda Apr 25, 2023
35d454f
0.9.0
marktoda Apr 25, 2023
182b375
Merge pull request #55 from Uniswap/0.9
marktoda Apr 25, 2023
933bc65
feat: add multicall2 address mapping.
rileydcampbell Apr 27, 2023
a77cc65
bump package version
rileydcampbell Apr 27, 2023
9bdd91f
Merge pull request #56 from Uniswap/add_polygon_multicall2
rileydcampbell Apr 27, 2023
45f792c
feat: bumped package version.
rileydcampbell Apr 27, 2023
ca54c7c
feat: add chainId as optional multicall param.
rileydcampbell Apr 27, 2023
e6048cd
Merge pull request #58 from Uniswap/add_chain_id_to_multicall_param
rileydcampbell Apr 27, 2023
6dea229
feat: add logs for debugging.
rileydcampbell Apr 27, 2023
a2550e5
Merge pull request #59 from Uniswap/add_logs_for_debugging
marktoda Apr 27, 2023
ae5974f
Revert "feat: add logs for debugging."
rileydcampbell Apr 27, 2023
6ca7b33
undo logging
rileydcampbell Apr 27, 2023
bfe9aca
LooksRareV2 support (#119)
hensha256 Apr 28, 2023
4fea9e3
NFTX 0x Zap (#120)
hensha256 Apr 28, 2023
4f2cf89
feat: use multicall3
marktoda Apr 28, 2023
5717e25
Merge pull request #61 from Uniswap/undo_logging
marktoda Apr 28, 2023
0683e6c
Merge branch 'main' into use-multicall-3
marktoda Apr 28, 2023
94caea5
Merge pull request #62 from Uniswap/use-multicall-3
marktoda Apr 28, 2023
96ff83e
fix: set comma dangle lint rule
marktoda Apr 28, 2023
d7c2fd1
Merge pull request #63 from Uniswap/fix-lint-once-and-forall
marktoda Apr 28, 2023
f2db096
Seaport v1.5 (#121)
hensha256 May 3, 2023
e711188
Batch LR buys (#123)
hensha256 May 3, 2023
1f55518
Test seaportv1.5 (#126)
hensha256 May 5, 2023
281d7ed
UR 1.2 deploy addresses (#127)
hensha256 May 5, 2023
c84e7af
1.5.0
hensha256 May 5, 2023
4ef613c
rename DutchLimit* -> Dutch*
tinaszheng May 8, 2023
598c2f9
Merge pull request #64 from Uniswap/tina/rename-trade
marktoda May 8, 2023
f778a2d
Deploy sepolia (#128)
hensha256 May 23, 2023
e0ec3c2
1.5.1
hensha256 May 23, 2023
1df4aad
Update addresses for chainId 12341234 (tenderly) (#65)
zhongeric May 23, 2023
91fd9ad
feat: publish 1.0.0-alpha.1
marktoda May 23, 2023
f49491b
Merge pull request #67 from Uniswap/publish-1.0-beta
marktoda May 23, 2023
b911e29
Update Reactor mapping address for tenderly (#68)
zhongeric May 23, 2023
83f3ecd
bump pacakge version (#69)
zhongeric May 24, 2023
905fa51
feat: add exclusivity to resolve
marktoda Jun 1, 2023
d932a40
fix: add exclusivity
marktoda Jun 1, 2023
4345503
fix: remove only
marktoda Jun 1, 2023
946e783
fix: audit comments
marktoda Jun 1, 2023
ab34384
feat: add Sepolia SupportedChainId (#53)
cbachmeier Jun 1, 2023
dc7f8b6
chore: publish 3.2.3 (#54)
cbachmeier Jun 1, 2023
539d142
fix: remove duplicate test
marktoda Jun 1, 2023
5e2fb7d
Merge pull request #71 from Uniswap/add-exclusivity-to-resolve
marktoda Jun 1, 2023
43d887e
fix: update to latest contracts
marktoda Jun 1, 2023
0442edd
Deploy block helper (#129)
hensha256 Jun 8, 2023
200eb77
1.5.2
hensha256 Jun 8, 2023
27b419f
feat: move shared contract addresses to shared repo (#58)
cbachmeier Jun 9, 2023
75e6761
feat: Add Avalanche Chain and V3 Contract Addresses (#59)
cbachmeier Jun 9, 2023
7a3471c
v3.2.4 (#60)
cbachmeier Jun 9, 2023
7b85526
fix: the object reduce return a string (#61)
0xAliya Jun 12, 2023
34f9b5a
Fix code style issues with Prettier
lint-action Jun 12, 2023
409da14
chore: publish 3.2.5 (#63)
cbachmeier Jun 12, 2023
8e65240
chore: publish 3.2.6 (#64)
cbachmeier Jun 12, 2023
c15f152
Merge pull request #72 from Uniswap/add-exclusivity-to-resolve
marktoda Jun 15, 2023
3f146b7
Add avalanche (#130)
hensha256 Jun 20, 2023
3b65cb9
1.5.3
hensha256 Jun 20, 2023
47fcf8c
feat: update to latest contracts
marktoda Jun 23, 2023
a20b8b9
feat: update contract addresses
marktoda Jun 23, 2023
0ed6dc2
Merge pull request #73 from Uniswap/update-to-latest-contracts
marktoda Jun 26, 2023
d5132e4
feat: bump version to alpha 4
marktoda Jun 30, 2023
0636cb4
Merge pull request #74 from Uniswap/bump-version-alpha-4
marktoda Jul 3, 2023
dd94c89
feat: udpate goerli addressses
marktoda Jul 5, 2023
96098c2
Merge pull request #75 from Uniswap/update-goerli-addresses
marktoda Jul 6, 2023
d97176a
feat: rename gouda to UniswapX
marktoda Jul 7, 2023
e76c3e7
Merge pull request #76 from Uniswap/uniswapx
marktoda Jul 7, 2023
2e32d50
chore: release 1.0.0
marktoda Jul 7, 2023
04947b6
Merge pull request #77 from Uniswap/release-1.0.0
marktoda Jul 7, 2023
3614afe
feat: add base goerli addresses (#70)
just-toby Jul 10, 2023
a982241
chore: v4.0.1 (#67)
cbachmeier Jul 10, 2023
489607f
4.0.2 (#71)
cbachmeier Jul 10, 2023
33ae541
chore: upgrade sdk-core to latest
just-toby Jul 10, 2023
203cd32
chore: upgrade sdk-core to latest (#139)
just-toby Jul 11, 2023
b2d95cf
chore: upgrade sdk-core to latest (#179)
just-toby Jul 11, 2023
f7f72a0
3.10.0 (#180)
just-toby Jul 12, 2023
193d0e8
chore: update version to match npm (#141)
just-toby Jul 12, 2023
76c74df
fix: resolve dependencies
just-toby Jul 12, 2023
494c08c
Merge pull request #46 from Uniswap/fix/upgrade-sdk-core
just-toby Jul 12, 2023
cfb1362
1.5.0
just-toby Jul 12, 2023
c3e9ad0
1.6.0
just-toby Jul 12, 2023
4aaee76
chore: upgrade sdk-core to latest (#132)
just-toby Jul 13, 2023
e1300a7
feat; base mainnet chainid (#72)
just-toby Jul 13, 2023
bd2a266
4.0.3
just-toby Jul 13, 2023
7170bae
1.5.4 (#134)
just-toby Jul 14, 2023
a492e8d
feat: add base mainnet v3 addresses (#74)
just-toby Jul 17, 2023
93697e1
fix: temporarily remove base from supported_chains (#75)
just-toby Jul 18, 2023
79d636a
fix: reinstate base chains (#76)
just-toby Jul 18, 2023
883030e
4.0.6
just-toby Jul 18, 2023
ebc3207
chore: bump sdk core major version
rileydcampbell Jul 18, 2023
1ca78d9
Merge pull request #80 from Uniswap/bump_sdk-core_ver
marktoda Jul 18, 2023
9593a54
feat: add invalid signer selector
marktoda Jul 19, 2023
bcf9fbd
Merge pull request #82 from Uniswap/add-invalid-signer
marktoda Jul 19, 2023
f294e3e
feat: add UR for base nets (#136)
just-toby Jul 24, 2023
d5a81d2
feat: export UNIVERSAL_ROUTER_CREATION_BLOCK (#139)
cbachmeier Jul 24, 2023
d005963
1.5.5 (#138)
just-toby Jul 24, 2023
d4f12dd
feat: v1.1 update
marktoda Jul 26, 2023
d898331
Merge pull request #84 from Uniswap/update-gouda-sdk
marktoda Jul 26, 2023
1690b54
Encode swap options (#133)
hensha256 Aug 1, 2023
a014fbc
1.5.7
hensha256 Aug 4, 2023
ba06bf1
support for native currencies
tinaszheng Aug 9, 2023
fa084a1
Merge pull request #86 from Uniswap/tina/native-eth
tinaszheng Aug 9, 2023
7b8ea43
feat: bump uniswapx-sdk version
rileydcampbell Aug 9, 2023
9a17724
Merge pull request #87 from Uniswap/bump_ver
rileydcampbell Aug 9, 2023
3e30ce4
also allow using zero address as native
tinaszheng Aug 11, 2023
2ac371e
add unit test
tinaszheng Aug 11, 2023
05bd3e8
Merge pull request #89 from Uniswap/tina/native-address
rileydcampbell Aug 11, 2023
7921b9f
1.3.0
rileydcampbell Aug 11, 2023
fa3d7ca
Merge pull request #90 from Uniswap/bump_minor_version
rileydcampbell Aug 11, 2023
11e4fe1
add tokenIn
ConjunctiveNormalForm Aug 21, 2023
6f9c387
update eslint package and fix prettier
ConjunctiveNormalForm Aug 21, 2023
3ba8b93
downgrade eslint to major version 5
ConjunctiveNormalForm Aug 21, 2023
9a3ce52
Merge pull request #91 from Uniswap/add-tokenin
ConjunctiveNormalForm Aug 21, 2023
ef97070
1.4.0
ConjunctiveNormalForm Aug 21, 2023
7b62dcb
Merge pull request #92 from Uniswap/bump-minor
ConjunctiveNormalForm Aug 21, 2023
4d78349
chore: update core deps (#47)
grabbou Aug 28, 2023
bd89107
Add fee-on-transfer token fees fields (#83)
jsy1218 Sep 7, 2023
da8c6d6
v4.0.7 (#84)
jsy1218 Sep 8, 2023
8022d81
feat: update UR addresses (#145)
marktoda Sep 8, 2023
8c1ccb5
v2 quote with fee-on-transfer tax considerations (#144)
jsy1218 Sep 11, 2023
8577dd2
feat: add v2 factory chains (#85)
just-toby Sep 13, 2023
6bd2e89
v3.2.1 (#145)
jsy1218 Sep 15, 2023
5120bc3
add token taxes to price impact calculations
tinaszheng Sep 19, 2023
ce06302
Fix code style issues with Prettier
lint-action Sep 19, 2023
dffa02e
add buy fee test case
tinaszheng Sep 19, 2023
f33b4c6
change to .wrapped for Token type and update test
tinaszheng Sep 19, 2023
a75497f
update tests to be v2 routes and update comment
tinaszheng Sep 20, 2023
358959f
Fix code style issues with Prettier
lint-action Sep 20, 2023
76c517b
Merge pull request #50 from Uniswap/tina/price-impact-fot
tinaszheng Sep 20, 2023
35aa960
bump to 1.7.0
tinaszheng Sep 20, 2023
7874249
Merge pull request #51 from Uniswap/tina/bump-ver
tinaszheng Sep 20, 2023
dce6d25
enable flat fee option on swaps (#149)
ewilz Sep 27, 2023
6c29ad5
1.5.8
ewilz Sep 28, 2023
638bf58
Support STETH trades that auto wrap to WSTETH (#148)
ewilz Sep 29, 2023
1962ed0
2.0.0
ewilz Sep 29, 2023
6ea9351
Receive an option to decide if we calculate FOT tax or not (#146)
mikeki Sep 29, 2023
3f596fa
Export RoutePlanner and CommandType (#150)
hensha256 Oct 12, 2023
24ea637
2.0.1
hensha256 Oct 12, 2023
afdafea
chore: add error message for when `new Trade()` is called without any…
felipebrahm Oct 13, 2023
15c63e4
feat: update nonFeeRecipient
marktoda Oct 13, 2023
131e77d
feat: fail if new recipient and fee recipient are same
marktoda Oct 13, 2023
d265358
Merge pull request #98 from Uniswap/update-non-fee-recipient
marktoda Oct 13, 2023
dfe5f62
feat: make nonFeeRecipient optional
marktoda Oct 13, 2023
69ae9cb
fix: lint
marktoda Oct 13, 2023
fa2f161
Merge pull request #99 from Uniswap/make-feeRecipient-optional
marktoda Oct 13, 2023
5a9ef84
catch 0 output amount case
tinaszheng Oct 13, 2023
987971d
Fix code style issues with Prettier
lint-action Oct 13, 2023
6785e8a
bump package version
tinaszheng Oct 13, 2023
e45df0b
add error for 100% buy tax
tinaszheng Oct 13, 2023
83201bd
Fix code style issues with Prettier
lint-action Oct 13, 2023
77f41eb
Merge pull request #53 from Uniswap/tina/fix-price-impact
tinaszheng Oct 13, 2023
6c86666
use zero instead of throwing error
tinaszheng Oct 13, 2023
9724f7b
update comment
tinaszheng Oct 13, 2023
e49cb2c
Fix code style issues with Prettier
lint-action Oct 13, 2023
28a404c
remove version bump
tinaszheng Oct 13, 2023
e708d9a
Merge pull request #54 from Uniswap/tina/nvm
tinaszheng Oct 14, 2023
90e4f51
Wrapped chains support (#90)
hensha256 Oct 16, 2023
a15b3ed
4.0.8
willpote Oct 16, 2023
207194f
Wrapped avax support (#92)
hensha256 Oct 16, 2023
3e2897d
4.0.9 (#93)
hensha256 Oct 16, 2023
2d8f8f4
Fix: FOT token tax retrieval source (#148)
jsy1218 Oct 17, 2023
f3145ed
v3.2.2 (#150)
jsy1218 Oct 18, 2023
8b57332
Chore: bump version to 3.2.3 (#149)
jsy1218 Oct 18, 2023
b02cb4a
fix: router addresses (#151)
marktoda Nov 9, 2023
1683cef
Add 'sdks/sdk-core/' from commit '06e102f398802d04d917a2633dff9dec522…
adjkant Dec 7, 2023
ca8289f
Add 'sdks/v2-sdk/' from commit '81948482505b09da3282c7bcd93945eef1992…
adjkant Dec 7, 2023
b52ef97
Add 'sdks/v3-sdk/' from commit '81d66099f07d1ec350767f497ef73222575fe…
adjkant Dec 7, 2023
d9c4157
Add 'sdks/universal-router-sdk/' from commit 'cb9c0f04215e6e955e99057…
adjkant Dec 7, 2023
e6b02f0
Add 'sdks/router-sdk/' from commit 'bf44f55bd1277a2f029856a5f84a6a8bb…
adjkant Dec 7, 2023
446022d
Add 'sdks/uniswapx-sdk/' from commit '7b4375b566c7fa96ebc9e99f7745808…
adjkant Dec 7, 2023
ce8e75d
Add 'sdks/permit2-sdk/' from commit 'cb84da1accf9f475d11e96fff7e5b255…
adjkant Dec 7, 2023
c6dabcb
adding semgrep
mr-uniswap Jan 10, 2024
cdf7c75
fixed the path
mr-uniswap Jan 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions .github/workflows/check-pr-title.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check PR Title

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
# Ensures that the PR title adheres to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/).
conventional-commit:
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Semgrep
on:
workflow_dispatch: {}
pull_request: {}
push:
branches:
- main
schedule:
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
- cron: '35 11 * * *'
jobs:
semgrep:
name: semgrep/ci
runs-on: ubuntu-20.04
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
container:
image: returntocorp/semgrep
if: (github.actor != 'dependabot[bot]')
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- run: semgrep ci
1 change: 1 addition & 0 deletions sdks/permit2-sdk/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sol linguist-language=Solidity
39 changes: 39 additions & 0 deletions sdks/permit2-sdk/.github/workflows/forge-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Forge Tests

on:
push:
pull_request:

jobs:
tests:
name: Unit tests
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 16
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Write interop
run: yarn interop

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Run tests
run: forge test
28 changes: 28 additions & 0 deletions sdks/permit2-sdk/.github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint

on:
push:
pull_request:

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 16
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run linters
run: yarn prettier --check src/
28 changes: 28 additions & 0 deletions sdks/permit2-sdk/.github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Unit Tests

on:
push:
pull_request:

jobs:
tests:
name: Unit tests
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 16
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run tests
run: yarn test
7 changes: 7 additions & 0 deletions sdks/permit2-sdk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#build
dist
out
cache

#dependencies
node_modules
9 changes: 9 additions & 0 deletions sdks/permit2-sdk/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "permit2"]
path = permit2
url = https://github.com/Uniswap/permit2
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/solmate"]
path = lib/solmate
url = https://github.com/transmissions11/solmate
7 changes: 7 additions & 0 deletions sdks/permit2-sdk/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"solidity.packageDefaultDependenciesContractsDirectory": "src",
"solidity.packageDefaultDependenciesDirectory": "lib",
"solidity.compileUsingRemoteVersion": "v0.8.17",
"solidity.formatter": "forge",
"editor.formatOnSave": true
}
File renamed without changes.
18 changes: 18 additions & 0 deletions sdks/permit2-sdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# permit2-sdk

## Local Development

### Checkout the repo
- `git clone --recurse-submodules https://github.com/Uniswap/permit2-sdk.git`

### Install dependencies
- `yarn`

### Run Unit Tests
- `yarn test`

### Run Forge tests
- `yarn build`
- `yarn interop`
- `(cd permit2 && forge build)`
- `forge test`
Loading
Loading