diff --git a/.changeset/olive-peas-remember.md b/.changeset/olive-peas-remember.md new file mode 100644 index 00000000..1e21ba92 --- /dev/null +++ b/.changeset/olive-peas-remember.md @@ -0,0 +1,5 @@ +--- +'@protocolink/api': patch +--- + +add Permit2, skip Permit2 test diff --git a/packages/api/package.json b/packages/api/package.json index 7fca937f..c31c78fb 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -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", diff --git a/packages/api/src/protocols/index.ts b/packages/api/src/protocols/index.ts index a93dbf56..7d42fb9e 100644 --- a/packages/api/src/protocols/index.ts +++ b/packages/api/src/protocols/index.ts @@ -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'; diff --git a/packages/api/src/protocols/permit2/index.ts b/packages/api/src/protocols/permit2/index.ts new file mode 100644 index 00000000..9af620cb --- /dev/null +++ b/packages/api/src/protocols/permit2/index.ts @@ -0,0 +1 @@ +export * from './pull-token'; diff --git a/packages/api/src/protocols/permit2/pull-token.ts b/packages/api/src/protocols/permit2/pull-token.ts new file mode 100644 index 00000000..05fd028b --- /dev/null +++ b/packages/api/src/protocols/permit2/pull-token.ts @@ -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; + +export type PullTokenLogic = Logic; + +export function newPullTokenLogic(fields: PullTokenFields): PullTokenLogic { + return { rid: logics.permit2.PullTokenLogic.rid, fields }; +} diff --git a/yarn.lock b/yarn.lock index cb16e8ae..f93bfa00 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"