Skip to content

Commit

Permalink
Merge pull request #13 from Jeff-CCH/feat/permit2-pull-token
Browse files Browse the repository at this point in the history
Add Permit2
  • Loading branch information
Jeff-CCH authored Nov 22, 2023
2 parents a65911a + 73d43f3 commit ff20b92
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/olive-peas-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@protocolink/api': patch
---

add Permit2, skip Permit2 test
4 changes: 2 additions & 2 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
},
"dependencies": {
"@protocolink/common": "^0.3.4",
"@protocolink/core": "^0.4.3",
"@protocolink/logics": "^0.4.6",
"@protocolink/core": "^0.4.4",
"@protocolink/logics": "^0.4.7",
"@types/lodash": "^4.14.195",
"@types/uuid": "^9.0.2",
"@uniswap/permit2-sdk": "^1.2.0",
Expand Down
1 change: 1 addition & 0 deletions packages/api/src/protocols/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export * as balancerv2 from './balancer-v2';
export * as compoundv3 from './compound-v3';
export * as openoceanv2 from './openocean-v2';
export * as paraswapv5 from './paraswap-v5';
export * as permit2 from './permit2';
export * as radiantv2 from './radiant-v2';
export * as syncswap from './syncswap';
export * as uniswapv3 from './uniswap-v3';
Expand Down
1 change: 1 addition & 0 deletions packages/api/src/protocols/permit2/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './pull-token';
11 changes: 11 additions & 0 deletions packages/api/src/protocols/permit2/pull-token.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Logic } from 'src/types';
import * as common from '@protocolink/common';
import * as logics from '@protocolink/logics';

export type PullTokenFields = common.Declasifying<logics.permit2.PullTokenLogicFields>;

export type PullTokenLogic = Logic<PullTokenFields>;

export function newPullTokenLogic(fields: PullTokenFields): PullTokenLogic {
return { rid: logics.permit2.PullTokenLogic.rid, fields };
}
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1080,14 +1080,14 @@
node-addon-api "^3.2.1"
node-gyp-build "^4.3.0"

"@protocolink/logics@^0.4.6":
version "0.4.6"
resolved "https://registry.yarnpkg.com/@protocolink/logics/-/logics-0.4.6.tgz#e3f5e564367467d84555b82c796ff690616566c4"
integrity sha512-qzVGNuYGJOMzs5CdBsq5jWGm7UH20eKIjikEnb3QZ8ZnKQVt/hnZs+zFBh3iWaLabdCsnyLYEW5BTyYgExrDfA==
"@protocolink/logics@^0.4.7":
version "0.4.7"
resolved "https://registry.yarnpkg.com/@protocolink/logics/-/logics-0.4.7.tgz#74e146eba180a86774427fb9a5d79693061ce2ff"
integrity sha512-d82jyN0RVJtTtZohTURmZY4RL0ReUPbp6Ir746sM42u2gr9d8PYuDkbFir0mS43FHqAiKUKrTGfCvDProJ9NJw==
dependencies:
"@paraswap/sdk" "^6.2.2"
"@protocolink/common" "^0.3.3"
"@protocolink/core" "^0.4.2"
"@protocolink/common" "^0.3.4"
"@protocolink/core" "^0.4.4"
"@types/lodash" "^4.14.195"
"@uniswap/sdk-core" "^3.2.6"
"@uniswap/token-lists" "^1.0.0-beta.31"
Expand Down

0 comments on commit ff20b92

Please sign in to comment.