From 28e2c9a1955de991ca872f6cf5573badac9bc726 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 8 Sep 2022 19:15:46 +0000 Subject: [PATCH 01/12] chore(deps): update dependency typescript to v4.8.3 --- example/aggregator/package.json | 2 +- example/aggregator/yarn.lock | 8 ++++---- package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example/aggregator/package.json b/example/aggregator/package.json index abae485..4891938 100644 --- a/example/aggregator/package.json +++ b/example/aggregator/package.json @@ -12,6 +12,6 @@ "@types/node": "17.0.21", "ts-node": "10.9.1", "tslib": "2.4.0", - "typescript": "4.7.4" + "typescript": "4.8.3" } } \ No newline at end of file diff --git a/example/aggregator/yarn.lock b/example/aggregator/yarn.lock index fec09ed..7208611 100644 --- a/example/aggregator/yarn.lock +++ b/example/aggregator/yarn.lock @@ -346,10 +346,10 @@ type-fest@^1.2.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== -typescript@4.7.4: - version "4.7.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" - integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== +typescript@4.8.3: + version "4.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88" + integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig== v8-compile-cache-lib@^3.0.1: version "3.0.1" diff --git a/package.json b/package.json index ac94dd9..071f414 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "prettier": "2.7.1", "ts-node": "10.9.1", "tslib": "2.4.0", - "typescript": "4.7.4" + "typescript": "4.8.3" }, "homepage": "https://github.com/nervina-labs/cota-sdk-js#readme" } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 1dedbd3..641c80b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1810,10 +1810,10 @@ type-fest@^1.2.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== -typescript@4.7.4: - version "4.7.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" - integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== +typescript@4.8.3: + version "4.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88" + integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig== unbox-primitive@^1.0.2: version "1.0.2" From 180d9e6d4d829577d20f03936a6a9e8d5affddc2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 10:49:31 +0000 Subject: [PATCH 02/12] chore(deps): update dependency eslint to v8.23.1 --- package.json | 2 +- yarn.lock | 65 ++++++++++++++++++++++------------------------------ 2 files changed, 29 insertions(+), 38 deletions(-) diff --git a/package.json b/package.json index ac94dd9..317c6be 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@types/node": "17.0.31", "@typescript-eslint/parser": "5.33.0", "babel-eslint": "10.1.0", - "eslint": "8.21.0", + "eslint": "8.23.1", "eslint-config-prettier": "8.5.0", "eslint-plugin-import": "2.26.0", "eslint-plugin-prettier": "4.2.1", diff --git a/yarn.lock b/yarn.lock index 1dedbd3..da6983a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -104,14 +104,14 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@eslint/eslintrc@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" - integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw== +"@eslint/eslintrc@^1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.2.tgz#58b69582f3b7271d8fa67fe5251767a5b38ea356" + integrity sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.3.2" + espree "^9.4.0" globals "^13.15.0" ignore "^5.2.0" import-fresh "^3.2.1" @@ -133,6 +133,11 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d" integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA== +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + "@humanwhocodes/object-schema@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" @@ -323,7 +328,7 @@ acorn-walk@^8.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.0: +acorn@^8.4.1, acorn@^8.8.0: version "8.8.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== @@ -775,14 +780,15 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@8.21.0: - version "8.21.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.21.0.tgz#1940a68d7e0573cef6f50037addee295ff9be9ef" - integrity sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA== +eslint@8.23.1: + version "8.23.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.1.tgz#cfd7b3f7fdd07db8d16b4ac0516a29c8d8dca5dc" + integrity sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg== dependencies: - "@eslint/eslintrc" "^1.3.0" + "@eslint/eslintrc" "^1.3.2" "@humanwhocodes/config-array" "^0.10.4" "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" + "@humanwhocodes/module-importer" "^1.0.1" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -792,13 +798,12 @@ eslint@8.21.0: eslint-scope "^7.1.1" eslint-utils "^3.0.0" eslint-visitor-keys "^3.3.0" - espree "^9.3.3" + espree "^9.4.0" esquery "^1.4.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" find-up "^5.0.0" - functional-red-black-tree "^1.0.1" glob-parent "^6.0.1" globals "^13.15.0" globby "^11.1.0" @@ -807,6 +812,7 @@ eslint@8.21.0: import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" + js-sdsl "^4.1.4" js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" @@ -818,21 +824,11 @@ eslint@8.21.0: strip-ansi "^6.0.1" strip-json-comments "^3.1.0" text-table "^0.2.0" - v8-compile-cache "^2.0.3" -espree@^9.3.2: - version "9.3.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.2.tgz#f58f77bd334731182801ced3380a8cc859091596" - integrity sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA== - dependencies: - acorn "^8.7.1" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" - -espree@^9.3.3: - version "9.3.3" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.3.tgz#2dd37c4162bb05f433ad3c1a52ddf8a49dc08e9d" - integrity sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng== +espree@^9.4.0: + version "9.4.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a" + integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== dependencies: acorn "^8.8.0" acorn-jsx "^5.3.2" @@ -976,11 +972,6 @@ function.prototype.name@^1.1.5: es-abstract "^1.19.0" functions-have-names "^1.2.2" -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== - functions-have-names@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" @@ -1265,6 +1256,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +js-sdsl@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.1.4.tgz#78793c90f80e8430b7d8dc94515b6c77d98a26a6" + integrity sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -1837,11 +1833,6 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== -v8-compile-cache@^2.0.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" From 1bdc0ca90366de7bfd2ec30cdc3da56b5e3e9385 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 17:44:31 +0000 Subject: [PATCH 03/12] chore(deps): update dependency @typescript-eslint/parser to v5.37.0 --- package.json | 2 +- yarn.lock | 58 ++++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index ac94dd9..d8f339f 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@types/crypto-js": "4.1.1", "@types/node": "17.0.31", - "@typescript-eslint/parser": "5.33.0", + "@typescript-eslint/parser": "5.37.0", "babel-eslint": "10.1.0", "eslint": "8.21.0", "eslint-config-prettier": "8.5.0", diff --git a/yarn.lock b/yarn.lock index 1dedbd3..c58c373 100644 --- a/yarn.lock +++ b/yarn.lock @@ -269,48 +269,48 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.31.tgz#a5bb84ecfa27eec5e1c802c6bbf8139bdb163a5d" integrity sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q== -"@typescript-eslint/parser@5.33.0": - version "5.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.33.0.tgz#26ec3235b74f0667414613727cb98f9b69dc5383" - integrity sha512-cgM5cJrWmrDV2KpvlcSkelTBASAs1mgqq+IUGKJvFxWrapHpaRy5EXPQz9YaKF3nZ8KY18ILTiVpUtbIac86/w== - dependencies: - "@typescript-eslint/scope-manager" "5.33.0" - "@typescript-eslint/types" "5.33.0" - "@typescript-eslint/typescript-estree" "5.33.0" +"@typescript-eslint/parser@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.37.0.tgz#c382077973f3a4ede7453fb14cadcad3970cbf3b" + integrity sha512-01VzI/ipYKuaG5PkE5+qyJ6m02fVALmMPY3Qq5BHflDx3y4VobbLdHQkSMg9VPRS4KdNt4oYTMaomFoHonBGAw== + dependencies: + "@typescript-eslint/scope-manager" "5.37.0" + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/typescript-estree" "5.37.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.33.0": - version "5.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.33.0.tgz#509d7fa540a2c58f66bdcfcf278a3fa79002e18d" - integrity sha512-/Jta8yMNpXYpRDl8EwF/M8It2A9sFJTubDo0ATZefGXmOqlaBffEw0ZbkbQ7TNDK6q55NPHFshGBPAZvZkE8Pw== +"@typescript-eslint/scope-manager@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.37.0.tgz#044980e4f1516a774a418dafe701a483a6c9f9ca" + integrity sha512-F67MqrmSXGd/eZnujjtkPgBQzgespu/iCZ+54Ok9X5tALb9L2v3G+QBSoWkXG0p3lcTJsL+iXz5eLUEdSiJU9Q== dependencies: - "@typescript-eslint/types" "5.33.0" - "@typescript-eslint/visitor-keys" "5.33.0" + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/visitor-keys" "5.37.0" -"@typescript-eslint/types@5.33.0": - version "5.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.33.0.tgz#d41c584831805554b063791338b0220b613a275b" - integrity sha512-nIMt96JngB4MYFYXpZ/3ZNU4GWPNdBbcB5w2rDOCpXOVUkhtNlG2mmm8uXhubhidRZdwMaMBap7Uk8SZMU/ppw== +"@typescript-eslint/types@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.37.0.tgz#09e4870a5f3af7af3f84e08d792644a87d232261" + integrity sha512-3frIJiTa5+tCb2iqR/bf7XwU20lnU05r/sgPJnRpwvfZaqCJBrl8Q/mw9vr3NrNdB/XtVyMA0eppRMMBqdJ1bA== -"@typescript-eslint/typescript-estree@5.33.0": - version "5.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.0.tgz#02d9c9ade6f4897c09e3508c27de53ad6bfa54cf" - integrity sha512-tqq3MRLlggkJKJUrzM6wltk8NckKyyorCSGMq4eVkyL5sDYzJJcMgZATqmF8fLdsWrW7OjjIZ1m9v81vKcaqwQ== +"@typescript-eslint/typescript-estree@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.37.0.tgz#956dcf5c98363bcb97bdd5463a0a86072ff79355" + integrity sha512-JkFoFIt/cx59iqEDSgIGnQpCTRv96MQnXCYvJi7QhBC24uyuzbD8wVbajMB1b9x4I0octYFJ3OwjAwNqk1AjDA== dependencies: - "@typescript-eslint/types" "5.33.0" - "@typescript-eslint/visitor-keys" "5.33.0" + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/visitor-keys" "5.37.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@5.33.0": - version "5.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.0.tgz#fbcbb074e460c11046e067bc3384b5d66b555484" - integrity sha512-/XsqCzD4t+Y9p5wd9HZiptuGKBlaZO5showwqODii5C0nZawxWLF+Q6k5wYHBrQv96h6GYKyqqMHCSTqta8Kiw== +"@typescript-eslint/visitor-keys@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.37.0.tgz#7b72dd343295ea11e89b624995abc7103c554eee" + integrity sha512-Hp7rT4cENBPIzMwrlehLW/28EVCOcE9U1Z1BQTc8EA8v5qpr7GRGuG+U58V5tTY48zvUOA3KHvw3rA8tY9fbdA== dependencies: - "@typescript-eslint/types" "5.33.0" + "@typescript-eslint/types" "5.37.0" eslint-visitor-keys "^3.3.0" acorn-jsx@^5.3.2: From 456b4a609cff1a77573921ead02dded0cf8318fc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 12:24:44 +0000 Subject: [PATCH 04/12] fix(deps): update dependency @nervina-labs/cota-sdk to v0.6.3 --- example/aggregator/package.json | 2 +- example/aggregator/yarn.lock | 8 ++++---- example/mainnet/package.json | 2 +- example/mainnet/yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example/aggregator/package.json b/example/aggregator/package.json index abae485..1d3f512 100644 --- a/example/aggregator/package.json +++ b/example/aggregator/package.json @@ -8,7 +8,7 @@ "build": "tsc" }, "dependencies": { - "@nervina-labs/cota-sdk": "0.6.2", + "@nervina-labs/cota-sdk": "0.6.3", "@types/node": "17.0.21", "ts-node": "10.9.1", "tslib": "2.4.0", diff --git a/example/aggregator/yarn.lock b/example/aggregator/yarn.lock index fec09ed..e1f900d 100644 --- a/example/aggregator/yarn.lock +++ b/example/aggregator/yarn.lock @@ -27,10 +27,10 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@nervina-labs/cota-sdk@0.6.2": - version "0.6.2" - resolved "https://registry.yarnpkg.com/@nervina-labs/cota-sdk/-/cota-sdk-0.6.2.tgz#1e111f51545c9d5037966c10df40c784b2aa88e3" - integrity sha512-87+3TKr8rvDlpAnIMnwHNkyHskgfyuABJJBv/wvwoaXYKGRSodkVSDXkakNzIx2Gg1x0iLYwmX86Xl3d6+UwcQ== +"@nervina-labs/cota-sdk@0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@nervina-labs/cota-sdk/-/cota-sdk-0.6.3.tgz#f8606f6d43f3425a24c536a3dd38a71b66e35457" + integrity sha512-Y1gT5VjfU6UwrL+ByCqZeOvYFnJqG1ezZBWDQpay0SwMk+r4d0qL5oDJZ0DSjTxfFzW5yhtwT8fasmblirF0xQ== dependencies: "@nervosnetwork/ckb-sdk-core" "^0.103.0" "@nervosnetwork/ckb-sdk-utils" "^0.103.0" diff --git a/example/mainnet/package.json b/example/mainnet/package.json index fed3480..7661709 100644 --- a/example/mainnet/package.json +++ b/example/mainnet/package.json @@ -4,6 +4,6 @@ "description": "The examples for mainnet", "license": "MIT", "dependencies": { - "@nervina-labs/cota-sdk": "0.6.2" + "@nervina-labs/cota-sdk": "0.6.3" } } \ No newline at end of file diff --git a/example/mainnet/yarn.lock b/example/mainnet/yarn.lock index 967353d..937d5c3 100644 --- a/example/mainnet/yarn.lock +++ b/example/mainnet/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@nervina-labs/cota-sdk@0.6.2": - version "0.6.2" - resolved "https://registry.yarnpkg.com/@nervina-labs/cota-sdk/-/cota-sdk-0.6.2.tgz#1e111f51545c9d5037966c10df40c784b2aa88e3" - integrity sha512-87+3TKr8rvDlpAnIMnwHNkyHskgfyuABJJBv/wvwoaXYKGRSodkVSDXkakNzIx2Gg1x0iLYwmX86Xl3d6+UwcQ== +"@nervina-labs/cota-sdk@0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@nervina-labs/cota-sdk/-/cota-sdk-0.6.3.tgz#f8606f6d43f3425a24c536a3dd38a71b66e35457" + integrity sha512-Y1gT5VjfU6UwrL+ByCqZeOvYFnJqG1ezZBWDQpay0SwMk+r4d0qL5oDJZ0DSjTxfFzW5yhtwT8fasmblirF0xQ== dependencies: "@nervosnetwork/ckb-sdk-core" "^0.103.0" "@nervosnetwork/ckb-sdk-utils" "^0.103.0" From cec39fb05b9120dfcf644f915ac64d2812d4d6e6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 Sep 2022 19:07:26 +0000 Subject: [PATCH 05/12] chore(deps): update dependency @typescript-eslint/parser to v5.38.0 --- package.json | 2 +- yarn.lock | 58 ++++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index eb61dba..1a3c0c4 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@types/crypto-js": "4.1.1", "@types/node": "17.0.31", - "@typescript-eslint/parser": "5.37.0", + "@typescript-eslint/parser": "5.38.0", "babel-eslint": "10.1.0", "eslint": "8.23.1", "eslint-config-prettier": "8.5.0", diff --git a/yarn.lock b/yarn.lock index 32e5122..dbba626 100644 --- a/yarn.lock +++ b/yarn.lock @@ -274,48 +274,48 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.31.tgz#a5bb84ecfa27eec5e1c802c6bbf8139bdb163a5d" integrity sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q== -"@typescript-eslint/parser@5.37.0": - version "5.37.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.37.0.tgz#c382077973f3a4ede7453fb14cadcad3970cbf3b" - integrity sha512-01VzI/ipYKuaG5PkE5+qyJ6m02fVALmMPY3Qq5BHflDx3y4VobbLdHQkSMg9VPRS4KdNt4oYTMaomFoHonBGAw== - dependencies: - "@typescript-eslint/scope-manager" "5.37.0" - "@typescript-eslint/types" "5.37.0" - "@typescript-eslint/typescript-estree" "5.37.0" +"@typescript-eslint/parser@5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.38.0.tgz#5a59a1ff41a7b43aacd1bb2db54f6bf1c02b2ff8" + integrity sha512-/F63giJGLDr0ms1Cr8utDAxP2SPiglaD6V+pCOcG35P2jCqdfR7uuEhz1GIC3oy4hkUF8xA1XSXmd9hOh/a5EA== + dependencies: + "@typescript-eslint/scope-manager" "5.38.0" + "@typescript-eslint/types" "5.38.0" + "@typescript-eslint/typescript-estree" "5.38.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.37.0": - version "5.37.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.37.0.tgz#044980e4f1516a774a418dafe701a483a6c9f9ca" - integrity sha512-F67MqrmSXGd/eZnujjtkPgBQzgespu/iCZ+54Ok9X5tALb9L2v3G+QBSoWkXG0p3lcTJsL+iXz5eLUEdSiJU9Q== +"@typescript-eslint/scope-manager@5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.38.0.tgz#8f0927024b6b24e28671352c93b393a810ab4553" + integrity sha512-ByhHIuNyKD9giwkkLqzezZ9y5bALW8VNY6xXcP+VxoH4JBDKjU5WNnsiD4HJdglHECdV+lyaxhvQjTUbRboiTA== dependencies: - "@typescript-eslint/types" "5.37.0" - "@typescript-eslint/visitor-keys" "5.37.0" + "@typescript-eslint/types" "5.38.0" + "@typescript-eslint/visitor-keys" "5.38.0" -"@typescript-eslint/types@5.37.0": - version "5.37.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.37.0.tgz#09e4870a5f3af7af3f84e08d792644a87d232261" - integrity sha512-3frIJiTa5+tCb2iqR/bf7XwU20lnU05r/sgPJnRpwvfZaqCJBrl8Q/mw9vr3NrNdB/XtVyMA0eppRMMBqdJ1bA== +"@typescript-eslint/types@5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.38.0.tgz#8cd15825e4874354e31800dcac321d07548b8a5f" + integrity sha512-HHu4yMjJ7i3Cb+8NUuRCdOGu2VMkfmKyIJsOr9PfkBVYLYrtMCK/Ap50Rpov+iKpxDTfnqvDbuPLgBE5FwUNfA== -"@typescript-eslint/typescript-estree@5.37.0": - version "5.37.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.37.0.tgz#956dcf5c98363bcb97bdd5463a0a86072ff79355" - integrity sha512-JkFoFIt/cx59iqEDSgIGnQpCTRv96MQnXCYvJi7QhBC24uyuzbD8wVbajMB1b9x4I0octYFJ3OwjAwNqk1AjDA== +"@typescript-eslint/typescript-estree@5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.0.tgz#89f86b2279815c6fb7f57d68cf9b813f0dc25d98" + integrity sha512-6P0RuphkR+UuV7Avv7MU3hFoWaGcrgOdi8eTe1NwhMp2/GjUJoODBTRWzlHpZh6lFOaPmSvgxGlROa0Sg5Zbyg== dependencies: - "@typescript-eslint/types" "5.37.0" - "@typescript-eslint/visitor-keys" "5.37.0" + "@typescript-eslint/types" "5.38.0" + "@typescript-eslint/visitor-keys" "5.38.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@5.37.0": - version "5.37.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.37.0.tgz#7b72dd343295ea11e89b624995abc7103c554eee" - integrity sha512-Hp7rT4cENBPIzMwrlehLW/28EVCOcE9U1Z1BQTc8EA8v5qpr7GRGuG+U58V5tTY48zvUOA3KHvw3rA8tY9fbdA== +"@typescript-eslint/visitor-keys@5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.0.tgz#60591ca3bf78aa12b25002c0993d067c00887e34" + integrity sha512-MxnrdIyArnTi+XyFLR+kt/uNAcdOnmT+879os7qDRI+EYySR4crXJq9BXPfRzzLGq0wgxkwidrCJ9WCAoacm1w== dependencies: - "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/types" "5.38.0" eslint-visitor-keys "^3.3.0" acorn-jsx@^5.3.2: From 7f72c50a16726c9a1f58c0b57e4528baccab05fd Mon Sep 17 00:00:00 2001 From: duanyytop Date: Tue, 20 Sep 2022 15:22:15 +0800 Subject: [PATCH 06/12] feat: Update cota metadata --- src/service/cota/cota-meta.ts | 69 +++++++++++++++++++++++++++++++++++ src/service/registry/index.ts | 3 +- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 src/service/cota/cota-meta.ts diff --git a/src/service/cota/cota-meta.ts b/src/service/cota/cota-meta.ts new file mode 100644 index 0000000..437bd3c --- /dev/null +++ b/src/service/cota/cota-meta.ts @@ -0,0 +1,69 @@ +import { Service } from '../..' +import { FEE, getCotaTypeScript, getCotaCellDep } from '../../constants' +import { CotaInfo, Hex } from '../../types' +import { append0x, utf8ToHex, toSnakeCase } from '../../utils' + +const generateCotaMetadata = (cotaInfo: CotaInfo, cotaId: Hex): Hex => { + const cotaInfoTemp = { + cotaId, + ...cotaInfo, + } + const cotaMeta = { + id: 'CTMeta', + ver: '1.0', + metadata: { + target: 'output#0', + type: 'cota', + data: { + version: '0', + ...cotaInfoTemp, + }, + }, + } + return append0x(utf8ToHex(JSON.stringify(toSnakeCase(cotaMeta)))) +} + +export const generateCotaMetadataTx = async ( + service: Service, + cotaLock: CKBComponents.Script, + cotaId: Hex, + cotaInfo: CotaInfo, + fee = FEE, + isMainnet = false, +) => { + const cotaType = getCotaTypeScript(isMainnet) + const cotaCells = await service.collector.getCells(cotaLock, cotaType) + if (!cotaCells || cotaCells.length === 0) { + throw new Error("Cota cell doesn't exist") + } + + const cotaCell = cotaCells[0] + const inputs = [ + { + previousOutput: cotaCell.outPoint, + since: '0x0', + }, + ] + + const outputs = [cotaCell.output] + outputs[0].capacity = `0x${(BigInt(outputs[0].capacity) - fee).toString(16)}` + + const cotaOutput = await service.collector.getLiveCell(cotaCell.outPoint) + const outputsData = [cotaOutput.data?.content] + + const cellDeps = [getCotaCellDep(isMainnet)] + + const rawTx: any = { + version: '0x0', + cellDeps, + headerDeps: [], + inputs, + outputs, + outputsData, + witnesses: [], + } + rawTx.witnesses = rawTx.inputs.map((_, i) => + i > 0 ? '0x' : { lock: '', inputType: '', outputType: generateCotaMetadata(cotaInfo, cotaId) }, + ) + return rawTx +} diff --git a/src/service/registry/index.ts b/src/service/registry/index.ts index 9235341..cf78139 100644 --- a/src/service/registry/index.ts +++ b/src/service/registry/index.ts @@ -99,6 +99,7 @@ export const generateRegisterCotaTx = async ( export const generateUpdateCcidsTx = async ( service: Service, + fee = FEE, isMainnet = false, ): Promise => { const registryLock = getAlwaysSuccessLock(isMainnet) @@ -116,7 +117,7 @@ export const generateUpdateCcidsTx = async ( ] let outputs = [registryCell.output] - outputs[0].capacity = `0x${(BigInt(outputs[0].capacity) - FEE).toString(16)}` + outputs[0].capacity = `0x${(BigInt(outputs[0].capacity) - fee).toString(16)}` const { smtRootHash, registrySmtEntry, outputAccountNum } = await service.aggregator.generateUpdateCcidsSmt() const registryCellData = `0x01${smtRootHash}${u64ToBe(BigInt(outputAccountNum))}` From 171aef79d132c240e45c84902a7f31c849c64e45 Mon Sep 17 00:00:00 2001 From: duanyytop Date: Tue, 20 Sep 2022 15:22:57 +0800 Subject: [PATCH 07/12] feat: Add update cota metadata example --- example/update-cota-meta.ts | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 example/update-cota-meta.ts diff --git a/example/update-cota-meta.ts b/example/update-cota-meta.ts new file mode 100644 index 0000000..1933fe9 --- /dev/null +++ b/example/update-cota-meta.ts @@ -0,0 +1,51 @@ +import { addressToScript } from '@nervosnetwork/ckb-sdk-utils' +import { Collector } from '../src/collector' +import { Aggregator } from '../src/aggregator' +import { Service, FEE, CotaInfo } from '../src' +import { generateCotaMetadataTx } from '../src/service/cota/cota-meta' + +const TEST_PRIVATE_KEY = '0xc5bd09c9b954559c70a77d68bde95369e2ce910556ddc20f739080cde3b62ef2' +const TEST_ADDRESS = 'ckt1qyq0scej4vn0uka238m63azcel7cmcme7f2sxj5ska' + +const secp256k1CellDep = (isMainnet: boolean): CKBComponents.CellDep => { + if (isMainnet) { + return { outPoint: { + txHash: "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c", + index: "0x0", + }, depType: 'depGroup' } + } + return { outPoint: { + txHash: "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37", + index: "0x0", + }, depType: 'depGroup' } +} + +const run = async () => { + // True for mainnet and false for testnet + const isMainnet = false + + const service: Service = { + collector: new Collector({ ckbNodeUrl: 'https://testnet.ckb.dev/rpc', ckbIndexerUrl: 'https://testnet.ckb.dev/indexer' }), + aggregator: new Aggregator({ registryUrl: 'http://localhost:3050', cotaUrl: 'http://localhost:3030' }), + } + const ckb = service.collector.getCkb() + const cotaLock = addressToScript(TEST_ADDRESS) + + const cotaInfo: CotaInfo = { + name: 'Update First Step', + description: + 'First step to Blockchain mass adoption. NFT platform launch memento.\n\n-- Nervina Labs & Lay2 Tech, 4/30/2021.', + image: 'https://i.loli.net/2021/04/29/qyJNSE4iHAas7GL.png', + } + const cotaId = '0x36cd7eb40416a61b1f90631b4ddfedd95aea6820' + + let rawTx = await generateCotaMetadataTx(service, cotaLock, cotaId, cotaInfo, FEE, isMainnet) + rawTx.cellDeps.push(secp256k1CellDep(isMainnet)) + + const signedTx = ckb.signTransaction(TEST_PRIVATE_KEY)(rawTx) + console.log(JSON.stringify(signedTx)) + let txHash = await ckb.rpc.sendTransaction(signedTx, 'passthrough') + console.info(`Update cota metadata information tx has been sent with tx hash ${txHash}`) +} + +run() From e7986f27a543be8f0e117d07ea8ae7d22d1104e8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 24 Sep 2022 02:14:55 +0000 Subject: [PATCH 08/12] chore(deps): update dependency eslint to v8.24.0 --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 1a3c0c4..143a20b 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@types/node": "17.0.31", "@typescript-eslint/parser": "5.38.0", "babel-eslint": "10.1.0", - "eslint": "8.23.1", + "eslint": "8.24.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-import": "2.26.0", "eslint-plugin-prettier": "4.2.1", diff --git a/yarn.lock b/yarn.lock index dbba626..fb65eae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -119,10 +119,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@humanwhocodes/config-array@^0.10.4": - version "0.10.4" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.4.tgz#01e7366e57d2ad104feea63e72248f22015c520c" - integrity sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw== +"@humanwhocodes/config-array@^0.10.5": + version "0.10.5" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.5.tgz#bb679745224745fff1e9a41961c1d45a49f81c04" + integrity sha512-XVVDtp+dVvRxMoxSiSfasYaG02VEe1qH5cKgMQJWhol6HwzbcqoCMJi8dAGoYAO57jhUyhI6cWuRiTcRaDaYug== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" @@ -780,13 +780,13 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@8.23.1: - version "8.23.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.1.tgz#cfd7b3f7fdd07db8d16b4ac0516a29c8d8dca5dc" - integrity sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg== +eslint@8.24.0: + version "8.24.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.24.0.tgz#489516c927a5da11b3979dbfb2679394523383c8" + integrity sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ== dependencies: "@eslint/eslintrc" "^1.3.2" - "@humanwhocodes/config-array" "^0.10.4" + "@humanwhocodes/config-array" "^0.10.5" "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" "@humanwhocodes/module-importer" "^1.0.1" ajv "^6.10.0" From 4e2040746f52eeab0f59e7820fa939a834081806 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 17:56:17 +0000 Subject: [PATCH 09/12] chore(deps): update dependency @typescript-eslint/parser to v5.38.1 --- package.json | 2 +- yarn.lock | 58 ++++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 1a3c0c4..2714660 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@types/crypto-js": "4.1.1", "@types/node": "17.0.31", - "@typescript-eslint/parser": "5.38.0", + "@typescript-eslint/parser": "5.38.1", "babel-eslint": "10.1.0", "eslint": "8.23.1", "eslint-config-prettier": "8.5.0", diff --git a/yarn.lock b/yarn.lock index dbba626..98188a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -274,48 +274,48 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.31.tgz#a5bb84ecfa27eec5e1c802c6bbf8139bdb163a5d" integrity sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q== -"@typescript-eslint/parser@5.38.0": - version "5.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.38.0.tgz#5a59a1ff41a7b43aacd1bb2db54f6bf1c02b2ff8" - integrity sha512-/F63giJGLDr0ms1Cr8utDAxP2SPiglaD6V+pCOcG35P2jCqdfR7uuEhz1GIC3oy4hkUF8xA1XSXmd9hOh/a5EA== - dependencies: - "@typescript-eslint/scope-manager" "5.38.0" - "@typescript-eslint/types" "5.38.0" - "@typescript-eslint/typescript-estree" "5.38.0" +"@typescript-eslint/parser@5.38.1": + version "5.38.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.38.1.tgz#c577f429f2c32071b92dff4af4f5fbbbd2414bd0" + integrity sha512-LDqxZBVFFQnQRz9rUZJhLmox+Ep5kdUmLatLQnCRR6523YV+XhRjfYzStQ4MheFA8kMAfUlclHSbu+RKdRwQKw== + dependencies: + "@typescript-eslint/scope-manager" "5.38.1" + "@typescript-eslint/types" "5.38.1" + "@typescript-eslint/typescript-estree" "5.38.1" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.38.0": - version "5.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.38.0.tgz#8f0927024b6b24e28671352c93b393a810ab4553" - integrity sha512-ByhHIuNyKD9giwkkLqzezZ9y5bALW8VNY6xXcP+VxoH4JBDKjU5WNnsiD4HJdglHECdV+lyaxhvQjTUbRboiTA== +"@typescript-eslint/scope-manager@5.38.1": + version "5.38.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.38.1.tgz#f87b289ef8819b47189351814ad183e8801d5764" + integrity sha512-BfRDq5RidVU3RbqApKmS7RFMtkyWMM50qWnDAkKgQiezRtLKsoyRKIvz1Ok5ilRWeD9IuHvaidaLxvGx/2eqTQ== dependencies: - "@typescript-eslint/types" "5.38.0" - "@typescript-eslint/visitor-keys" "5.38.0" + "@typescript-eslint/types" "5.38.1" + "@typescript-eslint/visitor-keys" "5.38.1" -"@typescript-eslint/types@5.38.0": - version "5.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.38.0.tgz#8cd15825e4874354e31800dcac321d07548b8a5f" - integrity sha512-HHu4yMjJ7i3Cb+8NUuRCdOGu2VMkfmKyIJsOr9PfkBVYLYrtMCK/Ap50Rpov+iKpxDTfnqvDbuPLgBE5FwUNfA== +"@typescript-eslint/types@5.38.1": + version "5.38.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.38.1.tgz#74f9d6dcb8dc7c58c51e9fbc6653ded39e2e225c" + integrity sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg== -"@typescript-eslint/typescript-estree@5.38.0": - version "5.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.0.tgz#89f86b2279815c6fb7f57d68cf9b813f0dc25d98" - integrity sha512-6P0RuphkR+UuV7Avv7MU3hFoWaGcrgOdi8eTe1NwhMp2/GjUJoODBTRWzlHpZh6lFOaPmSvgxGlROa0Sg5Zbyg== +"@typescript-eslint/typescript-estree@5.38.1": + version "5.38.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.1.tgz#657d858d5d6087f96b638ee383ee1cff52605a1e" + integrity sha512-99b5e/Enoe8fKMLdSuwrfH/C0EIbpUWmeEKHmQlGZb8msY33qn1KlkFww0z26o5Omx7EVjzVDCWEfrfCDHfE7g== dependencies: - "@typescript-eslint/types" "5.38.0" - "@typescript-eslint/visitor-keys" "5.38.0" + "@typescript-eslint/types" "5.38.1" + "@typescript-eslint/visitor-keys" "5.38.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@5.38.0": - version "5.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.0.tgz#60591ca3bf78aa12b25002c0993d067c00887e34" - integrity sha512-MxnrdIyArnTi+XyFLR+kt/uNAcdOnmT+879os7qDRI+EYySR4crXJq9BXPfRzzLGq0wgxkwidrCJ9WCAoacm1w== +"@typescript-eslint/visitor-keys@5.38.1": + version "5.38.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.1.tgz#508071bfc6b96d194c0afe6a65ad47029059edbc" + integrity sha512-bSHr1rRxXt54+j2n4k54p4fj8AHJ49VDWtjpImOpzQj4qjAiOpPni+V1Tyajh19Api1i844F757cur8wH3YvOA== dependencies: - "@typescript-eslint/types" "5.38.0" + "@typescript-eslint/types" "5.38.1" eslint-visitor-keys "^3.3.0" acorn-jsx@^5.3.2: From 26b62e1283d09b4f5fcd4de7d895091c56f96908 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Sep 2022 16:13:32 +0000 Subject: [PATCH 10/12] chore(deps): update actions/setup-node action to v3.5.0 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 44c5032..dbbd5dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3.4.1 + - uses: actions/setup-node@v3.5.0 with: node-version: '14' - name: Install dependency From b405f74b58b78e2d8fcfa647b46e0a14ec3f2438 Mon Sep 17 00:00:00 2001 From: duanyytop Date: Thu, 29 Sep 2022 09:38:15 +0800 Subject: [PATCH 11/12] fix: Update registry fee --- src/service/registry/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/service/registry/index.ts b/src/service/registry/index.ts index cf78139..1cf45cc 100644 --- a/src/service/registry/index.ts +++ b/src/service/registry/index.ts @@ -16,6 +16,7 @@ const generateCotaOutputs = async ( inputCapacity: bigint, cotaLocks: CKBComponents.Script[], changeLock: CKBComponents.Script, + fee: bigint, isMainnet: boolean, ): Promise => { let outputs: CKBComponents.CellOutput[] = cotaLocks.map(lock => { @@ -29,7 +30,7 @@ const generateCotaOutputs = async ( }) const cotaCellsLength = BigInt(cotaLocks.length) - const changeCapacity = inputCapacity - FEE - COTA_CELL_CAPACITY * cotaCellsLength + const changeCapacity = inputCapacity - fee - COTA_CELL_CAPACITY * cotaCellsLength outputs.push({ capacity: `0x${changeCapacity.toString(16)}`, lock: changeLock, @@ -68,10 +69,10 @@ export const generateRegisterCotaTx = async ( ] inputs = inputs.concat(normalInputs) - let outputs = await generateCotaOutputs(capacity, cotaLocks, lock, isMainnet) + let outputs = await generateCotaOutputs(capacity, cotaLocks, lock, fee, isMainnet) outputs = [registryCell.output].concat(outputs) const length = outputs.length - outputs[length - 1].capacity = `0x${(BigInt(outputs[length - 1].capacity) - FEE).toString(16)}` + outputs[length - 1].capacity = `0x${(BigInt(outputs[length - 1].capacity) - fee).toString(16)}` const lockHashes = cotaLocks.map(lock => scriptToHash(lock)) const { smtRootHash, registrySmtEntry, outputAccountNum } = await service.aggregator.generateRegisterCotaSmt(lockHashes) From 3aec81ff82b89fa2d6a0e9e4161fbdefa087fe29 Mon Sep 17 00:00:00 2001 From: duanyytop Date: Thu, 29 Sep 2022 09:50:14 +0800 Subject: [PATCH 12/12] chore: Bump to version v0.6.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index be1b5f2..744f132 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nervina-labs/cota-sdk", - "version": "0.6.3", + "version": "0.6.5", "description": "The SDK of CoTA", "repository": "git@github.com:nervina-labs/cota-sdk-js.git", "author": "duanyytop ",