From 2626de3db3f0570cd7a74b8f7c2f3bed00454ef1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:40:08 +0100 Subject: [PATCH 01/52] build(deps): bump serde_json from 1.0.132 to 1.0.133 (#7497) Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.132 to 1.0.133. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.132...v1.0.133) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 4 ++-- libraries/pod/Cargo.toml | 2 +- single-pool/cli/Cargo.toml | 2 +- stake-pool/cli/Cargo.toml | 2 +- token-metadata/interface/Cargo.toml | 2 +- token/cli/Cargo.toml | 2 +- token/program-2022/Cargo.toml | 2 +- token/transfer-hook/cli/Cargo.toml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d77c74ad233..835a5ccd58f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4885,9 +4885,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", diff --git a/libraries/pod/Cargo.toml b/libraries/pod/Cargo.toml index e16672d190c..8c342aa83c9 100644 --- a/libraries/pod/Cargo.toml +++ b/libraries/pod/Cargo.toml @@ -27,7 +27,7 @@ solana-zk-sdk = "2.1.0" thiserror = "2.0" [dev-dependencies] -serde_json = "1.0.132" +serde_json = "1.0.133" base64 = { version = "0.22.1" } [lib] diff --git a/single-pool/cli/Cargo.toml b/single-pool/cli/Cargo.toml index e5efef252fa..8930301580d 100644 --- a/single-pool/cli/Cargo.toml +++ b/single-pool/cli/Cargo.toml @@ -15,7 +15,7 @@ borsh = "1.5.3" bincode = "1.3.1" serde = "1.0.215" serde_derive = "1.0.103" -serde_json = "1.0.132" +serde_json = "1.0.133" serde_with = "3.11.0" solana-account-decoder = "2.1.0" solana-clap-v3-utils = "2.1.0" diff --git a/stake-pool/cli/Cargo.toml b/stake-pool/cli/Cargo.toml index 795c5a74440..b6778822bec 100644 --- a/stake-pool/cli/Cargo.toml +++ b/stake-pool/cli/Cargo.toml @@ -13,7 +13,7 @@ borsh = "1.5.3" clap = "2.33.3" serde = "1.0.215" serde_derive = "1.0.130" -serde_json = "1.0.132" +serde_json = "1.0.133" solana-account-decoder = "2.1.0" solana-clap-utils = "2.1.0" solana-cli-config = "2.1.0" diff --git a/token-metadata/interface/Cargo.toml b/token-metadata/interface/Cargo.toml index 712cfb6eeec..53de81c9454 100644 --- a/token-metadata/interface/Cargo.toml +++ b/token-metadata/interface/Cargo.toml @@ -29,7 +29,7 @@ spl-pod = { version = "0.5.0", path = "../../libraries/pod", features = [ thiserror = "2.0" [dev-dependencies] -serde_json = "1.0.132" +serde_json = "1.0.133" solana-sha256-hasher = "2.1.0" [lib] diff --git a/token/cli/Cargo.toml b/token/cli/Cargo.toml index 6ca0ed9d28e..1893630d004 100644 --- a/token/cli/Cargo.toml +++ b/token/cli/Cargo.toml @@ -18,7 +18,7 @@ console = "0.15.8" futures = "0.3" serde = "1.0.215" serde_derive = "1.0.103" -serde_json = "1.0.132" +serde_json = "1.0.133" solana-account-decoder = "2.1.0" solana-clap-v3-utils = "2.1.0" solana-cli-config = "2.1.0" diff --git a/token/program-2022/Cargo.toml b/token/program-2022/Cargo.toml index a7b72929c93..a9df54c3a80 100644 --- a/token/program-2022/Cargo.toml +++ b/token/program-2022/Cargo.toml @@ -50,7 +50,7 @@ serial_test = "3.2.0" solana-program-test = "2.1.0" solana-sdk = "2.1.0" spl-tlv-account-resolution = { version = "0.9.0", path = "../../libraries/tlv-account-resolution" } -serde_json = "1.0.132" +serde_json = "1.0.133" [lib] crate-type = ["cdylib", "lib"] diff --git a/token/transfer-hook/cli/Cargo.toml b/token/transfer-hook/cli/Cargo.toml index 207452d3281..4ae36cd8b73 100644 --- a/token/transfer-hook/cli/Cargo.toml +++ b/token/transfer-hook/cli/Cargo.toml @@ -23,7 +23,7 @@ strum = "0.26" strum_macros = "0.26" tokio = { version = "1", features = ["full"] } serde = { version = "1.0.215", features = ["derive"] } -serde_json = "1.0.132" +serde_json = "1.0.133" serde_yaml = "0.9.34" [dev-dependencies] From f1b0e370791c20b459f70562405af1260df0c8c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:50:20 +0100 Subject: [PATCH 02/52] build(deps): bump cross-spawn from 7.0.3 to 7.0.5 in /docs (#7498) Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.5. - [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md) - [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.5) --- updated-dependencies: - dependency-name: cross-spawn dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index af4228c2b67..f39155d4c43 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -6688,9 +6688,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -24169,9 +24169,9 @@ } }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", From 5e86285451c52debd5d0c66251d2028d0037ca47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:50:28 +0100 Subject: [PATCH 03/52] build(deps-dev): bump rollup from 4.27.0 to 4.27.2 (#7499) Bumps [rollup](https://github.com/rollup/rollup) from 4.27.0 to 4.27.2. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.27.0...v4.27.2) --- updated-dependencies: - dependency-name: rollup dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 192 +++++++++++++++++----------------- stake-pool/js/package.json | 2 +- token-lending/js/package.json | 2 +- 3 files changed, 98 insertions(+), 98 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ebb146e17a3..0b581eb6dd3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -395,25 +395,25 @@ importers: devDependencies: '@rollup/plugin-alias': specifier: ^5.1.1 - version: 5.1.1(rollup@4.27.0) + version: 5.1.1(rollup@4.27.2) '@rollup/plugin-commonjs': specifier: ^28.0.1 - version: 28.0.1(rollup@4.27.0) + version: 28.0.1(rollup@4.27.2) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.27.0) + version: 6.1.0(rollup@4.27.2) '@rollup/plugin-multi-entry': specifier: ^6.0.0 - version: 6.0.1(rollup@4.27.0) + version: 6.0.1(rollup@4.27.2) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.27.0) + version: 15.3.0(rollup@4.27.2) '@rollup/plugin-terser': specifier: ^0.4.4 - version: 0.4.4(rollup@4.27.0) + version: 0.4.4(rollup@4.27.2) '@rollup/plugin-typescript': specifier: ^12.1.1 - version: 12.1.1(rollup@4.27.0)(tslib@2.8.1)(typescript@5.6.3) + version: 12.1.1(rollup@4.27.2)(tslib@2.8.1)(typescript@5.6.3) '@types/bn.js': specifier: ^5.1.6 version: 5.1.6 @@ -445,11 +445,11 @@ importers: specifier: ^6.0.1 version: 6.0.1 rollup: - specifier: ^4.27.0 - version: 4.27.0 + specifier: ^4.27.2 + version: 4.27.2 rollup-plugin-dts: specifier: ^6.1.1 - version: 6.1.1(rollup@4.27.0)(typescript@5.6.3) + version: 6.1.1(rollup@4.27.2)(typescript@5.6.3) ts-jest: specifier: ^29.2.5 version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.6.3) @@ -532,13 +532,13 @@ importers: devDependencies: '@rollup/plugin-commonjs': specifier: ^28.0.1 - version: 28.0.1(rollup@4.27.0) + version: 28.0.1(rollup@4.27.2) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.27.0) + version: 15.3.0(rollup@4.27.2) '@rollup/plugin-typescript': specifier: ^12.1.1 - version: 12.1.1(rollup@4.27.0)(tslib@2.8.1)(typescript@5.6.3) + version: 12.1.1(rollup@4.27.2)(tslib@2.8.1)(typescript@5.6.3) '@solana/spl-token': specifier: 0.4.9 version: link:../../token/js @@ -564,8 +564,8 @@ importers: specifier: ^6.2.0 version: 6.2.0 rollup: - specifier: ^4.27.0 - version: 4.27.0 + specifier: ^4.27.2 + version: 4.27.2 ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@22.9.0)(typescript@5.6.3) @@ -2179,7 +2179,7 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dev: true - /@rollup/plugin-alias@5.1.1(rollup@4.27.0): + /@rollup/plugin-alias@5.1.1(rollup@4.27.2): resolution: {integrity: sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2188,10 +2188,10 @@ packages: rollup: optional: true dependencies: - rollup: 4.27.0 + rollup: 4.27.2 dev: true - /@rollup/plugin-commonjs@28.0.1(rollup@4.27.0): + /@rollup/plugin-commonjs@28.0.1(rollup@4.27.2): resolution: {integrity: sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==} engines: {node: '>=16.0.0 || 14 >= 14.17'} peerDependencies: @@ -2200,17 +2200,17 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.0) + '@rollup/pluginutils': 5.1.0(rollup@4.27.2) commondir: 1.0.1 estree-walker: 2.0.2 fdir: 6.3.0(picomatch@4.0.2) is-reference: 1.2.1 magic-string: 0.30.10 picomatch: 4.0.2 - rollup: 4.27.0 + rollup: 4.27.2 dev: true - /@rollup/plugin-json@6.1.0(rollup@4.27.0): + /@rollup/plugin-json@6.1.0(rollup@4.27.2): resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2219,11 +2219,11 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.0) - rollup: 4.27.0 + '@rollup/pluginutils': 5.1.0(rollup@4.27.2) + rollup: 4.27.2 dev: true - /@rollup/plugin-multi-entry@6.0.1(rollup@4.27.0): + /@rollup/plugin-multi-entry@6.0.1(rollup@4.27.2): resolution: {integrity: sha512-AXm6toPyTSfbYZWghQGbom1Uh7dHXlrGa+HoiYNhQtDUE3Q7LqoUYdVQx9E1579QWS1uOiu+cZRSE4okO7ySgw==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2232,12 +2232,12 @@ packages: rollup: optional: true dependencies: - '@rollup/plugin-virtual': 3.0.2(rollup@4.27.0) + '@rollup/plugin-virtual': 3.0.2(rollup@4.27.2) matched: 5.0.1 - rollup: 4.27.0 + rollup: 4.27.2 dev: true - /@rollup/plugin-node-resolve@15.3.0(rollup@4.27.0): + /@rollup/plugin-node-resolve@15.3.0(rollup@4.27.2): resolution: {integrity: sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2246,15 +2246,15 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.0) + '@rollup/pluginutils': 5.1.0(rollup@4.27.2) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-module: 1.0.0 resolve: 1.22.8 - rollup: 4.27.0 + rollup: 4.27.2 dev: true - /@rollup/plugin-terser@0.4.4(rollup@4.27.0): + /@rollup/plugin-terser@0.4.4(rollup@4.27.2): resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2263,13 +2263,13 @@ packages: rollup: optional: true dependencies: - rollup: 4.27.0 + rollup: 4.27.2 serialize-javascript: 6.0.1 smob: 1.4.1 terser: 5.24.0 dev: true - /@rollup/plugin-typescript@12.1.1(rollup@4.27.0)(tslib@2.8.1)(typescript@5.6.3): + /@rollup/plugin-typescript@12.1.1(rollup@4.27.2)(tslib@2.8.1)(typescript@5.6.3): resolution: {integrity: sha512-t7O653DpfB5MbFrqPe/VcKFFkvRuFNp9qId3xq4Eth5xlyymzxNpye2z8Hrl0RIMuXTSr5GGcFpkdlMeacUiFQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2282,14 +2282,14 @@ packages: tslib: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.0) + '@rollup/pluginutils': 5.1.0(rollup@4.27.2) resolve: 1.22.8 - rollup: 4.27.0 + rollup: 4.27.2 tslib: 2.8.1 typescript: 5.6.3 dev: true - /@rollup/plugin-virtual@3.0.2(rollup@4.27.0): + /@rollup/plugin-virtual@3.0.2(rollup@4.27.2): resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2298,7 +2298,7 @@ packages: rollup: optional: true dependencies: - rollup: 4.27.0 + rollup: 4.27.2 dev: true /@rollup/pluginutils@4.2.1: @@ -2309,7 +2309,7 @@ packages: picomatch: 2.3.1 dev: true - /@rollup/pluginutils@5.1.0(rollup@4.27.0): + /@rollup/pluginutils@5.1.0(rollup@4.27.2): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2321,147 +2321,147 @@ packages: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 4.27.0 + rollup: 4.27.2 dev: true - /@rollup/rollup-android-arm-eabi@4.27.0: - resolution: {integrity: sha512-e312hTjuM89YLqlcqEs7mSvwhxN5pgXqRobUob7Jsz1wDQlpAb2WTX4jzvrx5NrL1h2SE4fGdHSNyPxbLfzyeA==} + /@rollup/rollup-android-arm-eabi@4.27.2: + resolution: {integrity: sha512-Tj+j7Pyzd15wAdSJswvs5CJzJNV+qqSUcr/aCD+jpQSBtXvGnV0pnrjoc8zFTe9fcKCatkpFpOO7yAzpO998HA==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.27.0: - resolution: {integrity: sha512-cBUOny8GNXP++gN00Bo5L04I2oqUEFAU0OSDb+4hqp4/R/pZL/zlGzp7lJkhtPX52Rj+PIe0S8aOqhK4hztxHQ==} + /@rollup/rollup-android-arm64@4.27.2: + resolution: {integrity: sha512-xsPeJgh2ThBpUqlLgRfiVYBEf/P1nWlWvReG+aBWfNv3XEBpa6ZCmxSVnxJgLgkNz4IbxpLy64h2gCmAAQLneQ==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.27.0: - resolution: {integrity: sha512-aauK2M2ptFQQYdOqbKGYCg1LHlPbm6IxepSnHLLaMIGcd9YBiKRGl2+KtzQL/IkurP+b54EKBkvtZaWXijmzfQ==} + /@rollup/rollup-darwin-arm64@4.27.2: + resolution: {integrity: sha512-KnXU4m9MywuZFedL35Z3PuwiTSn/yqRIhrEA9j+7OSkji39NzVkgxuxTYg5F8ryGysq4iFADaU5osSizMXhU2A==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.27.0: - resolution: {integrity: sha512-VAjOnHUwpvxf3XT33sMpsLGKq24Rz1sTQhLuUicYrV9pxB4TNi0w11qAGPOyR+dQu/iZf88DmEmG0+2Gaqa1gg==} + /@rollup/rollup-darwin-x64@4.27.2: + resolution: {integrity: sha512-Hj77A3yTvUeCIx/Vi+4d4IbYhyTwtHj07lVzUgpUq9YpJSEiGJj4vXMKwzJ3w5zp5v3PFvpJNgc/J31smZey6g==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-freebsd-arm64@4.27.0: - resolution: {integrity: sha512-I2eRlZG87gl6WxP6PvSB5bfFA1btE7tWnG6QAoEU/0Gr47f6KaxRwiRfBujHlzkuMPqtpTlSOW4aOEOyMtQqfg==} + /@rollup/rollup-freebsd-arm64@4.27.2: + resolution: {integrity: sha512-RjgKf5C3xbn8gxvCm5VgKZ4nn0pRAIe90J0/fdHUsgztd3+Zesb2lm2+r6uX4prV2eUByuxJNdt647/1KPRq5g==} cpu: [arm64] os: [freebsd] requiresBuild: true dev: true optional: true - /@rollup/rollup-freebsd-x64@4.27.0: - resolution: {integrity: sha512-G05JNYFdjikD/2hJTf1gHdD5KjI2TotjiDn17amHtB5JgwrRF1EA9hJ3TRGIvT3zGXilNWWlR71R/2TT1pXRDg==} + /@rollup/rollup-freebsd-x64@4.27.2: + resolution: {integrity: sha512-duq21FoXwQtuws+V9H6UZ+eCBc7fxSpMK1GQINKn3fAyd9DFYKPJNcUhdIKOrMFjLEJgQskoMoiuizMt+dl20g==} cpu: [x64] os: [freebsd] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.27.0: - resolution: {integrity: sha512-FMXxMZ7qnMULwgdmGSFVlOduAhFyqDPoK1A2Q8HBkzGYX9SMFU3ITKfLdIiCzTaaj/pt1OiEbpF2szUw6Kh++Q==} + /@rollup/rollup-linux-arm-gnueabihf@4.27.2: + resolution: {integrity: sha512-6npqOKEPRZkLrMcvyC/32OzJ2srdPzCylJjiTJT2c0bwwSGm7nz2F9mNQ1WrAqCBZROcQn91Fno+khFhVijmFA==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-musleabihf@4.27.0: - resolution: {integrity: sha512-0315TiPsJfOY+jAwEeqxcy9yVcAy/jg99GrMcd/L7CRESzi1vhyLPbnkDnz7giaEttSRf/d3llJYfoC+44Nl3A==} + /@rollup/rollup-linux-arm-musleabihf@4.27.2: + resolution: {integrity: sha512-V9Xg6eXtgBtHq2jnuQwM/jr2mwe2EycnopO8cbOvpzFuySCGtKlPCI3Hj9xup/pJK5Q0388qfZZy2DqV2J8ftw==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.27.0: - resolution: {integrity: sha512-4zCKY5E9djPyHzvoCWIouFsuAvg+dk+rNia8lz1bjKpzKz02QvK4JPHyjcDT8CFR2J/aA98WccCirdDOy+VDWQ==} + /@rollup/rollup-linux-arm64-gnu@4.27.2: + resolution: {integrity: sha512-uCFX9gtZJoQl2xDTpRdseYuNqyKkuMDtH6zSrBTA28yTfKyjN9hQ2B04N5ynR8ILCoSDOrG/Eg+J2TtJ1e/CSA==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.27.0: - resolution: {integrity: sha512-6St9rrPSLbYBbbJAClpU4gmnO7cdZCMMzx2MT0UCIIIevoLAmsCDOAG6t3J/RgN4CPUpdaGr/UnPqQTHZ4oDwA==} + /@rollup/rollup-linux-arm64-musl@4.27.2: + resolution: {integrity: sha512-/PU9P+7Rkz8JFYDHIi+xzHabOu9qEWR07L5nWLIUsvserrxegZExKCi2jhMZRd0ATdboKylu/K5yAXbp7fYFvA==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.27.0: - resolution: {integrity: sha512-dIBfp8NDrgvwUJxyqFv7501coIba+7xxBJy1gQEF0RGkIKa3Tq0Mh3sF9hmstDLtaMt7gL2aXsCNG9SCKyVVZg==} + /@rollup/rollup-linux-powerpc64le-gnu@4.27.2: + resolution: {integrity: sha512-eCHmol/dT5odMYi/N0R0HC8V8QE40rEpkyje/ZAXJYNNoSfrObOvG/Mn+s1F/FJyB7co7UQZZf6FuWnN6a7f4g==} cpu: [ppc64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.27.0: - resolution: {integrity: sha512-Pu7xLHRy+5UjFCKR/vWsbFmiBYUC9993v99YoKWhAgK4VsdNuWHPs17NuCJEtVsZpYCNVPbRyBpQw58Ma8BmeA==} + /@rollup/rollup-linux-riscv64-gnu@4.27.2: + resolution: {integrity: sha512-DEP3Njr9/ADDln3kNi76PXonLMSSMiCir0VHXxmGSHxCxDfQ70oWjHcJGfiBugzaqmYdTC7Y+8Int6qbnxPBIQ==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-s390x-gnu@4.27.0: - resolution: {integrity: sha512-2Q9qQnk/eWdvXzzHl22y7tpDHREppFUh7N6cCs70HZEbQSgB7wd/2S/B05SSiyAiIn5BL+fYiASLds5bz0IQFw==} + /@rollup/rollup-linux-s390x-gnu@4.27.2: + resolution: {integrity: sha512-NHGo5i6IE/PtEPh5m0yw5OmPMpesFnzMIS/lzvN5vknnC1sXM5Z/id5VgcNPgpD+wHmIcuYYgW+Q53v+9s96lQ==} cpu: [s390x] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.27.0: - resolution: {integrity: sha512-CNnqMZ4Yz0Ga0A75qux7DNChq0P9oAWn2S7yjZPRC+AaEF8Ysw5K/1lzT25/a3reJ4V2abcShIVG+tfZHb1UrQ==} + /@rollup/rollup-linux-x64-gnu@4.27.2: + resolution: {integrity: sha512-PaW2DY5Tan+IFvNJGHDmUrORadbe/Ceh8tQxi8cmdQVCCYsLoQo2cuaSj+AU+YRX8M4ivS2vJ9UGaxfuNN7gmg==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.27.0: - resolution: {integrity: sha512-dS1+eCbbao54XB+wLW6uuwRkChq4L0UfKhd3wvt6s+EN1rTIi24ee5Lk3HfRGq9J2jsRm12/AGKLA0kd82Sp/g==} + /@rollup/rollup-linux-x64-musl@4.27.2: + resolution: {integrity: sha512-dOlWEMg2gI91Qx5I/HYqOD6iqlJspxLcS4Zlg3vjk1srE67z5T2Uz91yg/qA8sY0XcwQrFzWWiZhMNERylLrpQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.27.0: - resolution: {integrity: sha512-VrYQHY5+Y71OU/uOSRE9lLhph16bbuWGrMwGwZDPxCUXUW5NgLA+K+q0kv7rafHRlnrsZSVcMOkZskzTNnR3ZQ==} + /@rollup/rollup-win32-arm64-msvc@4.27.2: + resolution: {integrity: sha512-euMIv/4x5Y2/ImlbGl88mwKNXDsvzbWUlT7DFky76z2keajCtcbAsN9LUdmk31hAoVmJJYSThgdA0EsPeTr1+w==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.27.0: - resolution: {integrity: sha512-LCqk4Xi3e4GzLqaq+QDM7gP5DtJ/RgWMzV3U2brwp/vEz9RTA5YBgIDP69xYfrTXexes6xPsOIquy79+kLifiA==} + /@rollup/rollup-win32-ia32-msvc@4.27.2: + resolution: {integrity: sha512-RsnE6LQkUHlkC10RKngtHNLxb7scFykEbEwOFDjr3CeCMG+Rr+cKqlkKc2/wJ1u4u990urRHCbjz31x84PBrSQ==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.27.0: - resolution: {integrity: sha512-dj2ZolfViR3chLWwSHID2mBzLLwYvXFldIplR6BSkdACXqAsrcmItKTff4h7enYB3Ugoh0v41WbxijE9HJb1Hw==} + /@rollup/rollup-win32-x64-msvc@4.27.2: + resolution: {integrity: sha512-foJM5vv+z2KQmn7emYdDLyTbkoO5bkHZE1oth2tWbQNGW7mX32d46Hz6T0MqXdWS2vBZhaEtHqdy9WYwGfiliA==} cpu: [x64] os: [win32] requiresBuild: true @@ -8401,7 +8401,7 @@ packages: package-json-from-dist: 1.0.0 dev: true - /rollup-plugin-dts@6.1.1(rollup@4.27.0)(typescript@5.6.3): + /rollup-plugin-dts@6.1.1(rollup@4.27.2)(typescript@5.6.3): resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} engines: {node: '>=16'} peerDependencies: @@ -8409,37 +8409,37 @@ packages: typescript: ^4.5 || ^5.0 dependencies: magic-string: 0.30.10 - rollup: 4.27.0 + rollup: 4.27.2 typescript: 5.6.3 optionalDependencies: '@babel/code-frame': 7.26.2 dev: true - /rollup@4.27.0: - resolution: {integrity: sha512-nrOD/RrnAMssruS7bPa7MYpEuH6tUpOa43NLtxQiLKem0An8HZyXun5Ndig6JzbkJoIbaKkt85V67VCaQ59GyA==} + /rollup@4.27.2: + resolution: {integrity: sha512-KreA+PzWmk2yaFmZVwe6GB2uBD86nXl86OsDkt1bJS9p3vqWuEQ6HnJJ+j/mZi/q0920P99/MVRlB4L3crpF5w==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.27.0 - '@rollup/rollup-android-arm64': 4.27.0 - '@rollup/rollup-darwin-arm64': 4.27.0 - '@rollup/rollup-darwin-x64': 4.27.0 - '@rollup/rollup-freebsd-arm64': 4.27.0 - '@rollup/rollup-freebsd-x64': 4.27.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.27.0 - '@rollup/rollup-linux-arm-musleabihf': 4.27.0 - '@rollup/rollup-linux-arm64-gnu': 4.27.0 - '@rollup/rollup-linux-arm64-musl': 4.27.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.27.0 - '@rollup/rollup-linux-riscv64-gnu': 4.27.0 - '@rollup/rollup-linux-s390x-gnu': 4.27.0 - '@rollup/rollup-linux-x64-gnu': 4.27.0 - '@rollup/rollup-linux-x64-musl': 4.27.0 - '@rollup/rollup-win32-arm64-msvc': 4.27.0 - '@rollup/rollup-win32-ia32-msvc': 4.27.0 - '@rollup/rollup-win32-x64-msvc': 4.27.0 + '@rollup/rollup-android-arm-eabi': 4.27.2 + '@rollup/rollup-android-arm64': 4.27.2 + '@rollup/rollup-darwin-arm64': 4.27.2 + '@rollup/rollup-darwin-x64': 4.27.2 + '@rollup/rollup-freebsd-arm64': 4.27.2 + '@rollup/rollup-freebsd-x64': 4.27.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.27.2 + '@rollup/rollup-linux-arm-musleabihf': 4.27.2 + '@rollup/rollup-linux-arm64-gnu': 4.27.2 + '@rollup/rollup-linux-arm64-musl': 4.27.2 + '@rollup/rollup-linux-powerpc64le-gnu': 4.27.2 + '@rollup/rollup-linux-riscv64-gnu': 4.27.2 + '@rollup/rollup-linux-s390x-gnu': 4.27.2 + '@rollup/rollup-linux-x64-gnu': 4.27.2 + '@rollup/rollup-linux-x64-musl': 4.27.2 + '@rollup/rollup-win32-arm64-msvc': 4.27.2 + '@rollup/rollup-win32-ia32-msvc': 4.27.2 + '@rollup/rollup-win32-x64-msvc': 4.27.2 fsevents: 2.3.3 dev: true diff --git a/stake-pool/js/package.json b/stake-pool/js/package.json index a55ebcb947b..8f8581e21b7 100644 --- a/stake-pool/js/package.json +++ b/stake-pool/js/package.json @@ -69,7 +69,7 @@ "eslint": "^8.57.0", "jest": "^29.0.0", "rimraf": "^6.0.1", - "rollup": "^4.27.0", + "rollup": "^4.27.2", "rollup-plugin-dts": "^6.1.1", "ts-jest": "^29.2.5", "typescript": "^5.6.3" diff --git a/token-lending/js/package.json b/token-lending/js/package.json index 132c5a6705a..399c3c231e0 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -52,7 +52,7 @@ "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", "gh-pages": "^6.2.0", - "rollup": "^4.27.0", + "rollup": "^4.27.2", "ts-node": "^10.9.2", "tslib": "^2.8.1", "typedoc": "^0.26.11", From 2479c1ee073bc3b5069b5be362b26f751a01311f Mon Sep 17 00:00:00 2001 From: Jon C Date: Mon, 18 Nov 2024 23:23:54 +0100 Subject: [PATCH 04/52] token: Fix typos for cargo-spellcheck (#7503) * token: Fix typos #### Problem There are typos in the token code, and people sometimes fix them, but mostly don't. #### Summary of changes Starting with the `token/*` directory, fix all typos or properly put them between backticks if they're code. These were all found using `cargo spellcheck` and a specialized dictionary with programming / Solana / ZK terminology. Once all of the typos are fixed, then we can add the spellchecking to CI. * Update doctests --- token/cli/README.md | 2 +- token/cli/src/encryption_keypair.rs | 2 +- token/client/src/token.rs | 4 +- .../ciphertext-arithmetic/src/lib.rs | 4 +- .../proof-extraction/src/instruction.rs | 2 +- .../proof-extraction/src/transfer.rs | 4 +- .../proof-extraction/src/transfer_with_fee.rs | 10 +- .../proof-generation/src/lib.rs | 6 +- .../confidential_mint_burn/account_info.rs | 8 +- .../confidential_mint_burn/instruction.rs | 2 +- .../extension/confidential_mint_burn/mod.rs | 2 +- .../confidential_mint_burn/processor.rs | 10 +- .../confidential_mint_burn/verify_proof.rs | 8 +- .../confidential_transfer/instruction.rs | 2 +- .../extension/confidential_transfer/mod.rs | 4 +- .../confidential_transfer/processor.rs | 26 ++-- .../confidential_transfer_fee/instruction.rs | 14 +-- .../confidential_transfer_fee/processor.rs | 12 +- .../src/extension/cpi_guard/instruction.rs | 12 +- .../src/extension/cpi_guard/processor.rs | 2 +- .../default_account_state/instruction.rs | 5 +- .../group_member_pointer/instruction.rs | 2 +- .../src/extension/group_member_pointer/mod.rs | 4 +- .../extension/group_pointer/instruction.rs | 2 +- .../src/extension/group_pointer/mod.rs | 4 +- .../interest_bearing_mint/instruction.rs | 2 +- .../extension/interest_bearing_mint/mod.rs | 4 +- .../extension/memo_transfer/instruction.rs | 6 +- .../src/extension/memo_transfer/processor.rs | 2 +- .../extension/metadata_pointer/instruction.rs | 2 +- .../src/extension/metadata_pointer/mod.rs | 4 +- token/program-2022/src/extension/mod.rs | 56 +++++---- .../src/extension/token_group/mod.rs | 2 +- .../src/extension/token_group/processor.rs | 11 +- .../src/extension/token_metadata/mod.rs | 2 +- .../src/extension/token_metadata/processor.rs | 13 +- .../src/extension/transfer_fee/instruction.rs | 22 ++-- .../src/extension/transfer_fee/mod.rs | 12 +- .../extension/transfer_hook/instruction.rs | 2 +- .../src/extension/transfer_hook/mod.rs | 4 +- .../program-2022/src/generic_token_account.rs | 4 +- token/program-2022/src/instruction.rs | 112 +++++++++++------- token/program-2022/src/lib.rs | 2 +- token/program-2022/src/native_mint.rs | 4 +- token/program-2022/src/pod.rs | 12 +- token/program-2022/src/processor.rs | 60 +++++----- token/program-2022/src/serialization.rs | 26 ++-- token/program-2022/src/state.rs | 4 +- token/program/README.md | 2 +- token/program/src/instruction.rs | 75 ++++++------ token/program/src/native_mint.rs | 2 +- token/program/src/processor.rs | 48 ++++---- token/program/src/state.rs | 6 +- token/transfer-hook/example/README.md | 2 +- token/transfer-hook/example/src/processor.rs | 4 +- token/transfer-hook/interface/README.md | 4 +- .../interface/src/instruction.rs | 10 +- 57 files changed, 358 insertions(+), 316 deletions(-) diff --git a/token/cli/README.md b/token/cli/README.md index 3583effaca4..6c051b4645a 100644 --- a/token/cli/README.md +++ b/token/cli/README.md @@ -1,6 +1,6 @@ # SPL Token program command-line utility -A basic command-line for creating and using SPL Tokens. See https://spl.solana.com/token for more details +A basic command-line for creating and using SPL Tokens. See for more details ## Build diff --git a/token/cli/src/encryption_keypair.rs b/token/cli/src/encryption_keypair.rs index 3a5aecbcf76..4873d117512 100644 --- a/token/cli/src/encryption_keypair.rs +++ b/token/cli/src/encryption_keypair.rs @@ -1,6 +1,6 @@ //! Temporary ElGamal keypair argument parser. //! -//! NOTE: this module should be remoeved in the next Solana upgrade. +//! NOTE: this module should be removed in the next Solana upgrade. use { base64::{prelude::BASE64_STANDARD, Engine}, diff --git a/token/client/src/token.rs b/token/client/src/token.rs index 26780b6f6aa..a1b773b91dd 100644 --- a/token/client/src/token.rs +++ b/token/client/src/token.rs @@ -901,7 +901,7 @@ where mint_result } - /// Retrive mint information. + /// Retrieve mint information. pub async fn get_mint_info(&self) -> TokenResult> { let account = self.get_account(self.pubkey).await?; self.unpack_mint_info(account) @@ -1669,7 +1669,7 @@ where } /// Reallocate a token account to be large enough for a set of - /// ExtensionTypes + /// `ExtensionType`s pub async fn reallocate( &self, account: &Pubkey, diff --git a/token/confidential-transfer/ciphertext-arithmetic/src/lib.rs b/token/confidential-transfer/ciphertext-arithmetic/src/lib.rs index e308db05f2f..e8b23d55340 100644 --- a/token/confidential-transfer/ciphertext-arithmetic/src/lib.rs +++ b/token/confidential-transfer/ciphertext-arithmetic/src/lib.rs @@ -119,7 +119,7 @@ pub fn subtract_from( Some(ristretto_to_elgamal_ciphertext(&result_commitment, &handle)) } -/// Convert a `u64` amount into a curve25519 scalar +/// Convert a `u64` amount into a curve-25519 scalar fn u64_to_scalar(amount: u64) -> PodScalar { let mut amount_bytes = [0u8; 32]; amount_bytes[..8].copy_from_slice(&amount.to_le_bytes()); @@ -141,7 +141,7 @@ fn elgamal_ciphertext_to_ristretto( } /// Convert a pair of `PodRistrettoPoint` to a `PodElGamalCiphertext` -/// interpretting the first as the commitment and the second as the handle +/// interpreting the first as the commitment and the second as the handle fn ristretto_to_elgamal_ciphertext( commitment: &PodRistrettoPoint, handle: &PodRistrettoPoint, diff --git a/token/confidential-transfer/proof-extraction/src/instruction.rs b/token/confidential-transfer/proof-extraction/src/instruction.rs index be41a4bb6a9..247071a90f1 100644 --- a/token/confidential-transfer/proof-extraction/src/instruction.rs +++ b/token/confidential-transfer/proof-extraction/src/instruction.rs @@ -34,7 +34,7 @@ pub fn check_zk_elgamal_proof_program_account( } /// If a proof is to be read from a record account, the proof instruction data -/// must be 5 bytes: 1 byte for the proof type and 4 bytes for the u32 offset +/// must be 5 bytes: 1 byte for the proof type and 4 bytes for the `u32` offset const INSTRUCTION_DATA_LENGTH_WITH_RECORD_ACCOUNT: usize = 5; /// Decodes the proof context data associated with a zero-knowledge proof diff --git a/token/confidential-transfer/proof-extraction/src/transfer.rs b/token/confidential-transfer/proof-extraction/src/transfer.rs index ed4b1f73111..ccc055bebaf 100644 --- a/token/confidential-transfer/proof-extraction/src/transfer.rs +++ b/token/confidential-transfer/proof-extraction/src/transfer.rs @@ -21,9 +21,9 @@ pub struct TransferPubkeys { /// The proof context information needed to process a [Transfer] instruction. pub struct TransferProofContext { - /// Ciphertext containing the low 16 bits of the transafer amount + /// Ciphertext containing the low 16 bits of the transfer amount pub ciphertext_lo: PodTransferAmountCiphertext, - /// Ciphertext containing the high 32 bits of the transafer amount + /// Ciphertext containing the high 32 bits of the transfer amount pub ciphertext_hi: PodTransferAmountCiphertext, /// The transfer public keys associated with a transfer pub transfer_pubkeys: TransferPubkeys, diff --git a/token/confidential-transfer/proof-extraction/src/transfer_with_fee.rs b/token/confidential-transfer/proof-extraction/src/transfer_with_fee.rs index 88aa610c1e6..e89ae0bd4c3 100644 --- a/token/confidential-transfer/proof-extraction/src/transfer_with_fee.rs +++ b/token/confidential-transfer/proof-extraction/src/transfer_with_fee.rs @@ -48,8 +48,8 @@ pub struct TransferWithFeeProofContext { pub ciphertext_lo: PodTransferAmountCiphertext, /// Group encryption of the high 48 bits of the transfer amount pub ciphertext_hi: PodTransferAmountCiphertext, - /// The public encryption keys associated with the transfer: source, dest, - /// auditor, and withdraw withheld authority + /// The public encryption keys associated with the transfer: source, + /// destination, auditor, and withdraw withheld authority pub transfer_with_fee_pubkeys: TransferWithFeePubkeys, /// The final spendable ciphertext after the transfer, pub new_source_ciphertext: PodElGamalCiphertext, @@ -250,20 +250,20 @@ impl TransferWithFeeProofContext { } } -/// Ristretto generator point for curve25519 +/// Ristretto generator point for curve-25519 const G: PodRistrettoPoint = PodRistrettoPoint([ 226, 242, 174, 10, 106, 188, 78, 113, 168, 132, 169, 97, 197, 0, 81, 95, 88, 227, 11, 106, 165, 130, 221, 141, 182, 166, 89, 69, 224, 141, 45, 118, ]); -/// Convert a `u64` amount into a curve25519 scalar +/// Convert a `u64` amount into a curve-25519 scalar fn u64_to_scalar(amount: u64) -> PodScalar { let mut bytes = [0u8; 32]; bytes[..8].copy_from_slice(&amount.to_le_bytes()); PodScalar(bytes) } -/// Convert a `u16` amount into a curve25519 scalar +/// Convert a `u16` amount into a curve-25519 scalar fn u16_to_scalar(amount: u16) -> PodScalar { let mut bytes = [0u8; 32]; bytes[..2].copy_from_slice(&amount.to_le_bytes()); diff --git a/token/confidential-transfer/proof-generation/src/lib.rs b/token/confidential-transfer/proof-generation/src/lib.rs index 39a2db74da4..02155735183 100644 --- a/token/confidential-transfer/proof-generation/src/lib.rs +++ b/token/confidential-transfer/proof-generation/src/lib.rs @@ -26,8 +26,8 @@ pub const TRANSFER_AMOUNT_HI_BITS: usize = 32; pub const REMAINING_BALANCE_BIT_LENGTH: usize = 64; /// Takes in a 64-bit number `amount` and a bit length `bit_length`. It returns: -/// - the `bit_length` low bits of `amount` interpretted as u64 -/// - the `(64 - bit_length)` high bits of `amount` interpretted as u64 +/// - the `bit_length` low bits of `amount` interpreted as `u64` +/// - the `(64 - bit_length)` high bits of `amount` interpreted as `u64` pub fn try_split_u64(amount: u64, bit_length: usize) -> Option<(u64, u64)> { match bit_length { 0 => Some((0, amount)), @@ -45,7 +45,7 @@ pub fn try_split_u64(amount: u64, bit_length: usize) -> Option<(u64, u64)> { } } -/// Combine two numbers that are interpretted as the low and high bits of a +/// Combine two numbers that are interpreted as the low and high bits of a /// target number. The `bit_length` parameter specifies the number of bits that /// `amount_hi` is to be shifted by. pub fn try_combine_lo_hi_u64(amount_lo: u64, amount_hi: u64, bit_length: usize) -> Option { diff --git a/token/program-2022/src/extension/confidential_mint_burn/account_info.rs b/token/program-2022/src/extension/confidential_mint_burn/account_info.rs index 01cae83acc7..772355af016 100644 --- a/token/program-2022/src/extension/confidential_mint_burn/account_info.rs +++ b/token/program-2022/src/extension/confidential_mint_burn/account_info.rs @@ -25,13 +25,13 @@ pub struct SupplyAccountInfo { pub current_supply: PodElGamalCiphertext, /// The decryptable supply pub decryptable_supply: PodAeCiphertext, - /// The supply's elgamal pubkey + /// The supply's ElGamal pubkey pub supply_elgamal_pubkey: PodElGamalPubkey, } impl SupplyAccountInfo { - /// Creates a SupplyAccountInfo from ConfidentialMintBurn extension account - /// data + /// Creates a `SupplyAccountInfo` from `ConfidentialMintBurn` extension + /// account data pub fn new(extension: &ConfidentialMintBurn) -> Self { Self { current_supply: extension.confidential_supply, @@ -41,7 +41,7 @@ impl SupplyAccountInfo { } /// Computes the current supply from the decryptable supply and the - /// difference between the decryptable supply and the elgamal encrypted + /// difference between the decryptable supply and the ElGamal encrypted /// supply ciphertext pub fn decrypt_current_supply( &self, diff --git a/token/program-2022/src/extension/confidential_mint_burn/instruction.rs b/token/program-2022/src/extension/confidential_mint_burn/instruction.rs index 2616ccb941e..6ecd112433d 100644 --- a/token/program-2022/src/extension/confidential_mint_burn/instruction.rs +++ b/token/program-2022/src/extension/confidential_mint_burn/instruction.rs @@ -194,7 +194,7 @@ pub struct InitializeMintData { /// The ElGamal pubkey used to encrypt the confidential supply #[cfg_attr(feature = "serde-traits", serde(with = "elgamalpubkey_fromstr"))] pub supply_elgamal_pubkey: PodElGamalPubkey, - /// The initial 0 supply ecrypted with the supply aes key + /// The initial 0 supply encrypted with the supply aes key #[cfg_attr(feature = "serde-traits", serde(with = "aeciphertext_fromstr"))] pub decryptable_supply: PodAeCiphertext, } diff --git a/token/program-2022/src/extension/confidential_mint_burn/mod.rs b/token/program-2022/src/extension/confidential_mint_burn/mod.rs index 049ced2684c..3ced158923d 100644 --- a/token/program-2022/src/extension/confidential_mint_burn/mod.rs +++ b/token/program-2022/src/extension/confidential_mint_burn/mod.rs @@ -9,7 +9,7 @@ use { /// Maximum bit length of any mint or burn amount /// -/// Any mint or burn amount must be less than 2^48 +/// Any mint or burn amount must be less than `2^48` pub const MAXIMUM_DEPOSIT_TRANSFER_AMOUNT: u64 = (u16::MAX as u64) + (1 << 16) * (u32::MAX as u64); /// Bit length of the low bits of pending balance plaintext diff --git a/token/program-2022/src/extension/confidential_mint_burn/processor.rs b/token/program-2022/src/extension/confidential_mint_burn/processor.rs index 676d6404286..197bb9165a0 100644 --- a/token/program-2022/src/extension/confidential_mint_burn/processor.rs +++ b/token/program-2022/src/extension/confidential_mint_burn/processor.rs @@ -37,7 +37,7 @@ use { spl_token_confidential_transfer_proof_extraction::instruction::verify_and_extract_context, }; -/// Processes an [InitializeMint] instruction. +/// Processes an [`InitializeMint`] instruction. fn process_initialize_mint(accounts: &[AccountInfo], data: &InitializeMintData) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let mint_info = next_account_info(account_info_iter)?; @@ -54,7 +54,7 @@ fn process_initialize_mint(accounts: &[AccountInfo], data: &InitializeMintData) Ok(()) } -/// Processes an [RotateSupplyElGamal] instruction. +/// Processes an [`RotateSupplyElGamal`] instruction. #[cfg(feature = "zk-ops")] fn process_rotate_supply_elgamal_pubkey( program_id: &Pubkey, @@ -110,7 +110,7 @@ fn process_rotate_supply_elgamal_pubkey( Ok(()) } -/// Processes an [UpdateAuthority] instruction. +/// Processes an [`UpdateAuthority`] instruction. fn process_update_decryptable_supply( program_id: &Pubkey, accounts: &[AccountInfo], @@ -142,7 +142,7 @@ fn process_update_decryptable_supply( Ok(()) } -/// Processes a [ConfidentialMint] instruction. +/// Processes a [`ConfidentialMint`] instruction. #[cfg(feature = "zk-ops")] fn process_confidential_mint( program_id: &Pubkey, @@ -267,7 +267,7 @@ fn process_confidential_mint( Ok(()) } -/// Processes a [ConfidentialBurn] instruction. +/// Processes a [`ConfidentialBurn`] instruction. #[cfg(feature = "zk-ops")] fn process_confidential_burn( program_id: &Pubkey, diff --git a/token/program-2022/src/extension/confidential_mint_burn/verify_proof.rs b/token/program-2022/src/extension/confidential_mint_burn/verify_proof.rs index cb1e3392df3..47192117077 100644 --- a/token/program-2022/src/extension/confidential_mint_burn/verify_proof.rs +++ b/token/program-2022/src/extension/confidential_mint_burn/verify_proof.rs @@ -17,8 +17,8 @@ use { std::slice::Iter, }; -/// Verify zero-knowledge proofs needed for a [ConfidentialMint] instruction and -/// return the corresponding proof context information. +/// Verify zero-knowledge proofs needed for a [`ConfidentialMint`] instruction +/// and return the corresponding proof context information. #[cfg(feature = "zk-ops")] pub fn verify_mint_proof( account_info_iter: &mut Iter<'_, AccountInfo<'_>>, @@ -65,8 +65,8 @@ pub fn verify_mint_proof( .map_err(|e| -> TokenError { e.into() })?) } -/// Verify zero-knowledge proofs needed for a [ConfidentialBurn] instruction and -/// return the corresponding proof context information. +/// Verify zero-knowledge proofs needed for a [`ConfidentialBurn`] instruction +/// and return the corresponding proof context information. #[cfg(feature = "zk-ops")] pub fn verify_burn_proof( account_info_iter: &mut Iter<'_, AccountInfo<'_>>, diff --git a/token/program-2022/src/extension/confidential_transfer/instruction.rs b/token/program-2022/src/extension/confidential_transfer/instruction.rs index 152302df3ba..1419f08e38f 100644 --- a/token/program-2022/src/extension/confidential_transfer/instruction.rs +++ b/token/program-2022/src/extension/confidential_transfer/instruction.rs @@ -494,7 +494,7 @@ pub enum ConfidentialTransferInstruction { /// validity proof as well as the token owner signature. /// /// If the token account is not large enough to include the new - /// cconfidential transfer extension, then optionally reallocate the + /// confidential transfer extension, then optionally reallocate the /// account to increase the data size. To reallocate, a payer account to /// fund the reallocation and the system account should be included in the /// instruction. diff --git a/token/program-2022/src/extension/confidential_transfer/mod.rs b/token/program-2022/src/extension/confidential_transfer/mod.rs index 0558938af61..ab1bb71e162 100644 --- a/token/program-2022/src/extension/confidential_transfer/mod.rs +++ b/token/program-2022/src/extension/confidential_transfer/mod.rs @@ -17,7 +17,7 @@ use { /// Maximum bit length of any deposit or transfer amount /// -/// Any deposit or transfer amount must be less than 2^48 +/// Any deposit or transfer amount must be less than `2^48` pub const MAXIMUM_DEPOSIT_TRANSFER_AMOUNT: u64 = (u16::MAX as u64) + (1 << 16) * (u32::MAX as u64); /// Bit length of the low bits of pending balance plaintext @@ -64,7 +64,7 @@ pub struct ConfidentialTransferMint { /// `ConfidentialTransferInstruction::ConfigureAccount`) pub auto_approve_new_accounts: PodBool, - /// Authority to decode any transfer amount in a confidential transafer. + /// Authority to decode any transfer amount in a confidential transfer. pub auditor_elgamal_pubkey: OptionalNonZeroElGamalPubkey, } diff --git a/token/program-2022/src/extension/confidential_transfer/processor.rs b/token/program-2022/src/extension/confidential_transfer/processor.rs index 1622ad1abb8..78aff19a17a 100644 --- a/token/program-2022/src/extension/confidential_transfer/processor.rs +++ b/token/program-2022/src/extension/confidential_transfer/processor.rs @@ -45,7 +45,7 @@ use { }, }; -/// Processes an [InitializeMint] instruction. +/// Processes an [`InitializeMint`] instruction. fn process_initialize_mint( accounts: &[AccountInfo], authority: &OptionalNonZeroPubkey, @@ -67,7 +67,7 @@ fn process_initialize_mint( Ok(()) } -/// Processes an [UpdateMint] instruction. +/// Processes an [`UpdateMint`] instruction. fn process_update_mint( accounts: &[AccountInfo], auto_approve_new_account: PodBool, @@ -104,7 +104,7 @@ enum ElGamalPubkeySource<'a> { ElGamalRegistry(&'a ElGamalRegistry), } -/// Processes a [ConfigureAccountWithRegistry] instruction. +/// Processes a [`ConfigureAccountWithRegistry`] instruction. fn process_configure_account_with_registry( program_id: &Pubkey, accounts: &[AccountInfo], @@ -195,7 +195,7 @@ fn reallocate_for_configure_account_with_registry<'a>( Ok(()) } -/// Processes a [ConfigureAccount] instruction. +/// Processes a [`ConfigureAccount`] instruction. fn process_configure_account( program_id: &Pubkey, accounts: &[AccountInfo], @@ -292,7 +292,7 @@ fn process_configure_account( Ok(()) } -/// Processes an [ApproveAccount] instruction. +/// Processes an [`ApproveAccount`] instruction. fn process_approve_account(accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let token_account_info = next_account_info(account_info_iter)?; @@ -326,7 +326,7 @@ fn process_approve_account(accounts: &[AccountInfo]) -> ProgramResult { } } -/// Processes an [EmptyAccount] instruction. +/// Processes an [`EmptyAccount`] instruction. fn process_empty_account( program_id: &Pubkey, accounts: &[AccountInfo], @@ -379,7 +379,7 @@ fn process_empty_account( Ok(()) } -/// Processes a [Deposit] instruction. +/// Processes a [`Deposit`] instruction. #[cfg(feature = "zk-ops")] fn process_deposit( program_id: &Pubkey, @@ -480,7 +480,7 @@ pub fn verify_and_split_deposit_amount(amount: u64) -> Result<(u64, u64), TokenE Ok((deposit_amount_lo, deposit_amount_hi)) } -/// Processes a [Withdraw] instruction. +/// Processes a [`Withdraw`] instruction. #[cfg(feature = "zk-ops")] fn process_withdraw( program_id: &Pubkey, @@ -584,7 +584,7 @@ fn process_withdraw( Ok(()) } -/// Processes a [Transfer] or [TransferWithFee] instruction. +/// Processes a [`Transfer`] or [`TransferWithFee`] instruction. #[allow(clippy::too_many_arguments)] #[cfg(feature = "zk-ops")] fn process_transfer( @@ -1127,7 +1127,7 @@ fn process_destination_for_transfer_with_fee( Ok(()) } -/// Processes an [ApplyPendingBalance] instruction. +/// Processes an [`ApplyPendingBalance`] instruction. #[cfg(feature = "zk-ops")] fn process_apply_pending_balance( program_id: &Pubkey, @@ -1177,7 +1177,7 @@ fn process_apply_pending_balance( Ok(()) } -/// Processes a [DisableConfidentialCredits] or [EnableConfidentialCredits] +/// Processes a [`DisableConfidentialCredits`] or [`EnableConfidentialCredits`] /// instruction. fn process_allow_confidential_credits( program_id: &Pubkey, @@ -1208,8 +1208,8 @@ fn process_allow_confidential_credits( Ok(()) } -/// Processes an [DisableNonConfidentialCredits] or -/// [EnableNonConfidentialCredits] instruction. +/// Processes an [`DisableNonConfidentialCredits`] or +/// [`EnableNonConfidentialCredits`] instruction. fn process_allow_non_confidential_credits( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token/program-2022/src/extension/confidential_transfer_fee/instruction.rs b/token/program-2022/src/extension/confidential_transfer_fee/instruction.rs index 5978159d33a..b27c82acb61 100644 --- a/token/program-2022/src/extension/confidential_transfer_fee/instruction.rs +++ b/token/program-2022/src/extension/confidential_transfer_fee/instruction.rs @@ -91,10 +91,10 @@ pub enum ConfidentialTransferFeeInstruction { /// 3. `[]` (Optional) Record account if the accompanying proof is to be /// read from a record account. /// 4. `[]` The mint's multisig `withdraw_withheld_authority`. - /// 5. ..5+M `[signer]` M signer accounts. + /// 5. ..`5+M` `[signer]` M signer accounts. /// /// Data expected by this instruction: - /// WithdrawWithheldTokensFromMintData + /// `WithdrawWithheldTokensFromMintData` WithdrawWithheldTokensFromMint, /// Transfer all withheld tokens to an account. Signed by the mint's @@ -143,7 +143,7 @@ pub enum ConfidentialTransferFeeInstruction { /// 3. `[]` (Optional) Record account if the accompanying proof is to be /// read from a record account. /// 4. `[signer]` The mint's `withdraw_withheld_authority`. - /// 5. ..3+N `[writable]` The source accounts to withdraw from. + /// 5. ..`5+N` `[writable]` The source accounts to withdraw from. /// /// * Multisignature owner/delegate /// 0. `[]` The token mint. Must include the `TransferFeeConfig` @@ -157,11 +157,11 @@ pub enum ConfidentialTransferFeeInstruction { /// 3. `[]` (Optional) Record account if the accompanying proof is to be /// read from a record account. /// 4. `[]` The mint's multisig `withdraw_withheld_authority`. - /// 5. ..5+M `[signer]` M signer accounts. - /// 6. 5+M+1..5+M+N `[writable]` The source accounts to withdraw from. + /// 5. ..`5+M` `[signer]` M signer accounts. + /// 6. `5+M+1..5+M+N` `[writable]` The source accounts to withdraw from. /// /// Data expected by this instruction: - /// WithdrawWithheldTokensFromAccountsData + /// `WithdrawWithheldTokensFromAccountsData` WithdrawWithheldTokensFromAccounts, /// Permissionless instruction to transfer all withheld confidential tokens @@ -175,7 +175,7 @@ pub enum ConfidentialTransferFeeInstruction { /// Accounts expected by this instruction: /// /// 0. `[writable]` The mint. - /// 1. ..1+N `[writable]` The source accounts to harvest from. + /// 1. ..`1+N` `[writable]` The source accounts to harvest from. /// /// Data expected by this instruction: /// None diff --git a/token/program-2022/src/extension/confidential_transfer_fee/processor.rs b/token/program-2022/src/extension/confidential_transfer_fee/processor.rs index f71880cbb6c..1d7ec386805 100644 --- a/token/program-2022/src/extension/confidential_transfer_fee/processor.rs +++ b/token/program-2022/src/extension/confidential_transfer_fee/processor.rs @@ -41,7 +41,7 @@ use { spl_token_confidential_transfer_proof_extraction::instruction::verify_and_extract_context, }; -/// Processes an [InitializeConfidentialTransferFeeConfig] instruction. +/// Processes an [`InitializeConfidentialTransferFeeConfig`] instruction. fn process_initialize_confidential_transfer_fee_config( accounts: &[AccountInfo], authority: &OptionalNonZeroPubkey, @@ -62,7 +62,7 @@ fn process_initialize_confidential_transfer_fee_config( Ok(()) } -/// Processes a [WithdrawWithheldTokensFromMint] instruction. +/// Processes a [`WithdrawWithheldTokensFromMint`] instruction. #[cfg(feature = "zk-ops")] fn process_withdraw_withheld_tokens_from_mint( program_id: &Pubkey, @@ -167,7 +167,7 @@ fn process_withdraw_withheld_tokens_from_mint( Ok(()) } -/// Processes a [WithdrawWithheldTokensFromAccounts] instruction. +/// Processes a [`WithdrawWithheldTokensFromAccounts`] instruction. #[cfg(feature = "zk-ops")] fn process_withdraw_withheld_tokens_from_accounts( program_id: &Pubkey, @@ -322,7 +322,7 @@ fn harvest_from_account<'b>( Ok(withheld_amount) } -/// Process a [HarvestWithheldTokensToMint] instruction. +/// Process a [`HarvestWithheldTokensToMint`] instruction. #[cfg(feature = "zk-ops")] fn process_harvest_withheld_tokens_to_mint(accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); @@ -361,7 +361,7 @@ fn process_harvest_withheld_tokens_to_mint(accounts: &[AccountInfo]) -> ProgramR Ok(()) } -/// Process a [EnableHarvestToMint] instruction. +/// Process a [`EnableHarvestToMint`] instruction. fn process_enable_harvest_to_mint(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let mint_info = next_account_info(account_info_iter)?; @@ -391,7 +391,7 @@ fn process_enable_harvest_to_mint(program_id: &Pubkey, accounts: &[AccountInfo]) Ok(()) } -/// Process a [DisableHarvestToMint] instruction. +/// Process a [`DisableHarvestToMint`] instruction. fn process_disable_harvest_to_mint(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let mint_info = next_account_info(account_info_iter)?; diff --git a/token/program-2022/src/extension/cpi_guard/instruction.rs b/token/program-2022/src/extension/cpi_guard/instruction.rs index 4474ae91122..cff707e3316 100644 --- a/token/program-2022/src/extension/cpi_guard/instruction.rs +++ b/token/program-2022/src/extension/cpi_guard/instruction.rs @@ -21,10 +21,10 @@ use { pub enum CpiGuardInstruction { /// Lock certain token operations from taking place within CPI for this /// Account, namely: - /// * Transfer and Burn must go through a delegate. - /// * CloseAccount can only return lamports to owner. - /// * SetAuthority can only be used to remove an existing close authority. - /// * Approve is disallowed entirely. + /// * `Transfer` and `Burn` must go through a delegate. + /// * `CloseAccount` can only return lamports to owner. + /// * `SetAuthority` can only be used to remove an existing close authority. + /// * `Approve` is disallowed entirely. /// /// In addition, CPI Guard cannot be enabled or disabled via CPI. /// @@ -36,7 +36,7 @@ pub enum CpiGuardInstruction { /// * Multisignature authority /// 0. `[writable]` The account to update. /// 1. `[]` The account's multisignature owner. - /// 2. ..2+M `[signer]` M signer accounts. + /// 2. `..2+M` `[signer]` M signer accounts. Enable, /// Allow all token operations to happen via CPI as normal. /// @@ -51,7 +51,7 @@ pub enum CpiGuardInstruction { /// * Multisignature authority /// 0. `[writable]` The account to update. /// 1. `[]` The account's multisignature owner. - /// 2. ..2+M `[signer]` M signer accounts. + /// 2. `..2+M` `[signer]` M signer accounts. Disable, } diff --git a/token/program-2022/src/extension/cpi_guard/processor.rs b/token/program-2022/src/extension/cpi_guard/processor.rs index 8c149d659c7..edaaa42282a 100644 --- a/token/program-2022/src/extension/cpi_guard/processor.rs +++ b/token/program-2022/src/extension/cpi_guard/processor.rs @@ -18,7 +18,7 @@ use { }, }; -/// Toggle the CpiGuard extension, initializing the extension if not already +/// Toggle the `CpiGuard` extension, initializing the extension if not already /// present. fn process_toggle_cpi_guard( program_id: &Pubkey, diff --git a/token/program-2022/src/extension/default_account_state/instruction.rs b/token/program-2022/src/extension/default_account_state/instruction.rs index e7d72039a1a..5ecc66052ee 100644 --- a/token/program-2022/src/extension/default_account_state/instruction.rs +++ b/token/program-2022/src/extension/default_account_state/instruction.rs @@ -48,14 +48,15 @@ pub enum DefaultAccountStateInstruction { /// * Multisignature authority /// 0. `[writable]` The mint. /// 1. `[]` The mint's multisignature freeze authority. - /// 2. ..2+M `[signer]` M signer accounts. + /// 2. `..2+M` `[signer]` M signer accounts. /// /// Data expected by this instruction: /// `crate::state::AccountState` Update, } -/// Utility function for decoding a DefaultAccountState instruction and its data +/// Utility function for decoding a `DefaultAccountState` instruction and its +/// data pub fn decode_instruction( input: &[u8], ) -> Result<(DefaultAccountStateInstruction, AccountState), ProgramError> { diff --git a/token/program-2022/src/extension/group_member_pointer/instruction.rs b/token/program-2022/src/extension/group_member_pointer/instruction.rs index c8fc28019b3..5aa006c29c2 100644 --- a/token/program-2022/src/extension/group_member_pointer/instruction.rs +++ b/token/program-2022/src/extension/group_member_pointer/instruction.rs @@ -50,7 +50,7 @@ pub enum GroupMemberPointerInstruction { /// * Multisignature authority /// 0. `[writable]` The mint. /// 1. `[]` The group member pointer authority. - /// 2. ..2+M `[signer]` M signer accounts. + /// 2. `..2+M` `[signer]` M signer accounts. /// /// Data expected by this instruction: /// `crate::extension::group_member_pointer::instruction::UpdateInstructionData` diff --git a/token/program-2022/src/extension/group_member_pointer/mod.rs b/token/program-2022/src/extension/group_member_pointer/mod.rs index ba7246965cf..a74e4872dd6 100644 --- a/token/program-2022/src/extension/group_member_pointer/mod.rs +++ b/token/program-2022/src/extension/group_member_pointer/mod.rs @@ -6,9 +6,9 @@ use { spl_pod::optional_keys::OptionalNonZeroPubkey, }; -/// Instructions for the GroupMemberPointer extension +/// Instructions for the `GroupMemberPointer` extension pub mod instruction; -/// Instruction processor for the GroupMemberPointer extension +/// Instruction processor for the `GroupMemberPointer` extension pub mod processor; /// Group member pointer extension data for mints. diff --git a/token/program-2022/src/extension/group_pointer/instruction.rs b/token/program-2022/src/extension/group_pointer/instruction.rs index 5fccbd9ad89..5204b18fc4a 100644 --- a/token/program-2022/src/extension/group_pointer/instruction.rs +++ b/token/program-2022/src/extension/group_pointer/instruction.rs @@ -50,7 +50,7 @@ pub enum GroupPointerInstruction { /// * Multisignature authority /// 0. `[writable]` The mint. /// 1. `[]` The mint's group pointer authority. - /// 2. ..2+M `[signer]` M signer accounts. + /// 2. `..2+M` `[signer]` M signer accounts. /// /// Data expected by this instruction: /// `crate::extension::group_pointer::instruction::UpdateInstructionData` diff --git a/token/program-2022/src/extension/group_pointer/mod.rs b/token/program-2022/src/extension/group_pointer/mod.rs index 9fe2679a19e..27344d2d254 100644 --- a/token/program-2022/src/extension/group_pointer/mod.rs +++ b/token/program-2022/src/extension/group_pointer/mod.rs @@ -6,9 +6,9 @@ use { spl_pod::optional_keys::OptionalNonZeroPubkey, }; -/// Instructions for the GroupPointer extension +/// Instructions for the `GroupPointer` extension pub mod instruction; -/// Instruction processor for the GroupPointer extension +/// Instruction processor for the `GroupPointer` extension pub mod processor; /// Group pointer extension data for mints. diff --git a/token/program-2022/src/extension/interest_bearing_mint/instruction.rs b/token/program-2022/src/extension/interest_bearing_mint/instruction.rs index f98ec592c27..f7b07e24fc8 100644 --- a/token/program-2022/src/extension/interest_bearing_mint/instruction.rs +++ b/token/program-2022/src/extension/interest_bearing_mint/instruction.rs @@ -51,7 +51,7 @@ pub enum InterestBearingMintInstruction { /// * Multisignature authority /// 0. `[writable]` The mint. /// 1. `[]` The mint's multisignature rate authority. - /// 2. ..2+M `[signer]` M signer accounts. + /// 2. `..2+M` `[signer]` M signer accounts. /// /// Data expected by this instruction: /// `crate::extension::interest_bearing::BasisPoints` diff --git a/token/program-2022/src/extension/interest_bearing_mint/mod.rs b/token/program-2022/src/extension/interest_bearing_mint/mod.rs index 1afb664f577..bd2dc86c595 100644 --- a/token/program-2022/src/extension/interest_bearing_mint/mod.rs +++ b/token/program-2022/src/extension/interest_bearing_mint/mod.rs @@ -22,7 +22,7 @@ pub type BasisPoints = PodI16; const ONE_IN_BASIS_POINTS: f64 = 10_000.; const SECONDS_PER_YEAR: f64 = 60. * 60. * 24. * 365.24; -/// UnixTimestamp expressed with an alignment-independent type +/// `UnixTimestamp` expressed with an alignment-independent type pub type UnixTimestamp = PodI64; /// Interest-bearing extension data for mints @@ -120,11 +120,13 @@ impl InterestBearingConfig { /// The new average rate is the time-weighted average of the current rate /// and average rate, solving for r such that: /// + /// ```text /// exp(r_1 * t_1) * exp(r_2 * t_2) = exp(r * (t_1 + t_2)) /// /// r_1 * t_1 + r_2 * t_2 = r * (t_1 + t_2) /// /// r = (r_1 * t_1 + r_2 * t_2) / (t_1 + t_2) + /// ``` pub fn time_weighted_average_rate(&self, current_timestamp: i64) -> Option { let initialization_timestamp = i64::from(self.initialization_timestamp) as i128; let last_update_timestamp = i64::from(self.last_update_timestamp) as i128; diff --git a/token/program-2022/src/extension/memo_transfer/instruction.rs b/token/program-2022/src/extension/memo_transfer/instruction.rs index 0a619a1400b..48c3d78adab 100644 --- a/token/program-2022/src/extension/memo_transfer/instruction.rs +++ b/token/program-2022/src/extension/memo_transfer/instruction.rs @@ -19,7 +19,7 @@ use { #[derive(Clone, Copy, Debug, PartialEq, IntoPrimitive, TryFromPrimitive)] #[repr(u8)] pub enum RequiredMemoTransfersInstruction { - /// Require memos for transfers into this Account. Adds the MemoTransfer + /// Require memos for transfers into this Account. Adds the `MemoTransfer` /// extension to the Account, if it doesn't already exist. /// /// Accounts expected by this instruction: @@ -30,7 +30,7 @@ pub enum RequiredMemoTransfersInstruction { /// * Multisignature authority /// 0. `[writable]` The account to update. /// 1. `[]` The account's multisignature owner. - /// 2. ..2+M `[signer]` M signer accounts. + /// 2. `..2+M` `[signer]` M signer accounts. Enable, /// Stop requiring memos for transfers into this Account. /// @@ -45,7 +45,7 @@ pub enum RequiredMemoTransfersInstruction { /// * Multisignature authority /// 0. `[writable]` The account to update. /// 1. `[]` The account's multisignature owner. - /// 2. ..2+M `[signer]` M signer accounts. + /// 2. `..2+M` `[signer]` M signer accounts. Disable, } diff --git a/token/program-2022/src/extension/memo_transfer/processor.rs b/token/program-2022/src/extension/memo_transfer/processor.rs index 3e5f0c7be4a..3d1a1de658f 100644 --- a/token/program-2022/src/extension/memo_transfer/processor.rs +++ b/token/program-2022/src/extension/memo_transfer/processor.rs @@ -17,7 +17,7 @@ use { }, }; -/// Toggle the RequiredMemoTransfers extension, initializing the extension if +/// Toggle the `RequiredMemoTransfers` extension, initializing the extension if /// not already present. fn process_toggle_required_memo_transfers( program_id: &Pubkey, diff --git a/token/program-2022/src/extension/metadata_pointer/instruction.rs b/token/program-2022/src/extension/metadata_pointer/instruction.rs index 778c7dddb38..47d326869c9 100644 --- a/token/program-2022/src/extension/metadata_pointer/instruction.rs +++ b/token/program-2022/src/extension/metadata_pointer/instruction.rs @@ -50,7 +50,7 @@ pub enum MetadataPointerInstruction { /// * Multisignature authority /// 0. `[writable]` The mint. /// 1. `[]` The mint's metadata pointer authority. - /// 2. ..2+M `[signer]` M signer accounts. + /// 2. `..2+M` `[signer]` M signer accounts. /// /// Data expected by this instruction: /// `crate::extension::metadata_pointer::instruction::UpdateInstructionData` diff --git a/token/program-2022/src/extension/metadata_pointer/mod.rs b/token/program-2022/src/extension/metadata_pointer/mod.rs index c14932d5000..639d92df406 100644 --- a/token/program-2022/src/extension/metadata_pointer/mod.rs +++ b/token/program-2022/src/extension/metadata_pointer/mod.rs @@ -6,9 +6,9 @@ use { spl_pod::optional_keys::OptionalNonZeroPubkey, }; -/// Instructions for the MetadataPointer extension +/// Instructions for the `MetadataPointer` extension pub mod instruction; -/// Instruction processor for the MetadataPointer extension +/// Instruction processor for the `MetadataPointer` extension pub mod processor; /// Metadata pointer extension data for mints. diff --git a/token/program-2022/src/extension/mod.rs b/token/program-2022/src/extension/mod.rs index f2e09ab2a07..76bdb092c8e 100644 --- a/token/program-2022/src/extension/mod.rs +++ b/token/program-2022/src/extension/mod.rs @@ -106,7 +106,7 @@ impl TryFrom for Length { } } -/// Helper function to get the current TlvIndices from the current spot +/// Helper function to get the current `TlvIndices` from the current spot fn get_tlv_indices(type_start: usize) -> TlvIndices { let length_start = type_start.saturating_add(size_of::()); let value_start = length_start.saturating_add(pod_get_packed_len::()); @@ -280,6 +280,7 @@ fn check_account_type(account_type: AccountType) -> Result<(), Pro /// Account with an extension, even if we add the account type. For example, /// let's say we have: /// +/// ```text /// Account: 165 bytes... + [2, 0, 3, 0, 100, ....] /// ^ ^ ^ ^ /// acct type extension length data... @@ -287,14 +288,15 @@ fn check_account_type(account_type: AccountType) -> Result<(), Pro /// Mint: 82 bytes... + 83 bytes of other extension data /// + [2, 0, 3, 0, 100, ....] /// (data in extension just happens to look like this) +/// ``` /// -/// With this approach, we only start writing the TLV data after Account::LEN, +/// With this approach, we only start writing the TLV data after `Account::LEN`, /// which means we always know that the account type is going to be right after /// that. We do a special case checking for a Multisig length, because those /// aren't extensible under any circumstances. const BASE_ACCOUNT_LENGTH: usize = Account::LEN; -/// Helper that tacks on the AccountType length, which gives the minimum for any -/// account with extensions +/// Helper that tacks on the `AccountType` length, which gives the minimum for +/// any account with extensions const BASE_ACCOUNT_AND_TYPE_LENGTH: usize = BASE_ACCOUNT_LENGTH + size_of::(); fn type_and_tlv_indices( @@ -423,7 +425,7 @@ pub trait BaseStateWithExtensions { get_tlv_data_info(self.get_tlv_data()).map(|x| x.extension_types) } - /// Get just the first extension type, useful to track mixed initializations + /// Get just the first extension type, useful to track mixed initialization fn get_first_extension_type(&self) -> Result, ProgramError> { get_first_extension_type(self.get_tlv_data()) } @@ -737,12 +739,12 @@ pub trait BaseStateWithExtensionsMut: BaseStateWithExtensions { } } - /// If `extension_type` is an Account-associated ExtensionType that requires - /// initialization on InitializeAccount, this method packs the default - /// relevant Extension of an ExtensionType into an open slot if not - /// already found in the data buffer, otherwise overwrites the - /// existing extension with the default state. For all other ExtensionTypes, - /// this is a no-op. + /// If `extension_type` is an Account-associated `ExtensionType` that + /// requires initialization on `InitializeAccount`, this method packs + /// the default relevant `Extension` of an `ExtensionType` into an open + /// slot if not already found in the data buffer, otherwise overwrites + /// the existing extension with the default state. For all other + /// `ExtensionType`s, this is a no-op. fn init_account_extension_from_type( &mut self, extension_type: ExtensionType, @@ -996,10 +998,10 @@ fn unpack_uninitialized_type_and_tlv_data_mut( }) } -/// If AccountType is uninitialized, set it to the BaseState's ACCOUNT_TYPE; -/// if AccountType is already set, check is set correctly for BaseState -/// This method assumes that the `base_data` has already been packed with data -/// of the desired type. +/// If `AccountType` is uninitialized, set it to the `BaseState`'s +/// `ACCOUNT_TYPE`; if `AccountType` is already set, check is set correctly for +/// `BaseState`. This method assumes that the `base_data` has already been +/// packed with data of the desired type. pub fn set_account_type(input: &mut [u8]) -> Result<(), ProgramError> { check_min_len_and_not_multisig(input, S::SIZE_OF)?; let (base_data, rest) = input.split_at_mut(S::SIZE_OF); @@ -1198,14 +1200,14 @@ impl ExtensionType { }) } - /// Get the TLV length for an ExtensionType + /// Get the TLV length for an `ExtensionType` /// /// Fails if the extension type has a variable length fn try_get_tlv_len(&self) -> Result { Ok(add_type_and_length_to_len(self.try_get_type_len()?)) } - /// Get the TLV length for a set of ExtensionTypes + /// Get the TLV length for a set of `ExtensionType`s /// /// Fails if any of the extension types has a variable length fn try_get_total_tlv_len(extension_types: &[Self]) -> Result { @@ -1219,7 +1221,7 @@ impl ExtensionType { extensions.iter().map(|e| e.try_get_tlv_len()).sum() } - /// Get the required account data length for the given ExtensionTypes + /// Get the required account data length for the given `ExtensionType`s /// /// Fails if any of the extension types has a variable length pub fn try_calculate_account_len( @@ -1271,8 +1273,8 @@ impl ExtensionType { } } - /// Based on a set of AccountType::Mint ExtensionTypes, get the list of - /// AccountType::Account ExtensionTypes required on InitializeAccount + /// Based on a set of `AccountType::Mint` `ExtensionType`s, get the list of + /// `AccountType::Account` `ExtensionType`s required on `InitializeAccount` pub fn get_required_init_account_extensions(mint_extension_types: &[Self]) -> Vec { let mut account_extension_types = vec![]; for extension_type in mint_extension_types { @@ -1360,10 +1362,14 @@ pub trait Extension { const TYPE: ExtensionType; } -/// Padding a mint account to be exactly Multisig::LEN. -/// We need to pad 185 bytes, since Multisig::LEN = 355, Account::LEN = 165, -/// size_of AccountType = 1, size_of ExtensionType = 2, size_of Length = 2. -/// 355 - 165 - 1 - 2 - 2 = 185 +/// Padding a mint account to be exactly `Multisig::LEN`. +/// We need to pad 185 bytes, since `Multisig::LEN = 355`, `Account::LEN = 165`, +/// `size_of::() = 1`, `size_of::() = 2`, +/// `size_of::() = 2`. +/// +/// ``` +/// assert_eq!(355 - 165 - 1 - 2 - 2, 185); +/// ``` #[cfg(test)] #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)] @@ -1389,7 +1395,7 @@ impl Default for MintPaddingTest { } } } -/// Account version of the MintPadding +/// Account version of the `MintPadding` #[cfg(test)] #[repr(C)] #[derive(Clone, Copy, Debug, Default, PartialEq, Pod, Zeroable)] diff --git a/token/program-2022/src/extension/token_group/mod.rs b/token/program-2022/src/extension/token_group/mod.rs index 1546ec92975..32bb723a72d 100644 --- a/token/program-2022/src/extension/token_group/mod.rs +++ b/token/program-2022/src/extension/token_group/mod.rs @@ -3,7 +3,7 @@ use { spl_token_group_interface::state::{TokenGroup, TokenGroupMember}, }; -/// Instruction processor for the TokenGroup extensions +/// Instruction processor for the `TokenGroup` extension pub mod processor; impl Extension for TokenGroup { diff --git a/token/program-2022/src/extension/token_group/processor.rs b/token/program-2022/src/extension/token_group/processor.rs index 37ddd1a31c9..4fa35253541 100644 --- a/token/program-2022/src/extension/token_group/processor.rs +++ b/token/program-2022/src/extension/token_group/processor.rs @@ -43,7 +43,8 @@ fn check_update_authority( Ok(()) } -/// Processes a [InitializeGroup](enum.TokenGroupInstruction.html) instruction. +/// Processes a [`InitializeGroup`](enum.TokenGroupInstruction.html) +/// instruction. pub fn process_initialize_group( _program_id: &Pubkey, accounts: &[AccountInfo], @@ -95,7 +96,7 @@ pub fn process_initialize_group( } /// Processes an -/// [UpdateGroupMaxSize](enum.TokenGroupInstruction.html) +/// [`UpdateGroupMaxSize`](enum.TokenGroupInstruction.html) /// instruction pub fn process_update_group_max_size( _program_id: &Pubkey, @@ -119,7 +120,7 @@ pub fn process_update_group_max_size( } /// Processes an -/// [UpdateGroupAuthority](enum.TokenGroupInstruction.html) +/// [`UpdateGroupAuthority`](enum.TokenGroupInstruction.html) /// instruction pub fn process_update_group_authority( _program_id: &Pubkey, @@ -142,7 +143,7 @@ pub fn process_update_group_authority( Ok(()) } -/// Processes an [InitializeMember](enum.TokenGroupInstruction.html) +/// Processes an [`InitializeMember`](enum.TokenGroupInstruction.html) /// instruction pub fn process_initialize_member(_program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); @@ -204,7 +205,7 @@ pub fn process_initialize_member(_program_id: &Pubkey, accounts: &[AccountInfo]) Ok(()) } -/// Processes an [Instruction](enum.Instruction.html). +/// Processes an [`Instruction`](enum.Instruction.html). pub fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token/program-2022/src/extension/token_metadata/mod.rs b/token/program-2022/src/extension/token_metadata/mod.rs index cc96af20b5a..5fb94c42bcf 100644 --- a/token/program-2022/src/extension/token_metadata/mod.rs +++ b/token/program-2022/src/extension/token_metadata/mod.rs @@ -3,7 +3,7 @@ use { spl_token_metadata_interface::state::TokenMetadata, }; -/// Instruction processor for the TokenMetadata extension +/// Instruction processor for the `TokenMetadata` extension pub mod processor; impl Extension for TokenMetadata { diff --git a/token/program-2022/src/extension/token_metadata/processor.rs b/token/program-2022/src/extension/token_metadata/processor.rs index 278e734c7fa..55237014c2c 100644 --- a/token/program-2022/src/extension/token_metadata/processor.rs +++ b/token/program-2022/src/extension/token_metadata/processor.rs @@ -43,7 +43,7 @@ fn check_update_authority( Ok(()) } -/// Processes a [Initialize](enum.TokenMetadataInstruction.html) instruction. +/// Processes a [`Initialize`](enum.TokenMetadataInstruction.html) instruction. pub fn process_initialize( _program_id: &Pubkey, accounts: &[AccountInfo], @@ -106,7 +106,8 @@ pub fn process_initialize( Ok(()) } -/// Processes an [UpdateField](enum.TokenMetadataInstruction.html) instruction. +/// Processes an [`UpdateField`](enum.TokenMetadataInstruction.html) +/// instruction. pub fn process_update_field( _program_id: &Pubkey, accounts: &[AccountInfo], @@ -135,7 +136,7 @@ pub fn process_update_field( Ok(()) } -/// Processes a [RemoveKey](enum.TokenMetadataInstruction.html) instruction. +/// Processes a [`RemoveKey`](enum.TokenMetadataInstruction.html) instruction. pub fn process_remove_key( _program_id: &Pubkey, accounts: &[AccountInfo], @@ -161,7 +162,7 @@ pub fn process_remove_key( Ok(()) } -/// Processes a [UpdateAuthority](enum.TokenMetadataInstruction.html) +/// Processes a [`UpdateAuthority`](enum.TokenMetadataInstruction.html) /// instruction. pub fn process_update_authority( _program_id: &Pubkey, @@ -188,7 +189,7 @@ pub fn process_update_authority( Ok(()) } -/// Processes an [Emit](enum.TokenMetadataInstruction.html) instruction. +/// Processes an [`Emit`](enum.TokenMetadataInstruction.html) instruction. pub fn process_emit(program_id: &Pubkey, accounts: &[AccountInfo], data: Emit) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let metadata_info = next_account_info(account_info_iter)?; @@ -207,7 +208,7 @@ pub fn process_emit(program_id: &Pubkey, accounts: &[AccountInfo], data: Emit) - Ok(()) } -/// Processes an [Instruction](enum.Instruction.html). +/// Processes an [`Instruction`](enum.Instruction.html). pub fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token/program-2022/src/extension/transfer_fee/instruction.rs b/token/program-2022/src/extension/transfer_fee/instruction.rs index ee31e4c71cb..2f25e19f353 100644 --- a/token/program-2022/src/extension/transfer_fee/instruction.rs +++ b/token/program-2022/src/extension/transfer_fee/instruction.rs @@ -69,15 +69,15 @@ pub enum TransferFeeInstruction { /// 1. `[]` The token mint. /// 2. `[writable]` The destination account. /// 3. `[]` The source account's multisignature owner/delegate. - /// 4. ..4+M `[signer]` M signer accounts. + /// 4. `..4+M` `[signer]` M signer accounts. TransferCheckedWithFee { /// The amount of tokens to transfer. amount: u64, /// Expected number of base 10 digits to the right of the decimal place. decimals: u8, /// Expected fee assessed on this transfer, calculated off-chain based - /// on the transfer_fee_basis_points and maximum_fee of the mint. May - /// be 0 for a mint without a configured transfer fee. + /// on the `transfer_fee_basis_points` and `maximum_fee` of the mint. + /// May be 0 for a mint without a configured transfer fee. fee: u64, }, /// Transfer all withheld tokens in the mint to an account. Signed by the @@ -96,7 +96,7 @@ pub enum TransferFeeInstruction { /// 0. `[writable]` The token mint. /// 1. `[writable]` The destination account. /// 2. `[]` The mint's multisig `withdraw_withheld_authority`. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. `..3+M `[signer]` M signer accounts. WithdrawWithheldTokensFromMint, /// Transfer all withheld tokens to an account. Signed by the mint's /// withdraw withheld tokens authority. @@ -110,14 +110,14 @@ pub enum TransferFeeInstruction { /// `TransferFeeAmount` extension and be associated with the provided /// mint. /// 2. `[signer]` The mint's `withdraw_withheld_authority`. - /// 3. ..3+N `[writable]` The source accounts to withdraw from. + /// 3. `..3+N` `[writable]` The source accounts to withdraw from. /// /// * Multisignature owner/delegate /// 0. `[]` The token mint. /// 1. `[writable]` The destination account. /// 2. `[]` The mint's multisig `withdraw_withheld_authority`. - /// 3. ..3+M `[signer]` M signer accounts. - /// 4. 3+M+1..3+M+N `[writable]` The source accounts to withdraw from. + /// 3. `..3+M` `[signer]` M signer accounts. + /// 4. `3+M+1..3+M+N` `[writable]` The source accounts to withdraw from. WithdrawWithheldTokensFromAccounts { /// Number of token accounts harvested num_token_accounts: u8, @@ -132,7 +132,7 @@ pub enum TransferFeeInstruction { /// Accounts expected by this instruction: /// /// 0. `[writable]` The mint. - /// 1. ..1+N `[writable]` The source accounts to harvest from. + /// 1. `..1+N` `[writable]` The source accounts to harvest from. HarvestWithheldTokensToMint, /// Set transfer fee. Only supported for mints that include the /// `TransferFeeConfig` extension. @@ -146,7 +146,7 @@ pub enum TransferFeeInstruction { /// * Multisignature authority /// 0. `[writable]` The mint. /// 1. `[]` The mint's multisignature fee account owner. - /// 2. ..2+M `[signer]` M signer accounts. + /// 2. `..2+M` `[signer]` M signer accounts. SetTransferFee { /// Amount of transfer collected as fees, expressed as basis points of /// the transfer amount @@ -156,7 +156,7 @@ pub enum TransferFeeInstruction { }, } impl TransferFeeInstruction { - /// Unpacks a byte buffer into a TransferFeeInstruction + /// Unpacks a byte buffer into a `TransferFeeInstruction` pub fn unpack(input: &[u8]) -> Result { use TokenError::InvalidInstruction; @@ -203,7 +203,7 @@ impl TransferFeeInstruction { }) } - /// Packs a TransferFeeInstruction into a byte buffer. + /// Packs a `TransferFeeInstruction` into a byte buffer. pub fn pack(&self, buffer: &mut Vec) { match *self { Self::InitializeTransferFeeConfig { diff --git a/token/program-2022/src/extension/transfer_fee/mod.rs b/token/program-2022/src/extension/transfer_fee/mod.rs index f00382c07e3..ed1dec473d4 100644 --- a/token/program-2022/src/extension/transfer_fee/mod.rs +++ b/token/program-2022/src/extension/transfer_fee/mod.rs @@ -23,7 +23,7 @@ pub mod instruction; /// Transfer fee extension processor pub mod processor; -/// Maximum possible fee in basis points is 100%, aka 10_000 basis points +/// Maximum possible fee in basis points is `100%`, aka 10,000 basis points pub const MAX_FEE_BASIS_POINTS: u16 = 10_000; const ONE_IN_BASIS_POINTS: u128 = MAX_FEE_BASIS_POINTS as u128; @@ -38,7 +38,7 @@ pub struct TransferFee { /// Maximum fee assessed on transfers, expressed as an amount of tokens pub maximum_fee: PodU64, /// Amount of transfer collected as fees, expressed as basis points of the - /// transfer amount, ie. increments of 0.01% + /// transfer amount (increments of `0.01%`) pub transfer_fee_basis_points: PodU16, } impl TransferFee { @@ -80,9 +80,9 @@ impl TransferFee { /// /// The original transfer amount may not always be unique due to rounding. /// In this case, the smaller amount will be chosen. - /// e.g. Both transfer amount 10, 11 with 10% fee rate results in net + /// e.g. Both transfer amount 10, 11 with `10%` fee rate results in net /// transfer amount of 9. In this case, 10 will be chosen. - /// e.g. Fee rate is 100%. In this case, 0 will be chosen. + /// e.g. Fee rate is `100%`. In this case, 0 will be chosen. /// /// The original transfer amount may not always exist on large net transfer /// amounts due to overflow. In this case, `None` is returned. @@ -141,9 +141,9 @@ pub struct TransferFeeConfig { /// Withheld transfer fee tokens that have been moved to the mint for /// withdrawal pub withheld_amount: PodU64, - /// Older transfer fee, used if the current epoch < new_transfer_fee.epoch + /// Older transfer fee, used if `current epoch < new_transfer_fee.epoch` pub older_transfer_fee: TransferFee, - /// Newer transfer fee, used if the current epoch >= new_transfer_fee.epoch + /// Newer transfer fee, used if `current epoch >= new_transfer_fee.epoch` pub newer_transfer_fee: TransferFee, } impl TransferFeeConfig { diff --git a/token/program-2022/src/extension/transfer_hook/instruction.rs b/token/program-2022/src/extension/transfer_hook/instruction.rs index 735b2866899..86c36c056cb 100644 --- a/token/program-2022/src/extension/transfer_hook/instruction.rs +++ b/token/program-2022/src/extension/transfer_hook/instruction.rs @@ -50,7 +50,7 @@ pub enum TransferHookInstruction { /// * Multisignature authority /// 0. `[writable]` The mint. /// 1. `[]` The mint's transfer hook authority. - /// 2. ..2+M `[signer]` M signer accounts. + /// 2. `..2+M` `[signer]` M signer accounts. /// /// Data expected by this instruction: /// `crate::extension::transfer_hook::UpdateInstructionData` diff --git a/token/program-2022/src/extension/transfer_hook/mod.rs b/token/program-2022/src/extension/transfer_hook/mod.rs index be896bb65e6..5c1fcad2749 100644 --- a/token/program-2022/src/extension/transfer_hook/mod.rs +++ b/token/program-2022/src/extension/transfer_hook/mod.rs @@ -13,9 +13,9 @@ use { spl_pod::{optional_keys::OptionalNonZeroPubkey, primitives::PodBool}, }; -/// Instructions for the TransferHook extension +/// Instructions for the `TransferHook` extension pub mod instruction; -/// Instruction processor for the TransferHook extension +/// Instruction processor for the `TransferHook` extension pub mod processor; /// Transfer hook extension data for mints. diff --git a/token/program-2022/src/generic_token_account.rs b/token/program-2022/src/generic_token_account.rs index 69496c95e83..a58b56375fc 100644 --- a/token/program-2022/src/generic_token_account.rs +++ b/token/program-2022/src/generic_token_account.rs @@ -1,4 +1,4 @@ -//! Generic Token Account, copied from spl_token::state +//! Generic Token Account, copied from `spl_token::state` // Remove all of this and use spl-token's version once token 3.4.0 is released use { crate::state::AccountState, @@ -56,7 +56,7 @@ pub trait GenericTokenAccount { pub const ACCOUNT_INITIALIZED_INDEX: usize = 108; /// Check if the account data buffer represents an initialized account. -/// This is checking the `state` (AccountState) field of an Account object. +/// This is checking the `state` (`AccountState`) field of an Account object. pub fn is_initialized_account(account_data: &[u8]) -> bool { *account_data .get(ACCOUNT_INITIALIZED_INDEX) diff --git a/token/program-2022/src/instruction.rs b/token/program-2022/src/instruction.rs index 3d766aa0230..1706271f5bb 100644 --- a/token/program-2022/src/instruction.rs +++ b/token/program-2022/src/instruction.rs @@ -34,9 +34,9 @@ use { pub const MIN_SIGNERS: usize = 1; /// Maximum number of multisignature signers (max N) pub const MAX_SIGNERS: usize = 11; -/// Serialized length of a u16, for unpacking +/// Serialized length of a `u16`, for unpacking const U16_BYTES: usize = 2; -/// Serialized length of a u64, for unpacking +/// Serialized length of a `u64`, for unpacking const U64_BYTES: usize = 8; /// Instructions supported by the token program. @@ -110,8 +110,8 @@ pub enum TokenInstruction<'a> { /// /// 0. `[writable]` The multisignature account to initialize. /// 1. `[]` Rent sysvar - /// 2. ..2+N. `[]` The signer accounts, must equal to N where 1 <= N <= - /// 11. + /// 2. ..`2+N`. `[]` The signer accounts, must equal to N where `1 <= N <= + /// 11`. InitializeMultisig { /// The number of signers (M) required to validate this multisignature /// account. @@ -140,7 +140,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The source account. /// 1. `[writable]` The destination account. /// 2. `[]` The source account's multisignature owner/delegate. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. #[deprecated( since = "4.0.0", note = "please use `TransferChecked` or `TransferCheckedWithFee` instead" @@ -163,7 +163,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The source account. /// 1. `[]` The delegate. /// 2. `[]` The source account's multisignature owner. - /// 3. ..3+M `[signer]` M signer accounts + /// 3. ..`3+M` `[signer]` M signer accounts Approve { /// The amount of tokens the delegate is approved for. amount: u64, @@ -180,7 +180,7 @@ pub enum TokenInstruction<'a> { /// * Multisignature owner /// 0. `[writable]` The source account. /// 1. `[]` The source account's multisignature owner or current delegate. - /// 2. ..2+M `[signer]` M signer accounts + /// 2. ..`2+M` `[signer]` M signer accounts Revoke, /// Sets a new authority of a mint or account. /// @@ -193,7 +193,7 @@ pub enum TokenInstruction<'a> { /// * Multisignature authority /// 0. `[writable]` The mint or account to change the authority of. /// 1. `[]` The mint's or account's current multisignature authority. - /// 2. ..2+M `[signer]` M signer accounts + /// 2. ..`2+M` `[signer]` M signer accounts SetAuthority { /// The type of authority to update. authority_type: AuthorityType, @@ -215,7 +215,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The mint. /// 1. `[writable]` The account to mint tokens to. /// 2. `[]` The mint's multisignature mint-tokens authority. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. MintTo { /// The amount of new tokens to mint. amount: u64, @@ -234,7 +234,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The account to burn from. /// 1. `[writable]` The token mint. /// 2. `[]` The account's multisignature owner/delegate. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. Burn { /// The amount of tokens to burn. amount: u64, @@ -272,10 +272,10 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The account to close. /// 1. `[writable]` The destination account. /// 2. `[]` The account's multisignature owner. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. CloseAccount, // 10 - /// Freeze an Initialized account using the Mint's freeze_authority (if + /// Freeze an Initialized account using the Mint's `freeze_authority` (if /// set). /// /// Accounts expected by this instruction: @@ -289,9 +289,9 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The account to freeze. /// 1. `[]` The token mint. /// 2. `[]` The mint's multisignature freeze authority. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. FreezeAccount, - /// Thaw a Frozen account using the Mint's freeze_authority (if set). + /// Thaw a Frozen account using the Mint's `freeze_authority` (if set). /// /// Accounts expected by this instruction: /// @@ -304,7 +304,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The account to freeze. /// 1. `[]` The token mint. /// 2. `[]` The mint's multisignature freeze authority. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. ThawAccount, /// Transfers tokens from one account to another either directly or via a @@ -312,7 +312,7 @@ pub enum TokenInstruction<'a> { /// amounts of SOL and Tokens will be transferred to the destination /// account. /// - /// This instruction differs from Transfer in that the token mint and + /// This instruction differs from `Transfer` in that the token mint and /// decimals value is checked by the caller. This may be useful when /// creating transactions offline or within a hardware wallet. /// @@ -332,7 +332,7 @@ pub enum TokenInstruction<'a> { /// 1. `[]` The token mint. /// 2. `[writable]` The destination account. /// 3. `[]` The source account's multisignature owner/delegate. - /// 4. ..4+M `[signer]` M signer accounts. + /// 4. ..`4+M` `[signer]` M signer accounts. TransferChecked { /// The amount of tokens to transfer. amount: u64, @@ -342,7 +342,7 @@ pub enum TokenInstruction<'a> { /// Approves a delegate. A delegate is given the authority over tokens on /// behalf of the source account's owner. /// - /// This instruction differs from Approve in that the token mint and + /// This instruction differs from `Approve` in that the token mint and /// decimals value is checked by the caller. This may be useful when /// creating transactions offline or within a hardware wallet. /// @@ -359,7 +359,7 @@ pub enum TokenInstruction<'a> { /// 1. `[]` The token mint. /// 2. `[]` The delegate. /// 3. `[]` The source account's multisignature owner. - /// 4. ..4+M `[signer]` M signer accounts + /// 4. ..`4+M` `[signer]` M signer accounts ApproveChecked { /// The amount of tokens the delegate is approved for. amount: u64, @@ -369,7 +369,7 @@ pub enum TokenInstruction<'a> { /// Mints new tokens to an account. The native mint does not support /// minting. /// - /// This instruction differs from MintTo in that the decimals value is + /// This instruction differs from `MintTo` in that the decimals value is /// checked by the caller. This may be useful when creating transactions /// offline or within a hardware wallet. /// @@ -384,7 +384,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The mint. /// 1. `[writable]` The account to mint tokens to. /// 2. `[]` The mint's multisignature mint-tokens authority. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. MintToChecked { /// The amount of new tokens to mint. amount: u64, @@ -396,9 +396,9 @@ pub enum TokenInstruction<'a> { /// support accounts associated with the native mint, use `CloseAccount` /// instead. /// - /// This instruction differs from Burn in that the decimals value is checked - /// by the caller. This may be useful when creating transactions offline or - /// within a hardware wallet. + /// This instruction differs from `Burn` in that the decimals value is + /// checked by the caller. This may be useful when creating transactions + /// offline or within a hardware wallet. /// /// Accounts expected by this instruction: /// @@ -411,14 +411,14 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The account to burn from. /// 1. `[writable]` The token mint. /// 2. `[]` The account's multisignature owner/delegate. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. BurnChecked { /// The amount of tokens to burn. amount: u64, /// Expected number of base 10 digits to the right of the decimal place. decimals: u8, }, - /// Like InitializeAccount, but the owner pubkey is passed via instruction + /// Like `InitializeAccount`, but the owner pubkey is passed via instruction /// data rather than the accounts list. This variant may be preferable /// when using Cross Program Invocation from an instruction that does /// not need the owner's `AccountInfo` otherwise. @@ -444,7 +444,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The native token account to sync with its underlying /// lamports. SyncNative, - /// Like InitializeAccount2, but does not require the Rent sysvar to be + /// Like `InitializeAccount2`, but does not require the Rent sysvar to be /// provided /// /// Accounts expected by this instruction: @@ -456,21 +456,22 @@ pub enum TokenInstruction<'a> { #[cfg_attr(feature = "serde-traits", serde(with = "As::"))] owner: Pubkey, }, - /// Like InitializeMultisig, but does not require the Rent sysvar to be + /// Like `InitializeMultisig`, but does not require the Rent sysvar to be /// provided /// /// Accounts expected by this instruction: /// /// 0. `[writable]` The multisignature account to initialize. - /// 1. ..1+N. `[]` The signer accounts, must equal to N where 1 <= N <= - /// 11. + /// 1. ..`1+N`. `[]` The signer accounts, must equal to N where `1 <= N <= + /// 11`. InitializeMultisig2 { /// The number of signers (M) required to validate this multisignature /// account. m: u8, }, // 20 - /// Like InitializeMint, but does not require the Rent sysvar to be provided + /// Like `InitializeMint`, but does not require the Rent sysvar to be + /// provided /// /// Accounts expected by this instruction: /// @@ -510,7 +511,7 @@ pub enum TokenInstruction<'a> { /// Data expected by this instruction: /// None InitializeImmutableOwner, - /// Convert an Amount of tokens to a UiAmount `string`, using the given + /// Convert an Amount of tokens to a `UiAmount` string, using the given /// mint. /// /// Fails on an invalid mint. @@ -525,8 +526,8 @@ pub enum TokenInstruction<'a> { /// The amount of tokens to convert. amount: u64, }, - /// Convert a UiAmount of tokens to a little-endian `u64` raw Amount, using - /// the given mint. + /// Convert a `UiAmount` of tokens to a little-endian `u64` raw Amount, + /// using the given mint. /// /// Return data can be fetched using `sol_get_return_data` and deserializing /// the return data as a little-endian `u64`. @@ -535,7 +536,7 @@ pub enum TokenInstruction<'a> { /// /// 0. `[]` The mint to calculate for UiAmountToAmount { - /// The ui_amount of tokens to convert. + /// The `ui_amount` of tokens to convert. ui_amount: &'a str, }, // 25 @@ -577,7 +578,7 @@ pub enum TokenInstruction<'a> { /// instruction prefix DefaultAccountStateExtension, /// Check to see if a token account is large enough for a list of - /// ExtensionTypes, and if not, use reallocation to increase the data + /// `ExtensionTypes`, and if not, use reallocation to increase the data /// size. /// /// Accounts expected by this instruction: @@ -593,7 +594,7 @@ pub enum TokenInstruction<'a> { /// 1. `[signer, writable]` The payer account to fund reallocation /// 2. `[]` System program for reallocation funding /// 3. `[]` The account's multisignature owner/delegate. - /// 4. ..4+M `[signer]` M signer accounts. + /// 4. ..`4+M` `[signer]` M signer accounts. Reallocate { /// New extension types to include in the reallocated account extension_types: Vec, @@ -678,14 +679,14 @@ pub enum TokenInstruction<'a> { /// for further details about the extended instructions that share this /// instruction prefix ConfidentialTransferFeeExtension, - /// This instruction is to be used to rescue SOLs sent to any TokenProgram + /// This instruction is to be used to rescue SOL sent to any `TokenProgram` /// owned account by sending them to any other account, leaving behind only /// lamports for rent exemption. /// /// 0. `[writable]` Source Account owned by the token program /// 1. `[writable]` Destination account /// 2. `[signer]` Authority - /// 3. ..2+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. WithdrawExcessLamports, /// The common instruction prefix for metadata pointer extension /// instructions. @@ -714,7 +715,7 @@ pub enum TokenInstruction<'a> { } impl<'a> TokenInstruction<'a> { /// Unpacks a byte buffer into a - /// [TokenInstruction](enum.TokenInstruction.html). + /// [`TokenInstruction`](enum.TokenInstruction.html). pub fn unpack(input: &'a [u8]) -> Result { use TokenError::InvalidInstruction; @@ -855,7 +856,7 @@ impl<'a> TokenInstruction<'a> { }) } - /// Packs a [TokenInstruction](enum.TokenInstruction.html) into a byte + /// Packs a [`TokenInstruction`](enum.TokenInstruction.html) into a byte /// buffer. pub fn pack(&self) -> Vec { let mut buf = Vec::with_capacity(size_of::()); @@ -1085,7 +1086,7 @@ impl<'a> TokenInstruction<'a> { } } -/// Specifies the authority type for SetAuthority instructions +/// Specifies the authority type for `SetAuthority` instructions #[repr(u8)] #[cfg_attr(feature = "serde-traits", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde-traits", serde(rename_all = "camelCase"))] @@ -1109,7 +1110,7 @@ pub enum AuthorityType { InterestRate, /// Authority to transfer or burn any tokens for a mint PermanentDelegate, - /// Authority to update confidential transfer mint and aprove accounts for + /// Authority to update confidential transfer mint and approve accounts for /// confidential transfers ConfidentialTransferMint, /// Authority to set the transfer hook program id @@ -1929,7 +1930,8 @@ pub fn initialize_permanent_delegate( }) } -/// Utility function that checks index is between MIN_SIGNERS and MAX_SIGNERS +/// Utility function that checks index is between `MIN_SIGNERS` and +/// `MAX_SIGNERS` pub fn is_valid_signer_index(index: usize) -> bool { (MIN_SIGNERS..=MAX_SIGNERS).contains(&index) } @@ -1949,11 +1951,29 @@ pub fn decode_instruction_type>(input: &[u8]) -> Result { -/// let FirstData { ... } = decode_instruction_data(input)?; +/// let FirstData { a } = decode_instruction_data(&input).unwrap(); +/// assert_eq!(*a, 1); /// } /// } +/// ``` pub fn decode_instruction_data(input_with_type: &[u8]) -> Result<&T, ProgramError> { if input_with_type.len() != pod_get_packed_len::().saturating_add(1) { Err(ProgramError::InvalidInstructionData) diff --git a/token/program-2022/src/lib.rs b/token/program-2022/src/lib.rs index d803ff4a0ba..4d9969cc3ff 100644 --- a/token/program-2022/src/lib.rs +++ b/token/program-2022/src/lib.rs @@ -126,7 +126,7 @@ pub fn check_zk_elgamal_proof_program_account( Ok(()) } -/// Checks if the spplied program ID is that of the system program +/// Checks if the supplied program ID is that of the system program pub fn check_system_program_account(system_program_id: &Pubkey) -> ProgramResult { if system_program_id != &system_program::id() { return Err(ProgramError::IncorrectProgramId); diff --git a/token/program-2022/src/native_mint.rs b/token/program-2022/src/native_mint.rs index 48c993b0786..490e029a3be 100644 --- a/token/program-2022/src/native_mint.rs +++ b/token/program-2022/src/native_mint.rs @@ -1,12 +1,12 @@ //! The Mint that represents the native token -/// There are 10^9 lamports in one SOL +/// There are `10^9` lamports in one SOL pub const DECIMALS: u8 = 9; // The Mint for native SOL Token accounts solana_program::declare_id!("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP"); -/// Seed for the native_mint's program-derived address +/// Seed for the native mint's program-derived address pub const PROGRAM_ADDRESS_SEEDS: &[&[u8]] = &["native-mint".as_bytes(), &[255]]; #[cfg(test)] diff --git a/token/program-2022/src/pod.rs b/token/program-2022/src/pod.rs index 3e1a71bfa94..a6e68ded0f3 100644 --- a/token/program-2022/src/pod.rs +++ b/token/program-2022/src/pod.rs @@ -71,9 +71,9 @@ pub struct PodAccount { /// If `delegate` is `Some` then `delegated_amount` represents /// the amount authorized by the delegate pub delegate: PodCOption, - /// The account's [AccountState], stored as a u8 + /// The account's [`AccountState`], stored as a `u8` pub state: u8, - /// If is_some, this is a native token, and the value logs the rent-exempt + /// If `is_some`, this is a native token, and the value logs the rent-exempt /// reserve. An Account is required to be rent-exempt, so the value is /// used by the Processor to ensure that wrapped SOL accounts do not /// drop below this threshold. @@ -92,7 +92,7 @@ impl PodAccount { pub fn is_native(&self) -> bool { self.is_native.is_some() } - /// Checks if a token Account's owner is the system_program or the + /// Checks if a token Account's owner is the `system_program` or the /// incinerator pub fn is_owned_by_system_program_or_incinerator(&self) -> bool { solana_program::system_program::check_id(&self.owner) @@ -156,7 +156,7 @@ impl From for PodMultisig { } } -/// COption stored as a Pod type +/// `COption` stored as a Pod type #[repr(C, packed)] #[derive(Clone, Copy, Debug, Default, PartialEq, Pod, Zeroable)] pub struct PodCOption @@ -176,7 +176,7 @@ where /// `Option::Some(v)` pub const SOME: [u8; 4] = [1, 0, 0, 0]; - /// Create a PodCOption equivalent of `Option::None` + /// Create a `PodCOption` equivalent of `Option::None` /// /// This could be made `const` by using `std::mem::zeroed`, but that would /// require `unsafe` code, which is prohibited at the crate level. @@ -187,7 +187,7 @@ where } } - /// Create a PodCOption equivalent of `Option::Some(value)` + /// Create a `PodCOption` equivalent of `Option::Some(value)` pub const fn some(value: T) -> Self { Self { option: Self::SOME, diff --git a/token/program-2022/src/processor.rs b/token/program-2022/src/processor.rs index 697cf042f8a..ee219bbef05 100644 --- a/token/program-2022/src/processor.rs +++ b/token/program-2022/src/processor.rs @@ -108,7 +108,7 @@ impl Processor { Ok(()) } - /// Processes an [InitializeMint](enum.TokenInstruction.html) instruction. + /// Processes an [`InitializeMint`](enum.TokenInstruction.html) instruction. pub fn process_initialize_mint( accounts: &[AccountInfo], decimals: u8, @@ -118,7 +118,8 @@ impl Processor { Self::_process_initialize_mint(accounts, decimals, mint_authority, freeze_authority, true) } - /// Processes an [InitializeMint2](enum.TokenInstruction.html) instruction. + /// Processes an [`InitializeMint2`](enum.TokenInstruction.html) + /// instruction. pub fn process_initialize_mint2( accounts: &[AccountInfo], decimals: u8, @@ -211,19 +212,19 @@ impl Processor { Ok(()) } - /// Processes an [InitializeAccount](enum.TokenInstruction.html) + /// Processes an [`InitializeAccount`](enum.TokenInstruction.html) /// instruction. pub fn process_initialize_account(accounts: &[AccountInfo]) -> ProgramResult { Self::_process_initialize_account(accounts, None, true) } - /// Processes an [InitializeAccount2](enum.TokenInstruction.html) + /// Processes an [`InitializeAccount2`](enum.TokenInstruction.html) /// instruction. pub fn process_initialize_account2(accounts: &[AccountInfo], owner: &Pubkey) -> ProgramResult { Self::_process_initialize_account(accounts, Some(owner), true) } - /// Processes an [InitializeAccount3](enum.TokenInstruction.html) + /// Processes an [`InitializeAccount3`](enum.TokenInstruction.html) /// instruction. pub fn process_initialize_account3(accounts: &[AccountInfo], owner: &Pubkey) -> ProgramResult { Self::_process_initialize_account(accounts, Some(owner), false) @@ -270,19 +271,19 @@ impl Processor { Ok(()) } - /// Processes a [InitializeMultisig](enum.TokenInstruction.html) + /// Processes a [`InitializeMultisig`](enum.TokenInstruction.html) /// instruction. pub fn process_initialize_multisig(accounts: &[AccountInfo], m: u8) -> ProgramResult { Self::_process_initialize_multisig(accounts, m, true) } - /// Processes a [InitializeMultisig2](enum.TokenInstruction.html) + /// Processes a [`InitializeMultisig2`](enum.TokenInstruction.html) /// instruction. pub fn process_initialize_multisig2(accounts: &[AccountInfo], m: u8) -> ProgramResult { Self::_process_initialize_multisig(accounts, m, false) } - /// Processes a [Transfer](enum.TokenInstruction.html) instruction. + /// Processes a [`Transfer`](enum.TokenInstruction.html) instruction. pub fn process_transfer( program_id: &Pubkey, accounts: &[AccountInfo], @@ -544,7 +545,7 @@ impl Processor { Ok(()) } - /// Processes an [Approve](enum.TokenInstruction.html) instruction. + /// Processes an [`Approve`](enum.TokenInstruction.html) instruction. pub fn process_approve( program_id: &Pubkey, accounts: &[AccountInfo], @@ -604,7 +605,7 @@ impl Processor { Ok(()) } - /// Processes an [Revoke](enum.TokenInstruction.html) instruction. + /// Processes an [`Revoke`](enum.TokenInstruction.html) instruction. pub fn process_revoke(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let source_account_info = next_account_info(account_info_iter)?; @@ -638,7 +639,7 @@ impl Processor { Ok(()) } - /// Processes a [SetAuthority](enum.TokenInstruction.html) instruction. + /// Processes a [`SetAuthority`](enum.TokenInstruction.html) instruction. pub fn process_set_authority( program_id: &Pubkey, accounts: &[AccountInfo], @@ -916,7 +917,7 @@ impl Processor { Ok(()) } - /// Processes a [MintTo](enum.TokenInstruction.html) instruction. + /// Processes a [`MintTo`](enum.TokenInstruction.html) instruction. pub fn process_mint_to( program_id: &Pubkey, accounts: &[AccountInfo], @@ -999,7 +1000,7 @@ impl Processor { Ok(()) } - /// Processes a [Burn](enum.TokenInstruction.html) instruction. + /// Processes a [`Burn`](enum.TokenInstruction.html) instruction. pub fn process_burn( program_id: &Pubkey, accounts: &[AccountInfo], @@ -1121,7 +1122,7 @@ impl Processor { Ok(()) } - /// Processes a [CloseAccount](enum.TokenInstruction.html) instruction. + /// Processes a [`CloseAccount`](enum.TokenInstruction.html) instruction. pub fn process_close_account(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let source_account_info = next_account_info(account_info_iter)?; @@ -1216,8 +1217,8 @@ impl Processor { Ok(()) } - /// Processes a [FreezeAccount](enum.TokenInstruction.html) or a - /// [ThawAccount](enum.TokenInstruction.html) instruction. + /// Processes a [`FreezeAccount`](enum.TokenInstruction.html) or a + /// [`ThawAccount`](enum.TokenInstruction.html) instruction. pub fn process_toggle_freeze_account( program_id: &Pubkey, accounts: &[AccountInfo], @@ -1268,7 +1269,7 @@ impl Processor { Ok(()) } - /// Processes a [SyncNative](enum.TokenInstruction.html) instruction + /// Processes a [`SyncNative`](enum.TokenInstruction.html) instruction pub fn process_sync_native(accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let native_account_info = next_account_info(account_info_iter)?; @@ -1298,7 +1299,8 @@ impl Processor { Ok(()) } - /// Processes an [InitializeMintCloseAuthority](enum.TokenInstruction.html) + /// Processes an + /// [`InitializeMintCloseAuthority`](enum.TokenInstruction.html) /// instruction pub fn process_initialize_mint_close_authority( accounts: &[AccountInfo], @@ -1315,7 +1317,8 @@ impl Processor { Ok(()) } - /// Processes a [GetAccountDataSize](enum.TokenInstruction.html) instruction + /// Processes a [`GetAccountDataSize`](enum.TokenInstruction.html) + /// instruction pub fn process_get_account_data_size( accounts: &[AccountInfo], new_extension_types: &[ExtensionType], @@ -1341,7 +1344,7 @@ impl Processor { Ok(()) } - /// Processes an [InitializeImmutableOwner](enum.TokenInstruction.html) + /// Processes an [`InitializeImmutableOwner`](enum.TokenInstruction.html) /// instruction pub fn process_initialize_immutable_owner(accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); @@ -1354,7 +1357,8 @@ impl Processor { .map(|_| ()) } - /// Processes an [AmountToUiAmount](enum.TokenInstruction.html) instruction + /// Processes an [`AmountToUiAmount`](enum.TokenInstruction.html) + /// instruction pub fn process_amount_to_ui_amount(accounts: &[AccountInfo], amount: u64) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let mint_info = next_account_info(account_info_iter)?; @@ -1376,7 +1380,8 @@ impl Processor { Ok(()) } - /// Processes an [AmountToUiAmount](enum.TokenInstruction.html) instruction + /// Processes an [`AmountToUiAmount`](enum.TokenInstruction.html) + /// instruction pub fn process_ui_amount_to_amount(accounts: &[AccountInfo], ui_amount: &str) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let mint_info = next_account_info(account_info_iter)?; @@ -1396,7 +1401,7 @@ impl Processor { Ok(()) } - /// Processes a [CreateNativeMint](enum.TokenInstruction.html) instruction + /// Processes a [`CreateNativeMint`](enum.TokenInstruction.html) instruction pub fn process_create_native_mint(accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let payer_info = next_account_info(account_info_iter)?; @@ -1441,7 +1446,8 @@ impl Processor { ) } - /// Processes an [InitializeNonTransferableMint](enum.TokenInstruction.html) + /// Processes an + /// [`InitializeNonTransferableMint`](enum.TokenInstruction.html) /// instruction pub fn process_initialize_non_transferable_mint(accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); @@ -1454,7 +1460,7 @@ impl Processor { Ok(()) } - /// Processes an [InitializePermanentDelegate](enum.TokenInstruction.html) + /// Processes an [`InitializePermanentDelegate`](enum.TokenInstruction.html) /// instruction pub fn process_initialize_permanent_delegate( accounts: &[AccountInfo], @@ -1472,7 +1478,7 @@ impl Processor { } /// Withdraw Excess Lamports is used to recover Lamports transferred to any - /// TokenProgram owned account by moving them to another account + /// `TokenProgram` owned account by moving them to another account /// of the source account. pub fn process_withdraw_excess_lamports( program_id: &Pubkey, @@ -1545,7 +1551,7 @@ impl Processor { Ok(()) } - /// Processes an [Instruction](enum.Instruction.html). + /// Processes an [`Instruction`](enum.Instruction.html). pub fn process(program_id: &Pubkey, accounts: &[AccountInfo], input: &[u8]) -> ProgramResult { if let Ok(instruction_type) = decode_instruction_type(input) { match instruction_type { diff --git a/token/program-2022/src/serialization.rs b/token/program-2022/src/serialization.rs index 8d337c1903d..583ed0cc904 100644 --- a/token/program-2022/src/serialization.rs +++ b/token/program-2022/src/serialization.rs @@ -1,7 +1,7 @@ -//! serialization module - contains helpers for serde types from other crates, +//! Serialization module - contains helpers for serde types from other crates, //! deserialization visitors -/// helper function to ser/deser COption wrapped values +/// Helper function to serialize / deserialize `COption` wrapped values pub mod coption_fromstr { use { serde::{ @@ -16,7 +16,7 @@ pub mod coption_fromstr { }, }; - /// serialize values supporting Display trait wrapped in COption + /// Serialize values supporting `Display` trait wrapped in `COption` pub fn serialize(x: &COption, s: S) -> Result where S: Serializer, @@ -66,7 +66,7 @@ pub mod coption_fromstr { } } - /// deserialize values supporting Display trait wrapped in COption + /// Deserialize values supporting `Display` trait wrapped in `COption` pub fn deserialize<'de, D, T>(d: D) -> Result, D::Error> where D: Deserializer<'de>, @@ -76,7 +76,7 @@ pub mod coption_fromstr { } } -/// helper to ser/deser PodAeCiphertext values +/// Helper to serialize / deserialize `PodAeCiphertext` values pub mod aeciphertext_fromstr { use { serde::{ @@ -87,7 +87,7 @@ pub mod aeciphertext_fromstr { std::{fmt, str::FromStr}, }; - /// serialize AeCiphertext values supporting Display trait + /// Serialize `AeCiphertext` values supporting `Display` trait pub fn serialize(x: &PodAeCiphertext, s: S) -> Result where S: Serializer, @@ -112,7 +112,7 @@ pub mod aeciphertext_fromstr { } } - /// deserialize AeCiphertext values from str + /// Deserialize `AeCiphertext` values from `str` pub fn deserialize<'de, D>(d: D) -> Result where D: Deserializer<'de>, @@ -121,7 +121,7 @@ pub mod aeciphertext_fromstr { } } -/// helper to ser/deser PodElGamalPubkey values +/// Helper to serialize / deserialize `PodElGamalPubkey` values pub mod elgamalpubkey_fromstr { use { serde::{ @@ -132,7 +132,7 @@ pub mod elgamalpubkey_fromstr { std::{fmt, str::FromStr}, }; - /// serialize ElGamalPubkey values supporting Display trait + /// Serialize `ElGamalPubkey` values supporting `Display` trait pub fn serialize(x: &PodElGamalPubkey, s: S) -> Result where S: Serializer, @@ -157,7 +157,7 @@ pub mod elgamalpubkey_fromstr { } } - /// deserialize ElGamalPubkey values from str + /// Deserialize `ElGamalPubkey` values from `str` pub fn deserialize<'de, D>(d: D) -> Result where D: Deserializer<'de>, @@ -166,7 +166,7 @@ pub mod elgamalpubkey_fromstr { } } -/// helper to ser/deser PodElGamalCiphertext values +/// Helper to serialize / deserialize `PodElGamalCiphertext` values pub mod elgamalciphertext_fromstr { use { serde::{ @@ -177,7 +177,7 @@ pub mod elgamalciphertext_fromstr { std::{fmt, str::FromStr}, }; - /// serialize ElGamalCiphertext values supporting Display trait + /// Serialize `ElGamalCiphertext` values supporting `Display` trait pub fn serialize(x: &PodElGamalCiphertext, s: S) -> Result where S: Serializer, @@ -202,7 +202,7 @@ pub mod elgamalciphertext_fromstr { } } - /// deserialize ElGamalCiphertext values from str + /// Deserialize `ElGamalCiphertext` values from `str` pub fn deserialize<'de, D>(d: D) -> Result where D: Deserializer<'de>, diff --git a/token/program-2022/src/state.rs b/token/program-2022/src/state.rs index 40e9f76a64e..ba999e603e3 100644 --- a/token/program-2022/src/state.rs +++ b/token/program-2022/src/state.rs @@ -113,7 +113,7 @@ pub struct Account { pub delegate: COption, /// The account's state pub state: AccountState, - /// If is_some, this is a native token, and the value logs the rent-exempt + /// If `is_some`, this is a native token, and the value logs the rent-exempt /// reserve. An Account is required to be rent-exempt, so the value is /// used by the Processor to ensure that wrapped SOL accounts do not /// drop below this threshold. @@ -132,7 +132,7 @@ impl Account { pub fn is_native(&self) -> bool { self.is_native.is_some() } - /// Checks if a token Account's owner is the system_program or the + /// Checks if a token Account's owner is the `system_program` or the /// incinerator pub fn is_owned_by_system_program_or_incinerator(&self) -> bool { solana_program::system_program::check_id(&self.owner) diff --git a/token/program/README.md b/token/program/README.md index 02cbb7c6726..81167bfdded 100644 --- a/token/program/README.md +++ b/token/program/README.md @@ -5,7 +5,7 @@ A token program on the Solana blockchain, usable for fungible and non-fungible t This program provides an interface and implementation that third parties can utilize to create and use their tokens. -Full documentation is available at https://spl.solana.com/token +Full documentation is available at the [SPL Token docs](https://spl.solana.com/token). ## Audit diff --git a/token/program/src/instruction.rs b/token/program/src/instruction.rs index ede7308e34a..b797a7d8c45 100644 --- a/token/program/src/instruction.rs +++ b/token/program/src/instruction.rs @@ -16,7 +16,7 @@ use { pub const MIN_SIGNERS: usize = 1; /// Maximum number of multisignature signers (max N) pub const MAX_SIGNERS: usize = 11; -/// Serialized length of a u64, for unpacking +/// Serialized length of a `u64`, for unpacking const U64_BYTES: usize = 8; /// Instructions supported by the token program. @@ -80,8 +80,8 @@ pub enum TokenInstruction<'a> { /// /// 0. `[writable]` The multisignature account to initialize. /// 1. `[]` Rent sysvar - /// 2. ..2+N. `[]` The signer accounts, must equal to N where 1 <= N <= - /// 11. + /// 2. ..`2+N`. `[]` The signer accounts, must equal to N where `1 <= N <= + /// 11`. InitializeMultisig { /// The number of signers (M) required to validate this multisignature /// account. @@ -103,7 +103,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The source account. /// 1. `[writable]` The destination account. /// 2. `[]` The source account's multisignature owner/delegate. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. Transfer { /// The amount of tokens to transfer. amount: u64, @@ -122,7 +122,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The source account. /// 1. `[]` The delegate. /// 2. `[]` The source account's multisignature owner. - /// 3. ..3+M `[signer]` M signer accounts + /// 3. ..`3+M` `[signer]` M signer accounts Approve { /// The amount of tokens the delegate is approved for. amount: u64, @@ -138,7 +138,7 @@ pub enum TokenInstruction<'a> { /// * Multisignature owner /// 0. `[writable]` The source account. /// 1. `[]` The source account's multisignature owner. - /// 2. ..2+M `[signer]` M signer accounts + /// 2. ..`2+M` `[signer]` M signer accounts Revoke, /// Sets a new authority of a mint or account. /// @@ -151,7 +151,7 @@ pub enum TokenInstruction<'a> { /// * Multisignature authority /// 0. `[writable]` The mint or account to change the authority of. /// 1. `[]` The mint's or account's current multisignature authority. - /// 2. ..2+M `[signer]` M signer accounts + /// 2. ..`2+M` `[signer]` M signer accounts SetAuthority { /// The type of authority to update. authority_type: AuthorityType, @@ -172,7 +172,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The mint. /// 1. `[writable]` The account to mint tokens to. /// 2. `[]` The mint's multisignature mint-tokens authority. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. MintTo { /// The amount of new tokens to mint. amount: u64, @@ -191,7 +191,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The account to burn from. /// 1. `[writable]` The token mint. /// 2. `[]` The account's multisignature owner/delegate. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. Burn { /// The amount of tokens to burn. amount: u64, @@ -210,9 +210,9 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The account to close. /// 1. `[writable]` The destination account. /// 2. `[]` The account's multisignature owner. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. CloseAccount, - /// Freeze an Initialized account using the Mint's freeze_authority (if + /// Freeze an Initialized account using the Mint's `freeze_authority` (if /// set). /// /// Accounts expected by this instruction: @@ -226,9 +226,9 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The account to freeze. /// 1. `[]` The token mint. /// 2. `[]` The mint's multisignature freeze authority. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. FreezeAccount, - /// Thaw a Frozen account using the Mint's freeze_authority (if set). + /// Thaw a Frozen account using the Mint's `freeze_authority` (if set). /// /// Accounts expected by this instruction: /// @@ -241,7 +241,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The account to freeze. /// 1. `[]` The token mint. /// 2. `[]` The mint's multisignature freeze authority. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. ThawAccount, /// Transfers tokens from one account to another either directly or via a @@ -266,7 +266,7 @@ pub enum TokenInstruction<'a> { /// 1. `[]` The token mint. /// 2. `[writable]` The destination account. /// 3. `[]` The source account's multisignature owner/delegate. - /// 4. ..4+M `[signer]` M signer accounts. + /// 4. ..`4+M` `[signer]` M signer accounts. TransferChecked { /// The amount of tokens to transfer. amount: u64, @@ -293,7 +293,7 @@ pub enum TokenInstruction<'a> { /// 1. `[]` The token mint. /// 2. `[]` The delegate. /// 3. `[]` The source account's multisignature owner. - /// 4. ..4+M `[signer]` M signer accounts + /// 4. ..`4+M` `[signer]` M signer accounts ApproveChecked { /// The amount of tokens the delegate is approved for. amount: u64, @@ -303,8 +303,8 @@ pub enum TokenInstruction<'a> { /// Mints new tokens to an account. The native mint does not support /// minting. /// - /// This instruction differs from MintTo in that the decimals value is - /// checked by the caller. This may be useful when creating transactions + /// This instruction differs from `MintTo` in that the decimals value is + /// checked by the caller. This may be useful when creating transactions /// offline or within a hardware wallet. /// /// Accounts expected by this instruction: @@ -318,7 +318,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The mint. /// 1. `[writable]` The account to mint tokens to. /// 2. `[]` The mint's multisignature mint-tokens authority. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. MintToChecked { /// The amount of new tokens to mint. amount: u64, @@ -344,17 +344,17 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The account to burn from. /// 1. `[writable]` The token mint. /// 2. `[]` The account's multisignature owner/delegate. - /// 3. ..3+M `[signer]` M signer accounts. + /// 3. ..`3+M` `[signer]` M signer accounts. BurnChecked { /// The amount of tokens to burn. amount: u64, /// Expected number of base 10 digits to the right of the decimal place. decimals: u8, }, - /// Like InitializeAccount, but the owner pubkey is passed via instruction - /// data rather than the accounts list. This variant may be preferable - /// when using Cross Program Invocation from an instruction that does - /// not need the owner's `AccountInfo` otherwise. + /// Like [`InitializeAccount`], but the owner pubkey is passed via + /// instruction data rather than the accounts list. This variant may be + /// preferable when using Cross Program Invocation from an instruction + /// that does not need the owner's `AccountInfo` otherwise. /// /// Accounts expected by this instruction: /// @@ -376,7 +376,7 @@ pub enum TokenInstruction<'a> { /// 0. `[writable]` The native token account to sync with its underlying /// lamports. SyncNative, - /// Like InitializeAccount2, but does not require the Rent sysvar to be + /// Like [`InitializeAccount2`], but does not require the Rent sysvar to be /// provided /// /// Accounts expected by this instruction: @@ -387,14 +387,14 @@ pub enum TokenInstruction<'a> { /// The new account's owner/multisignature. owner: Pubkey, }, - /// Like InitializeMultisig, but does not require the Rent sysvar to be + /// Like [`InitializeMultisig`], but does not require the Rent sysvar to be /// provided /// /// Accounts expected by this instruction: /// /// 0. `[writable]` The multisignature account to initialize. - /// 1. ..1+N. `[]` The signer accounts, must equal to N where 1 <= N <= - /// 11. + /// 1. ..`1+N` `[]` The signer accounts, must equal to N where `1 <= N <= + /// 11`. InitializeMultisig2 { /// The number of signers (M) required to validate this multisignature /// account. @@ -439,7 +439,7 @@ pub enum TokenInstruction<'a> { /// Data expected by this instruction: /// None InitializeImmutableOwner, - /// Convert an Amount of tokens to a UiAmount `string`, using the given + /// Convert an Amount of tokens to a `UiAmount` string, using the given /// mint. In this version of the program, the mint can only specify the /// number of decimals. /// @@ -455,9 +455,9 @@ pub enum TokenInstruction<'a> { /// The amount of tokens to reformat. amount: u64, }, - /// Convert a UiAmount of tokens to a little-endian `u64` raw Amount, using - /// the given mint. In this version of the program, the mint can only - /// specify the number of decimals. + /// Convert a `UiAmount` of tokens to a little-endian `u64` raw Amount, + /// using the given mint. In this version of the program, the mint can + /// only specify the number of decimals. /// /// Return data can be fetched using `sol_get_return_data` and deserializing /// the return data as a little-endian `u64`. @@ -466,7 +466,7 @@ pub enum TokenInstruction<'a> { /// /// 0. `[]` The mint to calculate for UiAmountToAmount { - /// The ui_amount of tokens to reformat. + /// The `ui_amount` of tokens to reformat. ui_amount: &'a str, }, // Any new variants also need to be added to program-2022 `TokenInstruction`, so that the @@ -475,7 +475,7 @@ pub enum TokenInstruction<'a> { } impl<'a> TokenInstruction<'a> { /// Unpacks a byte buffer into a - /// [TokenInstruction](enum.TokenInstruction.html). + /// [`TokenInstruction`](enum.TokenInstruction.html). pub fn unpack(input: &'a [u8]) -> Result { use TokenError::InvalidInstruction; @@ -579,7 +579,7 @@ impl<'a> TokenInstruction<'a> { }) } - /// Packs a [TokenInstruction](enum.TokenInstruction.html) into a byte + /// Packs a [`TokenInstruction`](enum.TokenInstruction.html) into a byte /// buffer. pub fn pack(&self) -> Vec { let mut buf = Vec::with_capacity(size_of::()); @@ -738,7 +738,7 @@ impl<'a> TokenInstruction<'a> { } } -/// Specifies the authority type for SetAuthority instructions +/// Specifies the authority type for `SetAuthority` instructions #[repr(u8)] #[derive(Clone, Debug, PartialEq)] pub enum AuthorityType { @@ -1431,7 +1431,8 @@ pub fn ui_amount_to_amount( }) } -/// Utility function that checks index is between MIN_SIGNERS and MAX_SIGNERS +/// Utility function that checks index is between `MIN_SIGNERS` and +/// `MAX_SIGNERS` pub fn is_valid_signer_index(index: usize) -> bool { (MIN_SIGNERS..=MAX_SIGNERS).contains(&index) } diff --git a/token/program/src/native_mint.rs b/token/program/src/native_mint.rs index 37f75555547..bd489eee14f 100644 --- a/token/program/src/native_mint.rs +++ b/token/program/src/native_mint.rs @@ -1,6 +1,6 @@ //! The Mint that represents the native token -/// There are 10^9 lamports in one SOL +/// There are `10^9` lamports in one SOL pub const DECIMALS: u8 = 9; // The Mint for native SOL Token accounts diff --git a/token/program/src/processor.rs b/token/program/src/processor.rs index 550df44320e..4702693abae 100644 --- a/token/program/src/processor.rs +++ b/token/program/src/processor.rs @@ -61,7 +61,7 @@ impl Processor { Ok(()) } - /// Processes an [InitializeMint](enum.TokenInstruction.html) instruction. + /// Processes an [`InitializeMint`](enum.TokenInstruction.html) instruction. pub fn process_initialize_mint( accounts: &[AccountInfo], decimals: u8, @@ -71,7 +71,8 @@ impl Processor { Self::_process_initialize_mint(accounts, decimals, mint_authority, freeze_authority, true) } - /// Processes an [InitializeMint2](enum.TokenInstruction.html) instruction. + /// Processes an [`InitializeMint2`](enum.TokenInstruction.html) + /// instruction. pub fn process_initialize_mint2( accounts: &[AccountInfo], decimals: u8, @@ -141,7 +142,7 @@ impl Processor { Ok(()) } - /// Processes an [InitializeAccount](enum.TokenInstruction.html) + /// Processes an [`InitializeAccount`](enum.TokenInstruction.html) /// instruction. pub fn process_initialize_account( program_id: &Pubkey, @@ -150,7 +151,7 @@ impl Processor { Self::_process_initialize_account(program_id, accounts, None, true) } - /// Processes an [InitializeAccount2](enum.TokenInstruction.html) + /// Processes an [`InitializeAccount2`](enum.TokenInstruction.html) /// instruction. pub fn process_initialize_account2( program_id: &Pubkey, @@ -160,7 +161,7 @@ impl Processor { Self::_process_initialize_account(program_id, accounts, Some(&owner), true) } - /// Processes an [InitializeAccount3](enum.TokenInstruction.html) + /// Processes an [`InitializeAccount3`](enum.TokenInstruction.html) /// instruction. pub fn process_initialize_account3( program_id: &Pubkey, @@ -212,19 +213,19 @@ impl Processor { Ok(()) } - /// Processes a [InitializeMultisig](enum.TokenInstruction.html) + /// Processes a [`InitializeMultisig`](enum.TokenInstruction.html) /// instruction. pub fn process_initialize_multisig(accounts: &[AccountInfo], m: u8) -> ProgramResult { Self::_process_initialize_multisig(accounts, m, true) } - /// Processes a [InitializeMultisig2](enum.TokenInstruction.html) + /// Processes a [`InitializeMultisig2`](enum.TokenInstruction.html) /// instruction. pub fn process_initialize_multisig2(accounts: &[AccountInfo], m: u8) -> ProgramResult { Self::_process_initialize_multisig(accounts, m, false) } - /// Processes a [Transfer](enum.TokenInstruction.html) instruction. + /// Processes a [`Transfer`](enum.TokenInstruction.html) instruction. pub fn process_transfer( program_id: &Pubkey, accounts: &[AccountInfo], @@ -341,7 +342,7 @@ impl Processor { Ok(()) } - /// Processes an [Approve](enum.TokenInstruction.html) instruction. + /// Processes an [`Approve`](enum.TokenInstruction.html) instruction. pub fn process_approve( program_id: &Pubkey, accounts: &[AccountInfo], @@ -392,7 +393,7 @@ impl Processor { Ok(()) } - /// Processes an [Revoke](enum.TokenInstruction.html) instruction. + /// Processes an [`Revoke`](enum.TokenInstruction.html) instruction. pub fn process_revoke(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let source_account_info = next_account_info(account_info_iter)?; @@ -420,7 +421,7 @@ impl Processor { Ok(()) } - /// Processes a [SetAuthority](enum.TokenInstruction.html) instruction. + /// Processes a [`SetAuthority`](enum.TokenInstruction.html) instruction. pub fn process_set_authority( program_id: &Pubkey, accounts: &[AccountInfo], @@ -518,7 +519,7 @@ impl Processor { Ok(()) } - /// Processes a [MintTo](enum.TokenInstruction.html) instruction. + /// Processes a [`MintTo`](enum.TokenInstruction.html) instruction. pub fn process_mint_to( program_id: &Pubkey, accounts: &[AccountInfo], @@ -583,7 +584,7 @@ impl Processor { Ok(()) } - /// Processes a [Burn](enum.TokenInstruction.html) instruction. + /// Processes a [`Burn`](enum.TokenInstruction.html) instruction. pub fn process_burn( program_id: &Pubkey, accounts: &[AccountInfo], @@ -668,7 +669,7 @@ impl Processor { Ok(()) } - /// Processes a [CloseAccount](enum.TokenInstruction.html) instruction. + /// Processes a [`CloseAccount`](enum.TokenInstruction.html) instruction. pub fn process_close_account(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let source_account_info = next_account_info(account_info_iter)?; @@ -709,8 +710,8 @@ impl Processor { Ok(()) } - /// Processes a [FreezeAccount](enum.TokenInstruction.html) or a - /// [ThawAccount](enum.TokenInstruction.html) instruction. + /// Processes a [`FreezeAccount`](enum.TokenInstruction.html) or a + /// [`ThawAccount`](enum.TokenInstruction.html) instruction. pub fn process_toggle_freeze_account( program_id: &Pubkey, accounts: &[AccountInfo], @@ -754,7 +755,7 @@ impl Processor { Ok(()) } - /// Processes a [SyncNative](enum.TokenInstruction.html) instruction + /// Processes a [`SyncNative`](enum.TokenInstruction.html) instruction pub fn process_sync_native(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); let native_account_info = next_account_info(account_info_iter)?; @@ -779,7 +780,8 @@ impl Processor { Ok(()) } - /// Processes a [GetAccountDataSize](enum.TokenInstruction.html) instruction + /// Processes a [`GetAccountDataSize`](enum.TokenInstruction.html) + /// instruction pub fn process_get_account_data_size( program_id: &Pubkey, accounts: &[AccountInfo], @@ -794,7 +796,7 @@ impl Processor { Ok(()) } - /// Processes an [InitializeImmutableOwner](enum.TokenInstruction.html) + /// Processes an [`InitializeImmutableOwner`](enum.TokenInstruction.html) /// instruction pub fn process_initialize_immutable_owner(accounts: &[AccountInfo]) -> ProgramResult { let account_info_iter = &mut accounts.iter(); @@ -807,7 +809,8 @@ impl Processor { Ok(()) } - /// Processes an [AmountToUiAmount](enum.TokenInstruction.html) instruction + /// Processes an [`AmountToUiAmount`](enum.TokenInstruction.html) + /// instruction pub fn process_amount_to_ui_amount( program_id: &Pubkey, accounts: &[AccountInfo], @@ -825,7 +828,8 @@ impl Processor { Ok(()) } - /// Processes an [AmountToUiAmount](enum.TokenInstruction.html) instruction + /// Processes an [`AmountToUiAmount`](enum.TokenInstruction.html) + /// instruction pub fn process_ui_amount_to_amount( program_id: &Pubkey, accounts: &[AccountInfo], @@ -843,7 +847,7 @@ impl Processor { Ok(()) } - /// Processes an [Instruction](enum.Instruction.html). + /// Processes an [`Instruction`](enum.Instruction.html). pub fn process(program_id: &Pubkey, accounts: &[AccountInfo], input: &[u8]) -> ProgramResult { let instruction = TokenInstruction::unpack(input)?; diff --git a/token/program/src/state.rs b/token/program/src/state.rs index fe23fbaafc4..f7595e793ec 100644 --- a/token/program/src/state.rs +++ b/token/program/src/state.rs @@ -98,7 +98,7 @@ pub struct Account { pub delegate: COption, /// The account's state pub state: AccountState, - /// If is_native.is_some, this is a native token, and the value logs the + /// If `is_native.is_some`, this is a native token, and the value logs the /// rent-exempt reserve. An Account is required to be rent-exempt, so /// the value is used by the Processor to ensure that wrapped SOL /// accounts do not drop below this threshold. @@ -117,7 +117,7 @@ impl Account { pub fn is_native(&self) -> bool { self.is_native.is_some() } - /// Checks if a token Account's owner is the system_program or the + /// Checks if a token Account's owner is the `system_program` or the /// incinerator pub fn is_owned_by_system_program_or_incinerator(&self) -> bool { solana_program::system_program::check_id(&self.owner) @@ -344,7 +344,7 @@ pub trait GenericTokenAccount { pub const ACCOUNT_INITIALIZED_INDEX: usize = 108; /// Check if the account data buffer represents an initialized account. -/// This is checking the `state` (AccountState) field of an Account object. +/// This is checking the `state` (`AccountState`) field of an Account object. pub fn is_initialized_account(account_data: &[u8]) -> bool { *account_data .get(ACCOUNT_INITIALIZED_INDEX) diff --git a/token/transfer-hook/example/README.md b/token/transfer-hook/example/README.md index f3d2aef4a4b..4f490729e9e 100644 --- a/token/transfer-hook/example/README.md +++ b/token/transfer-hook/example/README.md @@ -10,7 +10,7 @@ code for more information. ### Example usage of example When testing your program that uses `spl-transfer-hook-interface`, you can also -import this crate, and then use it with `solana-program-test`, ie: +import this crate, and then use it with `solana-program-test`: ```rust use { diff --git a/token/transfer-hook/example/src/processor.rs b/token/transfer-hook/example/src/processor.rs index 8bac5a99e88..0a5f4c1144f 100644 --- a/token/transfer-hook/example/src/processor.rs +++ b/token/transfer-hook/example/src/processor.rs @@ -74,7 +74,7 @@ pub fn process_execute( } /// Processes a -/// [InitializeExtraAccountMetaList](enum.TransferHookInstruction.html) +/// [`InitializeExtraAccountMetaList`](enum.TransferHookInstruction.html) /// instruction. pub fn process_initialize_extra_account_meta_list( program_id: &Pubkey, @@ -142,7 +142,7 @@ pub fn process_initialize_extra_account_meta_list( } /// Processes a -/// [UpdateExtraAccountMetaList](enum.TransferHookInstruction.html) +/// [`UpdateExtraAccountMetaList`](enum.TransferHookInstruction.html) /// instruction. pub fn process_update_extra_account_meta_list( program_id: &Pubkey, diff --git a/token/transfer-hook/interface/README.md b/token/transfer-hook/interface/README.md index 376cdb1b1b1..17c320bbc29 100644 --- a/token/transfer-hook/interface/README.md +++ b/token/transfer-hook/interface/README.md @@ -86,7 +86,7 @@ Developers must implement the `Execute` instruction, and optionally the pubkeys into the program-derived address defined by the mint and program id. Note: it's technically not required to implement `InitializeExtraAccountMetaList` -at that instruction descriminator. Your program may implement multiple interfaces, +at that instruction discriminator. Your program may implement multiple interfaces, so any other instruction in your program can create the account at the program-derived address! @@ -98,7 +98,7 @@ automatically resolved! ### Account Resolution -Implementers of the transfer-hook interface are encouraged to make use of the +Implementations of the transfer-hook interface are encouraged to make use of the [spl-tlv-account-resolution](https://github.com/solana-labs/solana-program-library/tree/master/libraries/tlv-account-resolution/README.md) library to manage the additional required accounts for their transfer hook program. diff --git a/token/transfer-hook/interface/src/instruction.rs b/token/transfer-hook/interface/src/instruction.rs index 52419b6fc5d..68485bcbbce 100644 --- a/token/transfer-hook/interface/src/instruction.rs +++ b/token/transfer-hook/interface/src/instruction.rs @@ -25,8 +25,8 @@ pub enum TransferHookInstruction { /// 2. `[]` Destination account /// 3. `[]` Source account's owner/delegate /// 4. `[]` (Optional) Validation account - /// 5. ..5+M `[]` `M` optional additional accounts, written in validation - /// account data + /// 5. ..`5+M` `[]` `M` optional additional accounts, written in + /// validation account data Execute { /// Amount of tokens to transfer amount: u64, @@ -80,7 +80,7 @@ pub struct UpdateExtraAccountMetaListInstruction; impl TransferHookInstruction { /// Unpacks a byte buffer into a - /// [TransferHookInstruction](enum.TransferHookInstruction.html). + /// [`TransferHookInstruction`](enum.TransferHookInstruction.html). pub fn unpack(input: &[u8]) -> Result { if input.len() < ArrayDiscriminator::LENGTH { return Err(ProgramError::InvalidInstructionData); @@ -113,8 +113,8 @@ impl TransferHookInstruction { }) } - /// Packs a [TokenInstruction](enum.TokenInstruction.html) into a byte - /// buffer. + /// Packs a [`TransferHookInstruction`](enum.TransferHookInstruction.html) + /// into a byte buffer. pub fn pack(&self) -> Vec { let mut buf = vec![]; match self { From 7e1f9b24e2d416adca4dc9a8d6019e696c05b02a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:04:42 +0100 Subject: [PATCH 05/52] build(deps-dev): bump rollup from 4.27.2 to 4.27.3 (#7506) Bumps [rollup](https://github.com/rollup/rollup) from 4.27.2 to 4.27.3. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.27.2...v4.27.3) --- updated-dependencies: - dependency-name: rollup dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 192 +++++++++++++++++----------------- stake-pool/js/package.json | 2 +- token-lending/js/package.json | 2 +- 3 files changed, 98 insertions(+), 98 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0b581eb6dd3..60049602e94 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -395,25 +395,25 @@ importers: devDependencies: '@rollup/plugin-alias': specifier: ^5.1.1 - version: 5.1.1(rollup@4.27.2) + version: 5.1.1(rollup@4.27.3) '@rollup/plugin-commonjs': specifier: ^28.0.1 - version: 28.0.1(rollup@4.27.2) + version: 28.0.1(rollup@4.27.3) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.27.2) + version: 6.1.0(rollup@4.27.3) '@rollup/plugin-multi-entry': specifier: ^6.0.0 - version: 6.0.1(rollup@4.27.2) + version: 6.0.1(rollup@4.27.3) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.27.2) + version: 15.3.0(rollup@4.27.3) '@rollup/plugin-terser': specifier: ^0.4.4 - version: 0.4.4(rollup@4.27.2) + version: 0.4.4(rollup@4.27.3) '@rollup/plugin-typescript': specifier: ^12.1.1 - version: 12.1.1(rollup@4.27.2)(tslib@2.8.1)(typescript@5.6.3) + version: 12.1.1(rollup@4.27.3)(tslib@2.8.1)(typescript@5.6.3) '@types/bn.js': specifier: ^5.1.6 version: 5.1.6 @@ -445,11 +445,11 @@ importers: specifier: ^6.0.1 version: 6.0.1 rollup: - specifier: ^4.27.2 - version: 4.27.2 + specifier: ^4.27.3 + version: 4.27.3 rollup-plugin-dts: specifier: ^6.1.1 - version: 6.1.1(rollup@4.27.2)(typescript@5.6.3) + version: 6.1.1(rollup@4.27.3)(typescript@5.6.3) ts-jest: specifier: ^29.2.5 version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.6.3) @@ -532,13 +532,13 @@ importers: devDependencies: '@rollup/plugin-commonjs': specifier: ^28.0.1 - version: 28.0.1(rollup@4.27.2) + version: 28.0.1(rollup@4.27.3) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.27.2) + version: 15.3.0(rollup@4.27.3) '@rollup/plugin-typescript': specifier: ^12.1.1 - version: 12.1.1(rollup@4.27.2)(tslib@2.8.1)(typescript@5.6.3) + version: 12.1.1(rollup@4.27.3)(tslib@2.8.1)(typescript@5.6.3) '@solana/spl-token': specifier: 0.4.9 version: link:../../token/js @@ -564,8 +564,8 @@ importers: specifier: ^6.2.0 version: 6.2.0 rollup: - specifier: ^4.27.2 - version: 4.27.2 + specifier: ^4.27.3 + version: 4.27.3 ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@22.9.0)(typescript@5.6.3) @@ -2179,7 +2179,7 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dev: true - /@rollup/plugin-alias@5.1.1(rollup@4.27.2): + /@rollup/plugin-alias@5.1.1(rollup@4.27.3): resolution: {integrity: sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2188,10 +2188,10 @@ packages: rollup: optional: true dependencies: - rollup: 4.27.2 + rollup: 4.27.3 dev: true - /@rollup/plugin-commonjs@28.0.1(rollup@4.27.2): + /@rollup/plugin-commonjs@28.0.1(rollup@4.27.3): resolution: {integrity: sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==} engines: {node: '>=16.0.0 || 14 >= 14.17'} peerDependencies: @@ -2200,17 +2200,17 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.2) + '@rollup/pluginutils': 5.1.0(rollup@4.27.3) commondir: 1.0.1 estree-walker: 2.0.2 fdir: 6.3.0(picomatch@4.0.2) is-reference: 1.2.1 magic-string: 0.30.10 picomatch: 4.0.2 - rollup: 4.27.2 + rollup: 4.27.3 dev: true - /@rollup/plugin-json@6.1.0(rollup@4.27.2): + /@rollup/plugin-json@6.1.0(rollup@4.27.3): resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2219,11 +2219,11 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.2) - rollup: 4.27.2 + '@rollup/pluginutils': 5.1.0(rollup@4.27.3) + rollup: 4.27.3 dev: true - /@rollup/plugin-multi-entry@6.0.1(rollup@4.27.2): + /@rollup/plugin-multi-entry@6.0.1(rollup@4.27.3): resolution: {integrity: sha512-AXm6toPyTSfbYZWghQGbom1Uh7dHXlrGa+HoiYNhQtDUE3Q7LqoUYdVQx9E1579QWS1uOiu+cZRSE4okO7ySgw==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2232,12 +2232,12 @@ packages: rollup: optional: true dependencies: - '@rollup/plugin-virtual': 3.0.2(rollup@4.27.2) + '@rollup/plugin-virtual': 3.0.2(rollup@4.27.3) matched: 5.0.1 - rollup: 4.27.2 + rollup: 4.27.3 dev: true - /@rollup/plugin-node-resolve@15.3.0(rollup@4.27.2): + /@rollup/plugin-node-resolve@15.3.0(rollup@4.27.3): resolution: {integrity: sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2246,15 +2246,15 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.2) + '@rollup/pluginutils': 5.1.0(rollup@4.27.3) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-module: 1.0.0 resolve: 1.22.8 - rollup: 4.27.2 + rollup: 4.27.3 dev: true - /@rollup/plugin-terser@0.4.4(rollup@4.27.2): + /@rollup/plugin-terser@0.4.4(rollup@4.27.3): resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2263,13 +2263,13 @@ packages: rollup: optional: true dependencies: - rollup: 4.27.2 + rollup: 4.27.3 serialize-javascript: 6.0.1 smob: 1.4.1 terser: 5.24.0 dev: true - /@rollup/plugin-typescript@12.1.1(rollup@4.27.2)(tslib@2.8.1)(typescript@5.6.3): + /@rollup/plugin-typescript@12.1.1(rollup@4.27.3)(tslib@2.8.1)(typescript@5.6.3): resolution: {integrity: sha512-t7O653DpfB5MbFrqPe/VcKFFkvRuFNp9qId3xq4Eth5xlyymzxNpye2z8Hrl0RIMuXTSr5GGcFpkdlMeacUiFQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2282,14 +2282,14 @@ packages: tslib: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.2) + '@rollup/pluginutils': 5.1.0(rollup@4.27.3) resolve: 1.22.8 - rollup: 4.27.2 + rollup: 4.27.3 tslib: 2.8.1 typescript: 5.6.3 dev: true - /@rollup/plugin-virtual@3.0.2(rollup@4.27.2): + /@rollup/plugin-virtual@3.0.2(rollup@4.27.3): resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2298,7 +2298,7 @@ packages: rollup: optional: true dependencies: - rollup: 4.27.2 + rollup: 4.27.3 dev: true /@rollup/pluginutils@4.2.1: @@ -2309,7 +2309,7 @@ packages: picomatch: 2.3.1 dev: true - /@rollup/pluginutils@5.1.0(rollup@4.27.2): + /@rollup/pluginutils@5.1.0(rollup@4.27.3): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2321,147 +2321,147 @@ packages: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 4.27.2 + rollup: 4.27.3 dev: true - /@rollup/rollup-android-arm-eabi@4.27.2: - resolution: {integrity: sha512-Tj+j7Pyzd15wAdSJswvs5CJzJNV+qqSUcr/aCD+jpQSBtXvGnV0pnrjoc8zFTe9fcKCatkpFpOO7yAzpO998HA==} + /@rollup/rollup-android-arm-eabi@4.27.3: + resolution: {integrity: sha512-EzxVSkIvCFxUd4Mgm4xR9YXrcp976qVaHnqom/Tgm+vU79k4vV4eYTjmRvGfeoW8m9LVcsAy/lGjcgVegKEhLQ==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.27.2: - resolution: {integrity: sha512-xsPeJgh2ThBpUqlLgRfiVYBEf/P1nWlWvReG+aBWfNv3XEBpa6ZCmxSVnxJgLgkNz4IbxpLy64h2gCmAAQLneQ==} + /@rollup/rollup-android-arm64@4.27.3: + resolution: {integrity: sha512-LJc5pDf1wjlt9o/Giaw9Ofl+k/vLUaYsE2zeQGH85giX2F+wn/Cg8b3c5CDP3qmVmeO5NzwVUzQQxwZvC2eQKw==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.27.2: - resolution: {integrity: sha512-KnXU4m9MywuZFedL35Z3PuwiTSn/yqRIhrEA9j+7OSkji39NzVkgxuxTYg5F8ryGysq4iFADaU5osSizMXhU2A==} + /@rollup/rollup-darwin-arm64@4.27.3: + resolution: {integrity: sha512-OuRysZ1Mt7wpWJ+aYKblVbJWtVn3Cy52h8nLuNSzTqSesYw1EuN6wKp5NW/4eSre3mp12gqFRXOKTcN3AI3LqA==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.27.2: - resolution: {integrity: sha512-Hj77A3yTvUeCIx/Vi+4d4IbYhyTwtHj07lVzUgpUq9YpJSEiGJj4vXMKwzJ3w5zp5v3PFvpJNgc/J31smZey6g==} + /@rollup/rollup-darwin-x64@4.27.3: + resolution: {integrity: sha512-xW//zjJMlJs2sOrCmXdB4d0uiilZsOdlGQIC/jjmMWT47lkLLoB1nsNhPUcnoqyi5YR6I4h+FjBpILxbEy8JRg==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-freebsd-arm64@4.27.2: - resolution: {integrity: sha512-RjgKf5C3xbn8gxvCm5VgKZ4nn0pRAIe90J0/fdHUsgztd3+Zesb2lm2+r6uX4prV2eUByuxJNdt647/1KPRq5g==} + /@rollup/rollup-freebsd-arm64@4.27.3: + resolution: {integrity: sha512-58E0tIcwZ+12nK1WiLzHOD8I0d0kdrY/+o7yFVPRHuVGY3twBwzwDdTIBGRxLmyjciMYl1B/U515GJy+yn46qw==} cpu: [arm64] os: [freebsd] requiresBuild: true dev: true optional: true - /@rollup/rollup-freebsd-x64@4.27.2: - resolution: {integrity: sha512-duq21FoXwQtuws+V9H6UZ+eCBc7fxSpMK1GQINKn3fAyd9DFYKPJNcUhdIKOrMFjLEJgQskoMoiuizMt+dl20g==} + /@rollup/rollup-freebsd-x64@4.27.3: + resolution: {integrity: sha512-78fohrpcVwTLxg1ZzBMlwEimoAJmY6B+5TsyAZ3Vok7YabRBUvjYTsRXPTjGEvv/mfgVBepbW28OlMEz4w8wGA==} cpu: [x64] os: [freebsd] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.27.2: - resolution: {integrity: sha512-6npqOKEPRZkLrMcvyC/32OzJ2srdPzCylJjiTJT2c0bwwSGm7nz2F9mNQ1WrAqCBZROcQn91Fno+khFhVijmFA==} + /@rollup/rollup-linux-arm-gnueabihf@4.27.3: + resolution: {integrity: sha512-h2Ay79YFXyQi+QZKo3ISZDyKaVD7uUvukEHTOft7kh00WF9mxAaxZsNs3o/eukbeKuH35jBvQqrT61fzKfAB/Q==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-musleabihf@4.27.2: - resolution: {integrity: sha512-V9Xg6eXtgBtHq2jnuQwM/jr2mwe2EycnopO8cbOvpzFuySCGtKlPCI3Hj9xup/pJK5Q0388qfZZy2DqV2J8ftw==} + /@rollup/rollup-linux-arm-musleabihf@4.27.3: + resolution: {integrity: sha512-Sv2GWmrJfRY57urktVLQ0VKZjNZGogVtASAgosDZ1aUB+ykPxSi3X1nWORL5Jk0sTIIwQiPH7iE3BMi9zGWfkg==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.27.2: - resolution: {integrity: sha512-uCFX9gtZJoQl2xDTpRdseYuNqyKkuMDtH6zSrBTA28yTfKyjN9hQ2B04N5ynR8ILCoSDOrG/Eg+J2TtJ1e/CSA==} + /@rollup/rollup-linux-arm64-gnu@4.27.3: + resolution: {integrity: sha512-FPoJBLsPW2bDNWjSrwNuTPUt30VnfM8GPGRoLCYKZpPx0xiIEdFip3dH6CqgoT0RnoGXptaNziM0WlKgBc+OWQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.27.2: - resolution: {integrity: sha512-/PU9P+7Rkz8JFYDHIi+xzHabOu9qEWR07L5nWLIUsvserrxegZExKCi2jhMZRd0ATdboKylu/K5yAXbp7fYFvA==} + /@rollup/rollup-linux-arm64-musl@4.27.3: + resolution: {integrity: sha512-TKxiOvBorYq4sUpA0JT+Fkh+l+G9DScnG5Dqx7wiiqVMiRSkzTclP35pE6eQQYjP4Gc8yEkJGea6rz4qyWhp3g==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.27.2: - resolution: {integrity: sha512-eCHmol/dT5odMYi/N0R0HC8V8QE40rEpkyje/ZAXJYNNoSfrObOvG/Mn+s1F/FJyB7co7UQZZf6FuWnN6a7f4g==} + /@rollup/rollup-linux-powerpc64le-gnu@4.27.3: + resolution: {integrity: sha512-v2M/mPvVUKVOKITa0oCFksnQQ/TqGrT+yD0184/cWHIu0LoIuYHwox0Pm3ccXEz8cEQDLk6FPKd1CCm+PlsISw==} cpu: [ppc64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.27.2: - resolution: {integrity: sha512-DEP3Njr9/ADDln3kNi76PXonLMSSMiCir0VHXxmGSHxCxDfQ70oWjHcJGfiBugzaqmYdTC7Y+8Int6qbnxPBIQ==} + /@rollup/rollup-linux-riscv64-gnu@4.27.3: + resolution: {integrity: sha512-LdrI4Yocb1a/tFVkzmOE5WyYRgEBOyEhWYJe4gsDWDiwnjYKjNs7PS6SGlTDB7maOHF4kxevsuNBl2iOcj3b4A==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-s390x-gnu@4.27.2: - resolution: {integrity: sha512-NHGo5i6IE/PtEPh5m0yw5OmPMpesFnzMIS/lzvN5vknnC1sXM5Z/id5VgcNPgpD+wHmIcuYYgW+Q53v+9s96lQ==} + /@rollup/rollup-linux-s390x-gnu@4.27.3: + resolution: {integrity: sha512-d4wVu6SXij/jyiwPvI6C4KxdGzuZOvJ6y9VfrcleHTwo68fl8vZC5ZYHsCVPUi4tndCfMlFniWgwonQ5CUpQcA==} cpu: [s390x] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.27.2: - resolution: {integrity: sha512-PaW2DY5Tan+IFvNJGHDmUrORadbe/Ceh8tQxi8cmdQVCCYsLoQo2cuaSj+AU+YRX8M4ivS2vJ9UGaxfuNN7gmg==} + /@rollup/rollup-linux-x64-gnu@4.27.3: + resolution: {integrity: sha512-/6bn6pp1fsCGEY5n3yajmzZQAh+mW4QPItbiWxs69zskBzJuheb3tNynEjL+mKOsUSFK11X4LYF2BwwXnzWleA==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.27.2: - resolution: {integrity: sha512-dOlWEMg2gI91Qx5I/HYqOD6iqlJspxLcS4Zlg3vjk1srE67z5T2Uz91yg/qA8sY0XcwQrFzWWiZhMNERylLrpQ==} + /@rollup/rollup-linux-x64-musl@4.27.3: + resolution: {integrity: sha512-nBXOfJds8OzUT1qUreT/en3eyOXd2EH5b0wr2bVB5999qHdGKkzGzIyKYaKj02lXk6wpN71ltLIaQpu58YFBoQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.27.2: - resolution: {integrity: sha512-euMIv/4x5Y2/ImlbGl88mwKNXDsvzbWUlT7DFky76z2keajCtcbAsN9LUdmk31hAoVmJJYSThgdA0EsPeTr1+w==} + /@rollup/rollup-win32-arm64-msvc@4.27.3: + resolution: {integrity: sha512-ogfbEVQgIZOz5WPWXF2HVb6En+kWzScuxJo/WdQTqEgeyGkaa2ui5sQav9Zkr7bnNCLK48uxmmK0TySm22eiuw==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.27.2: - resolution: {integrity: sha512-RsnE6LQkUHlkC10RKngtHNLxb7scFykEbEwOFDjr3CeCMG+Rr+cKqlkKc2/wJ1u4u990urRHCbjz31x84PBrSQ==} + /@rollup/rollup-win32-ia32-msvc@4.27.3: + resolution: {integrity: sha512-ecE36ZBMLINqiTtSNQ1vzWc5pXLQHlf/oqGp/bSbi7iedcjcNb6QbCBNG73Euyy2C+l/fn8qKWEwxr+0SSfs3w==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.27.2: - resolution: {integrity: sha512-foJM5vv+z2KQmn7emYdDLyTbkoO5bkHZE1oth2tWbQNGW7mX32d46Hz6T0MqXdWS2vBZhaEtHqdy9WYwGfiliA==} + /@rollup/rollup-win32-x64-msvc@4.27.3: + resolution: {integrity: sha512-vliZLrDmYKyaUoMzEbMTg2JkerfBjn03KmAw9CykO0Zzkzoyd7o3iZNam/TpyWNjNT+Cz2iO3P9Smv2wgrR+Eg==} cpu: [x64] os: [win32] requiresBuild: true @@ -8401,7 +8401,7 @@ packages: package-json-from-dist: 1.0.0 dev: true - /rollup-plugin-dts@6.1.1(rollup@4.27.2)(typescript@5.6.3): + /rollup-plugin-dts@6.1.1(rollup@4.27.3)(typescript@5.6.3): resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} engines: {node: '>=16'} peerDependencies: @@ -8409,37 +8409,37 @@ packages: typescript: ^4.5 || ^5.0 dependencies: magic-string: 0.30.10 - rollup: 4.27.2 + rollup: 4.27.3 typescript: 5.6.3 optionalDependencies: '@babel/code-frame': 7.26.2 dev: true - /rollup@4.27.2: - resolution: {integrity: sha512-KreA+PzWmk2yaFmZVwe6GB2uBD86nXl86OsDkt1bJS9p3vqWuEQ6HnJJ+j/mZi/q0920P99/MVRlB4L3crpF5w==} + /rollup@4.27.3: + resolution: {integrity: sha512-SLsCOnlmGt9VoZ9Ek8yBK8tAdmPHeppkw+Xa7yDlCEhDTvwYei03JlWo1fdc7YTfLZ4tD8riJCUyAgTbszk1fQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.27.2 - '@rollup/rollup-android-arm64': 4.27.2 - '@rollup/rollup-darwin-arm64': 4.27.2 - '@rollup/rollup-darwin-x64': 4.27.2 - '@rollup/rollup-freebsd-arm64': 4.27.2 - '@rollup/rollup-freebsd-x64': 4.27.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.27.2 - '@rollup/rollup-linux-arm-musleabihf': 4.27.2 - '@rollup/rollup-linux-arm64-gnu': 4.27.2 - '@rollup/rollup-linux-arm64-musl': 4.27.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.27.2 - '@rollup/rollup-linux-riscv64-gnu': 4.27.2 - '@rollup/rollup-linux-s390x-gnu': 4.27.2 - '@rollup/rollup-linux-x64-gnu': 4.27.2 - '@rollup/rollup-linux-x64-musl': 4.27.2 - '@rollup/rollup-win32-arm64-msvc': 4.27.2 - '@rollup/rollup-win32-ia32-msvc': 4.27.2 - '@rollup/rollup-win32-x64-msvc': 4.27.2 + '@rollup/rollup-android-arm-eabi': 4.27.3 + '@rollup/rollup-android-arm64': 4.27.3 + '@rollup/rollup-darwin-arm64': 4.27.3 + '@rollup/rollup-darwin-x64': 4.27.3 + '@rollup/rollup-freebsd-arm64': 4.27.3 + '@rollup/rollup-freebsd-x64': 4.27.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.27.3 + '@rollup/rollup-linux-arm-musleabihf': 4.27.3 + '@rollup/rollup-linux-arm64-gnu': 4.27.3 + '@rollup/rollup-linux-arm64-musl': 4.27.3 + '@rollup/rollup-linux-powerpc64le-gnu': 4.27.3 + '@rollup/rollup-linux-riscv64-gnu': 4.27.3 + '@rollup/rollup-linux-s390x-gnu': 4.27.3 + '@rollup/rollup-linux-x64-gnu': 4.27.3 + '@rollup/rollup-linux-x64-musl': 4.27.3 + '@rollup/rollup-win32-arm64-msvc': 4.27.3 + '@rollup/rollup-win32-ia32-msvc': 4.27.3 + '@rollup/rollup-win32-x64-msvc': 4.27.3 fsevents: 2.3.3 dev: true diff --git a/stake-pool/js/package.json b/stake-pool/js/package.json index 8f8581e21b7..9927f650202 100644 --- a/stake-pool/js/package.json +++ b/stake-pool/js/package.json @@ -69,7 +69,7 @@ "eslint": "^8.57.0", "jest": "^29.0.0", "rimraf": "^6.0.1", - "rollup": "^4.27.2", + "rollup": "^4.27.3", "rollup-plugin-dts": "^6.1.1", "ts-jest": "^29.2.5", "typescript": "^5.6.3" diff --git a/token-lending/js/package.json b/token-lending/js/package.json index 399c3c231e0..916dec940cc 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -52,7 +52,7 @@ "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", "gh-pages": "^6.2.0", - "rollup": "^4.27.2", + "rollup": "^4.27.3", "ts-node": "^10.9.2", "tslib": "^2.8.1", "typedoc": "^0.26.11", From 87290b63c419150b9a48d59cde8a1206ac260f86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 12:04:56 +0100 Subject: [PATCH 06/52] build(deps): bump bytemuck from 1.19.0 to 1.20.0 (#7507) Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.19.0 to 1.20.0. - [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md) - [Commits](https://github.com/Lokathor/bytemuck/compare/v1.19.0...v1.20.0) --- updated-dependencies: - dependency-name: bytemuck dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 4 ++-- libraries/concurrent-merkle-tree/Cargo.toml | 2 +- libraries/discriminator/Cargo.toml | 2 +- libraries/pod/Cargo.toml | 2 +- libraries/tlv-account-resolution/Cargo.toml | 2 +- libraries/type-length-value/Cargo.toml | 2 +- record/program/Cargo.toml | 2 +- stake-pool/program/Cargo.toml | 2 +- token-group/interface/Cargo.toml | 2 +- token-lending/program/Cargo.toml | 2 +- token-wrap/program/Cargo.toml | 2 +- token/client/Cargo.toml | 2 +- token/confidential-transfer/ciphertext-arithmetic/Cargo.toml | 2 +- token/confidential-transfer/elgamal-registry/Cargo.toml | 2 +- token/confidential-transfer/proof-extraction/Cargo.toml | 2 +- token/program-2022-test/Cargo.toml | 2 +- token/program-2022/Cargo.toml | 2 +- token/program/Cargo.toml | 2 +- token/transfer-hook/interface/Cargo.toml | 2 +- 19 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 835a5ccd58f..b4bcf7e770f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -934,9 +934,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" dependencies = [ "bytemuck_derive", ] diff --git a/libraries/concurrent-merkle-tree/Cargo.toml b/libraries/concurrent-merkle-tree/Cargo.toml index cbbbe7e1051..fa2042f0ae9 100644 --- a/libraries/concurrent-merkle-tree/Cargo.toml +++ b/libraries/concurrent-merkle-tree/Cargo.toml @@ -13,7 +13,7 @@ sol-log = ["log"] [dependencies] solana-program = ">=1.18.11,<=2" -bytemuck = "1.19" +bytemuck = "1.20" thiserror = "2.0.3" [dev-dependencies] diff --git a/libraries/discriminator/Cargo.toml b/libraries/discriminator/Cargo.toml index b6a765e32dd..7579c29d3d3 100644 --- a/libraries/discriminator/Cargo.toml +++ b/libraries/discriminator/Cargo.toml @@ -12,7 +12,7 @@ borsh = ["dep:borsh"] [dependencies] borsh = { version = "1", optional = true } -bytemuck = { version = "1.19.0", features = ["derive"] } +bytemuck = { version = "1.20.0", features = ["derive"] } solana-program-error = "2.1.0" solana-sha256-hasher = "2.1.0" spl-discriminator-derive = { version = "0.2.0", path = "./derive" } diff --git a/libraries/pod/Cargo.toml b/libraries/pod/Cargo.toml index 8c342aa83c9..d608230743c 100644 --- a/libraries/pod/Cargo.toml +++ b/libraries/pod/Cargo.toml @@ -13,7 +13,7 @@ borsh = ["dep:borsh"] [dependencies] borsh = { version = "1.5.3", optional = true } -bytemuck = { version = "1.19.0" } +bytemuck = { version = "1.20.0" } bytemuck_derive = { version = "1.8.0" } num-derive = "0.4" num-traits = "0.2" diff --git a/libraries/tlv-account-resolution/Cargo.toml b/libraries/tlv-account-resolution/Cargo.toml index 343e5a97474..82c0c473aa0 100644 --- a/libraries/tlv-account-resolution/Cargo.toml +++ b/libraries/tlv-account-resolution/Cargo.toml @@ -12,7 +12,7 @@ serde-traits = ["dep:serde"] test-sbf = [] [dependencies] -bytemuck = { version = "1.19.0", features = ["derive"] } +bytemuck = { version = "1.20.0", features = ["derive"] } num-derive = "0.4" num-traits = "0.2" serde = { version = "1.0.215", optional = true } diff --git a/libraries/type-length-value/Cargo.toml b/libraries/type-length-value/Cargo.toml index 5b2d658d8a1..63da3aeee59 100644 --- a/libraries/type-length-value/Cargo.toml +++ b/libraries/type-length-value/Cargo.toml @@ -12,7 +12,7 @@ exclude = ["js/**"] derive = ["dep:spl-type-length-value-derive"] [dependencies] -bytemuck = { version = "1.19.0", features = ["derive"] } +bytemuck = { version = "1.20.0", features = ["derive"] } num-derive = "0.4" num-traits = "0.2" solana-account-info = "2.1.0" diff --git a/record/program/Cargo.toml b/record/program/Cargo.toml index adde60fdc05..669a295ed0d 100644 --- a/record/program/Cargo.toml +++ b/record/program/Cargo.toml @@ -12,7 +12,7 @@ no-entrypoint = [] test-sbf = [] [dependencies] -bytemuck = { version = "1.19.0", features = ["derive"] } +bytemuck = { version = "1.20.0", features = ["derive"] } num-derive = "0.4" num-traits = "0.2" solana-account-info = "2.1.0" diff --git a/stake-pool/program/Cargo.toml b/stake-pool/program/Cargo.toml index fb2623cb5a8..0dc885840d2 100644 --- a/stake-pool/program/Cargo.toml +++ b/stake-pool/program/Cargo.toml @@ -14,7 +14,7 @@ test-sbf = [] [dependencies] arrayref = "0.3.9" borsh = "1.5.3" -bytemuck = "1.19" +bytemuck = "1.20" num-derive = "0.4" num-traits = "0.2" num_enum = "0.7.3" diff --git a/token-group/interface/Cargo.toml b/token-group/interface/Cargo.toml index 96ae3a136c5..655cf235be5 100644 --- a/token-group/interface/Cargo.toml +++ b/token-group/interface/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0" edition = "2021" [dependencies] -bytemuck = "1.19.0" +bytemuck = "1.20.0" num-derive = "0.4" num-traits = "0.2" solana-decode-error = "2.1.0" diff --git a/token-lending/program/Cargo.toml b/token-lending/program/Cargo.toml index d9e589dcf3f..309ba56b39a 100644 --- a/token-lending/program/Cargo.toml +++ b/token-lending/program/Cargo.toml @@ -13,7 +13,7 @@ test-sbf = [] [dependencies] arrayref = "0.3.9" -bytemuck = "1.19.0" +bytemuck = "1.20.0" num-derive = "0.4" num-traits = "0.2" solana-program = "2.1.0" diff --git a/token-wrap/program/Cargo.toml b/token-wrap/program/Cargo.toml index abe82957acc..371f4aa9dc4 100644 --- a/token-wrap/program/Cargo.toml +++ b/token-wrap/program/Cargo.toml @@ -12,7 +12,7 @@ no-entrypoint = [] test-sbf = [] [dependencies] -bytemuck = { version = "1.19.0", features = ["derive"] } +bytemuck = { version = "1.20.0", features = ["derive"] } num_enum = "0.7" solana-program = "2.1.0" spl-associated-token-account = { version = "6.0.0", path = "../../associated-token-account/program", features = ["no-entrypoint"] } diff --git a/token/client/Cargo.toml b/token/client/Cargo.toml index 375e6b0b147..4622d6b5d39 100644 --- a/token/client/Cargo.toml +++ b/token/client/Cargo.toml @@ -10,7 +10,7 @@ version = "0.13.0" [dependencies] async-trait = "0.1" bincode = "1.3.2" -bytemuck = "1.19.0" +bytemuck = "1.20.0" futures = "0.3.31" futures-util = "0.3" solana-banks-interface = "2.1.0" diff --git a/token/confidential-transfer/ciphertext-arithmetic/Cargo.toml b/token/confidential-transfer/ciphertext-arithmetic/Cargo.toml index bf3c1e4200d..51eba041460 100644 --- a/token/confidential-transfer/ciphertext-arithmetic/Cargo.toml +++ b/token/confidential-transfer/ciphertext-arithmetic/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" [dependencies] base64 = "0.22.1" -bytemuck = "1.19.0" +bytemuck = "1.20.0" solana-curve25519 = "2.1.0" solana-zk-sdk = "2.1.0" diff --git a/token/confidential-transfer/elgamal-registry/Cargo.toml b/token/confidential-transfer/elgamal-registry/Cargo.toml index 911a6ca8cbb..b9e7326b7d9 100644 --- a/token/confidential-transfer/elgamal-registry/Cargo.toml +++ b/token/confidential-transfer/elgamal-registry/Cargo.toml @@ -12,7 +12,7 @@ no-entrypoint = [] test-sbf = [] [dependencies] -bytemuck = { version = "1.18.0", features = ["derive"] } +bytemuck = { version = "1.20.0", features = ["derive"] } solana-program = "2.1.0" solana-zk-sdk = "2.1.0" spl-pod = { version = "0.5.0", path = "../../../libraries/pod" } diff --git a/token/confidential-transfer/proof-extraction/Cargo.toml b/token/confidential-transfer/proof-extraction/Cargo.toml index 7e426c24166..5ce7efdd57e 100644 --- a/token/confidential-transfer/proof-extraction/Cargo.toml +++ b/token/confidential-transfer/proof-extraction/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0" edition = "2021" [dependencies] -bytemuck = "1.19.0" +bytemuck = "1.20.0" solana-curve25519 = "2.1.0" solana-program = "2.1.0" solana-zk-sdk = "2.1.0" diff --git a/token/program-2022-test/Cargo.toml b/token/program-2022-test/Cargo.toml index 20d4f2c2084..3edc32f8c41 100644 --- a/token/program-2022-test/Cargo.toml +++ b/token/program-2022-test/Cargo.toml @@ -18,7 +18,7 @@ walkdir = "2" [dev-dependencies] async-trait = "0.1" borsh = "1.5.3" -bytemuck = "1.19.0" +bytemuck = "1.20.0" futures-util = "0.3" solana-program = "2.1.0" solana-program-test = "2.1.0" diff --git a/token/program-2022/Cargo.toml b/token/program-2022/Cargo.toml index a9df54c3a80..b71dca2df25 100644 --- a/token/program-2022/Cargo.toml +++ b/token/program-2022/Cargo.toml @@ -18,7 +18,7 @@ zk-ops = [] [dependencies] arrayref = "0.3.9" -bytemuck = { version = "1.19.0", features = ["derive"] } +bytemuck = { version = "1.20.0", features = ["derive"] } num-derive = "0.4" num-traits = "0.2" num_enum = "0.7.3" diff --git a/token/program/Cargo.toml b/token/program/Cargo.toml index 93aea490604..5a7f867a425 100644 --- a/token/program/Cargo.toml +++ b/token/program/Cargo.toml @@ -14,7 +14,7 @@ test-sbf = [] [dependencies] arrayref = "0.3.9" -bytemuck = "1.19.0" +bytemuck = "1.20.0" num-derive = "0.4" num-traits = "0.2" num_enum = "0.7.3" diff --git a/token/transfer-hook/interface/Cargo.toml b/token/transfer-hook/interface/Cargo.toml index 1deb735315c..8774db01509 100644 --- a/token/transfer-hook/interface/Cargo.toml +++ b/token/transfer-hook/interface/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" [dependencies] arrayref = "0.3.9" -bytemuck = { version = "1.19.0", features = ["derive"] } +bytemuck = { version = "1.20.0", features = ["derive"] } num-derive = "0.4" num-traits = "0.2" solana-account-info = "2.1.0" From 4faa14996007f7535ba25d2de0c6d682ba7856e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 12:05:04 +0100 Subject: [PATCH 07/52] build(deps-dev): bump @types/node from 22.9.0 to 22.9.1 (#7508) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.9.0 to 22.9.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- account-compression/sdk/package.json | 2 +- libraries/type-length-value/js/package.json | 2 +- memo/js/package.json | 2 +- name-service/js/package.json | 2 +- pnpm-lock.yaml | 188 +++++++++---------- single-pool/js/packages/classic/package.json | 2 +- single-pool/js/packages/modern/package.json | 2 +- stake-pool/js/package.json | 2 +- token-group/js/package.json | 2 +- token-lending/js/package.json | 2 +- token-metadata/js/package.json | 2 +- token/js/package.json | 2 +- 12 files changed, 105 insertions(+), 105 deletions(-) diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index df68bae11fd..337a33795e1 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -67,7 +67,7 @@ "@solana/eslint-config-solana": "^3.0.3", "@types/bn.js": "^5.1.6", "@types/jest": "^29.5.14", - "@types/node": "^22.9.0", + "@types/node": "^22.9.1", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/libraries/type-length-value/js/package.json b/libraries/type-length-value/js/package.json index 307853c957e..1391ba0a31f 100644 --- a/libraries/type-length-value/js/package.json +++ b/libraries/type-length-value/js/package.json @@ -49,7 +49,7 @@ "devDependencies": { "@types/chai": "^5.0.1", "@types/mocha": "^10.0.9", - "@types/node": "^22.9.0", + "@types/node": "^22.9.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "chai": "^5.1.2", diff --git a/memo/js/package.json b/memo/js/package.json index 177f587c9d8..30cff877941 100644 --- a/memo/js/package.json +++ b/memo/js/package.json @@ -54,7 +54,7 @@ "@solana/web3.js": "^1.95.4", "@types/chai": "^5.0.1", "@types/jest": "^29.5.14", - "@types/node": "^22.9.0", + "@types/node": "^22.9.1", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/name-service/js/package.json b/name-service/js/package.json index d795756c1c0..e4c5ae409c3 100644 --- a/name-service/js/package.json +++ b/name-service/js/package.json @@ -45,7 +45,7 @@ "@jest/globals": "^29.7.0", "@types/bn.js": "^5.1.6", "@types/jest": "^29.5.14", - "@types/node": "^22.9.0", + "@types/node": "^22.9.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 60049602e94..31c907a891c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -70,8 +70,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.9.0 - version: 22.9.0 + specifier: ^22.9.1 + version: 22.9.1 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -107,10 +107,10 @@ importers: version: 6.2.0 jest: specifier: ^29.0.1 - version: 29.7.0(@types/node@22.9.0)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) jest-config: specifier: ^29.0.1 - version: 29.7.0(@types/node@22.9.0)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) start-server-and-test: specifier: ^2.0.8 version: 2.0.8 @@ -122,7 +122,7 @@ importers: version: 2.0.1 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.0)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) typedoc: specifier: ^0.26.10 version: 0.26.11(typescript@5.6.3) @@ -146,8 +146,8 @@ importers: specifier: ^10.0.9 version: 10.0.9 '@types/node': - specifier: ^22.9.0 - version: 22.9.0 + specifier: ^22.9.1 + version: 22.9.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) @@ -174,7 +174,7 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.0)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) typedoc: specifier: ^0.26.11 version: 0.26.11(typescript@5.6.3) @@ -198,8 +198,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.9.0 - version: 22.9.0 + specifier: ^22.9.1 + version: 22.9.1 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -223,7 +223,7 @@ importers: version: 6.2.0 jest: specifier: ^29.0.0 - version: 29.7.0(@types/node@22.9.0)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) process: specifier: ^0.11.10 version: 0.11.10 @@ -238,7 +238,7 @@ importers: version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.6.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.0)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) typedoc: specifier: ^0.26.11 version: 0.26.11(typescript@5.6.3) @@ -268,8 +268,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.9.0 - version: 22.9.0 + specifier: ^22.9.1 + version: 22.9.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) @@ -290,7 +290,7 @@ importers: version: 2.31.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0) jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.9.0)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) start-server-and-test: specifier: ^2.0.8 version: 2.0.8 @@ -299,7 +299,7 @@ importers: version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.6.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.0)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) typedoc: specifier: ^0.26.11 version: 0.26.11(typescript@5.6.3) @@ -323,8 +323,8 @@ importers: specifier: ^5.0.0 version: 5.0.0 '@types/node': - specifier: ^22.9.0 - version: 22.9.0 + specifier: ^22.9.1 + version: 22.9.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3) @@ -357,8 +357,8 @@ importers: version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) devDependencies: '@types/node': - specifier: ^22.9.0 - version: 22.9.0 + specifier: ^22.9.1 + version: 22.9.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3) @@ -421,8 +421,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.9.0 - version: 22.9.0 + specifier: ^22.9.1 + version: 22.9.1 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -440,7 +440,7 @@ importers: version: 8.57.0 jest: specifier: ^29.0.0 - version: 29.7.0(@types/node@22.9.0)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -476,8 +476,8 @@ importers: specifier: ^10.0.9 version: 10.0.9 '@types/node': - specifier: ^22.9.0 - version: 22.9.0 + specifier: ^22.9.1 + version: 22.9.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) @@ -504,7 +504,7 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.0)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) tslib: specifier: ^2.8.1 version: 2.8.1 @@ -549,8 +549,8 @@ importers: specifier: ^8.56.7 version: 8.56.7 '@types/node': - specifier: ^22.9.0 - version: 22.9.0 + specifier: ^22.9.1 + version: 22.9.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) @@ -568,7 +568,7 @@ importers: version: 4.27.3 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.0)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) tslib: specifier: ^2.8.1 version: 2.8.1 @@ -598,8 +598,8 @@ importers: specifier: ^10.0.9 version: 10.0.9 '@types/node': - specifier: ^22.9.0 - version: 22.9.0 + specifier: ^22.9.1 + version: 22.9.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) @@ -626,7 +626,7 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.0)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) tslib: specifier: ^2.8.1 version: 2.8.1 @@ -687,7 +687,7 @@ importers: version: 2.0.8 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.0)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) typescript: specifier: ^5.6.3 version: 5.6.3 @@ -729,8 +729,8 @@ importers: specifier: ^10.0.9 version: 10.0.9 '@types/node': - specifier: ^22.9.0 - version: 22.9.0 + specifier: ^22.9.1 + version: 22.9.1 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -769,7 +769,7 @@ importers: version: 2.0.8 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.0)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) typedoc: specifier: ^0.26.11 version: 0.26.11(typescript@5.6.3) @@ -1539,7 +1539,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.9.1 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -1551,7 +1551,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.0 + '@types/node': 22.9.1 chalk: 4.1.2 jest-message-util: 30.0.0-alpha.6 jest-util: 30.0.0-alpha.6 @@ -1572,14 +1572,14 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.9.1 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.9.0)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -1616,14 +1616,14 @@ packages: '@jest/test-result': 30.0.0-alpha.6 '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.0 + '@types/node': 22.9.1 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 4.0.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 30.0.0-alpha.6 - jest-config: 30.0.0-alpha.6(@types/node@22.9.0) + jest-config: 30.0.0-alpha.6(@types/node@22.9.1) jest-haste-map: 30.0.0-alpha.6 jest-message-util: 30.0.0-alpha.6 jest-regex-util: 30.0.0-alpha.6 @@ -1652,7 +1652,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.9.1 jest-mock: 29.7.0 dev: true @@ -1662,7 +1662,7 @@ packages: dependencies: '@jest/fake-timers': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.0 + '@types/node': 22.9.1 jest-mock: 30.0.0-alpha.6 dev: true @@ -1706,7 +1706,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.9.0 + '@types/node': 22.9.1 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -1718,7 +1718,7 @@ packages: dependencies: '@jest/types': 30.0.0-alpha.6 '@sinonjs/fake-timers': 11.3.1 - '@types/node': 22.9.0 + '@types/node': 22.9.1 jest-message-util: 30.0.0-alpha.6 jest-mock: 30.0.0-alpha.6 jest-util: 30.0.0-alpha.6 @@ -1752,7 +1752,7 @@ packages: resolution: {integrity: sha512-eoV3sjS1M5k3YdrFWezqdndfgepwB86gwyXC0BzV2saZdJ42ySUoEDBGKuwta8A6Zh3w8tVHNFxz1BqiFraHCQ==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 jest-regex-util: 30.0.0-alpha.6 dev: true @@ -1771,7 +1771,7 @@ packages: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.20 - '@types/node': 22.9.0 + '@types/node': 22.9.1 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -1808,7 +1808,7 @@ packages: '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.9.0 + '@types/node': 22.9.1 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -1965,7 +1965,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.9.0 + '@types/node': 22.9.1 '@types/yargs': 17.0.31 chalk: 4.1.2 dev: true @@ -1978,7 +1978,7 @@ packages: '@jest/schemas': 30.0.0-alpha.6 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.9.0 + '@types/node': 22.9.1 '@types/yargs': 17.0.31 chalk: 4.1.2 dev: true @@ -2858,7 +2858,7 @@ packages: /@types/bn.js@5.1.6: resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 dev: true /@types/chai-as-promised@8.0.1: @@ -2876,7 +2876,7 @@ packages: /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 /@types/deep-eql@4.0.2: resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} @@ -2906,7 +2906,7 @@ packages: /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 dev: true /@types/hast@3.0.4: @@ -2953,15 +2953,15 @@ packages: /@types/node-fetch@2.6.12: resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 form-data: 4.0.0 dev: true /@types/node@12.20.55: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - /@types/node@22.9.0: - resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==} + /@types/node@22.9.1: + resolution: {integrity: sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==} dependencies: undici-types: 6.19.8 @@ -2987,12 +2987,12 @@ packages: /@types/ws@7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 /@types/ws@8.5.10: resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 /@types/yargs-parser@21.0.3: resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -4433,7 +4433,7 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /create-jest@29.7.0(@types/node@22.9.0)(ts-node@10.9.2): + /create-jest@29.7.0(@types/node@22.9.1)(ts-node@10.9.2): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -4442,7 +4442,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.9.0)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -5125,7 +5125,7 @@ packages: '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3) '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.6.3) eslint: 8.57.0 - jest: 29.7.0(@types/node@22.9.0)(ts-node@10.9.2) + jest: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) transitivePeerDependencies: - supports-color - typescript @@ -6610,7 +6610,7 @@ packages: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.9.1 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -6639,7 +6639,7 @@ packages: '@jest/expect': 30.0.0-alpha.6 '@jest/test-result': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.0 + '@types/node': 22.9.1 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -6660,7 +6660,7 @@ packages: - supports-color dev: true - /jest-cli@29.7.0(@types/node@22.9.0)(ts-node@10.9.2): + /jest-cli@29.7.0(@types/node@22.9.1)(ts-node@10.9.2): resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -6674,10 +6674,10 @@ packages: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.9.0)(ts-node@10.9.2) + create-jest: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@22.9.0)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -6704,7 +6704,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 import-local: 3.1.0 - jest-config: 30.0.0-alpha.6(@types/node@22.9.0) + jest-config: 30.0.0-alpha.6(@types/node@22.9.1) jest-util: 30.0.0-alpha.6 jest-validate: 30.0.0-alpha.6 yargs: 17.7.2 @@ -6716,7 +6716,7 @@ packages: - ts-node dev: true - /jest-config@29.7.0(@types/node@22.9.0)(ts-node@10.9.2): + /jest-config@29.7.0(@types/node@22.9.1)(ts-node@10.9.2): resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -6731,7 +6731,7 @@ packages: '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.9.1 babel-jest: 29.7.0(@babel/core@7.26.0) chalk: 4.1.2 ci-info: 3.9.0 @@ -6751,13 +6751,13 @@ packages: pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.2(@types/node@22.9.0)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) transitivePeerDependencies: - babel-plugin-macros - supports-color dev: true - /jest-config@30.0.0-alpha.6(@types/node@22.9.0): + /jest-config@30.0.0-alpha.6(@types/node@22.9.1): resolution: {integrity: sha512-Tq9rH1mg9+nlIhh3efGwMSogFVKZ9z7c6P33ZlK74iJlnqqIAKYERZL2nNmNC5+5p8uxlTPSFZfBz9O8NGKotw==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} peerDependencies: @@ -6776,7 +6776,7 @@ packages: '@jest/pattern': 30.0.0-alpha.6 '@jest/test-sequencer': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.0 + '@types/node': 22.9.1 babel-jest: 30.0.0-alpha.6(@babel/core@7.26.0) chalk: 4.1.2 ci-info: 4.0.0 @@ -6865,7 +6865,7 @@ packages: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.9.1 jest-mock: 29.7.0 jest-util: 29.7.0 dev: true @@ -6877,7 +6877,7 @@ packages: '@jest/environment': 30.0.0-alpha.6 '@jest/fake-timers': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.0 + '@types/node': 22.9.1 jest-mock: 30.0.0-alpha.6 jest-util: 30.0.0-alpha.6 dev: true @@ -6898,7 +6898,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.9.0 + '@types/node': 22.9.1 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -6916,7 +6916,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.0 + '@types/node': 22.9.1 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -7000,7 +7000,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.9.1 jest-util: 29.7.0 dev: true @@ -7009,7 +7009,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.0 + '@types/node': 22.9.1 jest-util: 30.0.0-alpha.6 dev: true @@ -7106,7 +7106,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.9.1 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -7135,7 +7135,7 @@ packages: '@jest/test-result': 30.0.0-alpha.6 '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.0 + '@types/node': 22.9.1 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -7166,7 +7166,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.9.1 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -7196,7 +7196,7 @@ packages: '@jest/test-result': 30.0.0-alpha.6 '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.0 + '@types/node': 22.9.1 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -7277,7 +7277,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.9.1 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -7289,7 +7289,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.0 + '@types/node': 22.9.1 chalk: 4.1.2 ci-info: 4.0.0 graceful-fs: 4.2.11 @@ -7326,7 +7326,7 @@ packages: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.9.1 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -7340,7 +7340,7 @@ packages: dependencies: '@jest/test-result': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.0 + '@types/node': 22.9.1 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -7352,7 +7352,7 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -7362,14 +7362,14 @@ packages: resolution: {integrity: sha512-qlzX7zFT/QdUV/LWsJwZBlaIBaJ+E2VH3d1gArGVP+9hUHGpJkEzCSBK7yuZrkt+M/U0Jre5+maPRmkinEF4DA==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 '@ungap/structured-clone': 1.2.0 jest-util: 30.0.0-alpha.6 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest@29.7.0(@types/node@22.9.0)(ts-node@10.9.2): + /jest@29.7.0(@types/node@22.9.1)(ts-node@10.9.2): resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -7382,7 +7382,7 @@ packages: '@jest/core': 29.7.0(ts-node@10.9.2) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@22.9.0)(ts-node@10.9.2) + jest-cli: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -9051,7 +9051,7 @@ packages: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.9.0)(ts-node@10.9.2) + jest: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -9061,7 +9061,7 @@ packages: yargs-parser: 21.1.1 dev: true - /ts-node@10.9.2(@types/node@22.9.0)(typescript@5.6.3): + /ts-node@10.9.2(@types/node@22.9.1)(typescript@5.6.3): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: @@ -9080,7 +9080,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.9.0 + '@types/node': 22.9.1 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 diff --git a/single-pool/js/packages/classic/package.json b/single-pool/js/packages/classic/package.json index 4150e04c616..01794b3f447 100644 --- a/single-pool/js/packages/classic/package.json +++ b/single-pool/js/packages/classic/package.json @@ -18,7 +18,7 @@ "test": "sed -i '1s/.*/{ \"type\": \"module\",/' package.json && NODE_OPTIONS='--loader=tsx' ava ; ret=$?; sed -i '1s/.*/{/' package.json && exit $ret" }, "devDependencies": { - "@types/node": "^22.9.0", + "@types/node": "^22.9.1", "@ava/typescript": "^5.0.0", "@typescript-eslint/eslint-plugin": "^8.4.0", "ava": "^6.2.0", diff --git a/single-pool/js/packages/modern/package.json b/single-pool/js/packages/modern/package.json index 5f6751bbed9..366fe06a895 100644 --- a/single-pool/js/packages/modern/package.json +++ b/single-pool/js/packages/modern/package.json @@ -16,7 +16,7 @@ "lint:fix": "eslint . --fix" }, "devDependencies": { - "@types/node": "^22.9.0", + "@types/node": "^22.9.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "eslint": "^8.57.0", "typescript": "^5.6.3" diff --git a/stake-pool/js/package.json b/stake-pool/js/package.json index 9927f650202..e1f89bf05df 100644 --- a/stake-pool/js/package.json +++ b/stake-pool/js/package.json @@ -61,7 +61,7 @@ "@rollup/plugin-typescript": "^12.1.1", "@types/bn.js": "^5.1.6", "@types/jest": "^29.5.14", - "@types/node": "^22.9.0", + "@types/node": "^22.9.1", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/token-group/js/package.json b/token-group/js/package.json index 9d6da572593..36ec762e99b 100644 --- a/token-group/js/package.json +++ b/token-group/js/package.json @@ -53,7 +53,7 @@ "@solana/web3.js": "^1.95.4", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.9", - "@types/node": "^22.9.0", + "@types/node": "^22.9.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "chai": "^5.1.2", diff --git a/token-lending/js/package.json b/token-lending/js/package.json index 916dec940cc..76c73f9fe07 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -47,7 +47,7 @@ "@solana/spl-token": "0.4.9", "@solana/web3.js": "^1.95.4", "@types/eslint": "^8.56.7", - "@types/node": "^22.9.0", + "@types/node": "^22.9.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", diff --git a/token-metadata/js/package.json b/token-metadata/js/package.json index 391c40bc80c..07612d1cf57 100644 --- a/token-metadata/js/package.json +++ b/token-metadata/js/package.json @@ -53,7 +53,7 @@ "@solana/web3.js": "^1.95.4", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.9", - "@types/node": "^22.9.0", + "@types/node": "^22.9.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "chai": "^5.1.2", diff --git a/token/js/package.json b/token/js/package.json index 4f1d297d7b0..969ec510852 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -66,7 +66,7 @@ "@types/chai-as-promised": "^8.0.1", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.9", - "@types/node": "^22.9.0", + "@types/node": "^22.9.1", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", From d4c250f34ab2b3ce9717c587da80fe20366ca605 Mon Sep 17 00:00:00 2001 From: Jon C Date: Wed, 20 Nov 2024 14:07:42 +0100 Subject: [PATCH 08/52] stake-pool: Downgrade dependencies for fixed release (#7509) #### Problem The current spl-stake-pool crate doesn't always work due to its dependency on spl-math which still uses the v1 Solana crates. #### Summary of changes Since the spl-math dependency wasn't actually needed, it was removed in #7421. So just to get a new patch release out, downgrade the local dependencies. This will fail CI, but after it lands we can tag the release, and revert this PR. --- stake-pool/program/Cargo.toml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/stake-pool/program/Cargo.toml b/stake-pool/program/Cargo.toml index 0dc885840d2..f21bfb8596b 100644 --- a/stake-pool/program/Cargo.toml +++ b/stake-pool/program/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spl-stake-pool" -version = "2.0.0" +version = "2.0.1" description = "Solana Program Library Stake Pool" authors = ["Solana Labs Maintainers "] repository = "https://github.com/solana-labs/solana-program-library" @@ -20,12 +20,12 @@ num-traits = "0.2" num_enum = "0.7.3" serde = "1.0.215" serde_derive = "1.0.103" -solana-program = "2.1.0" +solana-program = "2.0.0" solana-security-txt = "1.1.1" -spl-pod = { version = "0.5.0", path = "../../libraries/pod", features = [ +spl-pod = { version = "0.3.0", features = [ "borsh", ] } -spl-token-2022 = { version = "6.0.0", path = "../../token/program-2022", features = [ +spl-token-2022 = { version = "4.0.0", features = [ "no-entrypoint", ] } thiserror = "2.0" @@ -34,16 +34,13 @@ bincode = "1.3.1" [dev-dependencies] assert_matches = "1.5.0" proptest = "1.5" -solana-program-test = "2.1.0" -solana-sdk = "2.1.0" -solana-vote-program = "2.1.0" -spl-token = { version = "7.0", path = "../../token/program", features = [ +solana-program-test = "2.0.0" +solana-sdk = "2.0.0" +solana-vote-program = "2.0.0" +spl-token = { version = "6.0", features = [ "no-entrypoint", ] } test-case = "3.3" [lib] crate-type = ["cdylib", "lib"] - -[lints] -workspace = true From 0f54203a7d3b4a4eab85df664df9a93a027aa7d1 Mon Sep 17 00:00:00 2001 From: Jon C Date: Wed, 20 Nov 2024 14:26:22 +0100 Subject: [PATCH 09/52] Revert "stake-pool: Downgrade dependencies for fixed release (#7509)" (#7510) * Revert "stake-pool: Downgrade dependencies for fixed release (#7509)" This reverts commit d4c250f34ab2b3ce9717c587da80fe20366ca605. * Bump version to v2.0.1 --- Cargo.lock | 2 +- stake-pool/cli/Cargo.toml | 2 +- stake-pool/program/Cargo.toml | 17 ++++++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b4bcf7e770f..84c24564202 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8373,7 +8373,7 @@ dependencies = [ [[package]] name = "spl-stake-pool" -version = "2.0.0" +version = "2.0.1" dependencies = [ "arrayref", "assert_matches", diff --git a/stake-pool/cli/Cargo.toml b/stake-pool/cli/Cargo.toml index b6778822bec..f6bb1e56342 100644 --- a/stake-pool/cli/Cargo.toml +++ b/stake-pool/cli/Cargo.toml @@ -27,7 +27,7 @@ spl-associated-token-account = { version = "=6.0.0", path = "../../associated-to "no-entrypoint", ] } spl-associated-token-account-client = { version = "=2.0.0", path = "../../associated-token-account/client" } -spl-stake-pool = { version = "=2.0.0", path = "../program", features = [ +spl-stake-pool = { version = "=2.0.1", path = "../program", features = [ "no-entrypoint", ] } spl-token = { version = "=7.0", path = "../../token/program", features = [ diff --git a/stake-pool/program/Cargo.toml b/stake-pool/program/Cargo.toml index f21bfb8596b..b34fb69a1cb 100644 --- a/stake-pool/program/Cargo.toml +++ b/stake-pool/program/Cargo.toml @@ -20,12 +20,12 @@ num-traits = "0.2" num_enum = "0.7.3" serde = "1.0.215" serde_derive = "1.0.103" -solana-program = "2.0.0" +solana-program = "2.1.0" solana-security-txt = "1.1.1" -spl-pod = { version = "0.3.0", features = [ +spl-pod = { version = "0.5.0", path = "../../libraries/pod", features = [ "borsh", ] } -spl-token-2022 = { version = "4.0.0", features = [ +spl-token-2022 = { version = "6.0.0", path = "../../token/program-2022", features = [ "no-entrypoint", ] } thiserror = "2.0" @@ -34,13 +34,16 @@ bincode = "1.3.1" [dev-dependencies] assert_matches = "1.5.0" proptest = "1.5" -solana-program-test = "2.0.0" -solana-sdk = "2.0.0" -solana-vote-program = "2.0.0" -spl-token = { version = "6.0", features = [ +solana-program-test = "2.1.0" +solana-sdk = "2.1.0" +solana-vote-program = "2.1.0" +spl-token = { version = "7.0", path = "../../token/program", features = [ "no-entrypoint", ] } test-case = "3.3" [lib] crate-type = ["cdylib", "lib"] + +[lints] +workspace = true From be088c72a1cc38d4acb335fb028a7c3f292ceefc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 13:35:47 +0100 Subject: [PATCH 10/52] build(deps-dev): bump @types/mocha from 10.0.9 to 10.0.10 (#7513) Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 10.0.9 to 10.0.10. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) --- updated-dependencies: - dependency-name: "@types/mocha" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libraries/type-length-value/js/package.json | 2 +- pnpm-lock.yaml | 24 ++++++++++----------- token-group/js/package.json | 2 +- token-metadata/js/package.json | 2 +- token-swap/js/package.json | 2 +- token/js/package.json | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/libraries/type-length-value/js/package.json b/libraries/type-length-value/js/package.json index 1391ba0a31f..9fc73bb6b44 100644 --- a/libraries/type-length-value/js/package.json +++ b/libraries/type-length-value/js/package.json @@ -48,7 +48,7 @@ }, "devDependencies": { "@types/chai": "^5.0.1", - "@types/mocha": "^10.0.9", + "@types/mocha": "^10.0.10", "@types/node": "^22.9.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 31c907a891c..c4018811c0a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -143,8 +143,8 @@ importers: specifier: ^5.0.1 version: 5.0.1 '@types/mocha': - specifier: ^10.0.9 - version: 10.0.9 + specifier: ^10.0.10 + version: 10.0.10 '@types/node': specifier: ^22.9.1 version: 22.9.1 @@ -473,8 +473,8 @@ importers: specifier: ^5.0.1 version: 5.0.1 '@types/mocha': - specifier: ^10.0.9 - version: 10.0.9 + specifier: ^10.0.10 + version: 10.0.10 '@types/node': specifier: ^22.9.1 version: 22.9.1 @@ -595,8 +595,8 @@ importers: specifier: ^5.0.1 version: 5.0.1 '@types/mocha': - specifier: ^10.0.9 - version: 10.0.9 + specifier: ^10.0.10 + version: 10.0.10 '@types/node': specifier: ^22.9.1 version: 22.9.1 @@ -662,8 +662,8 @@ importers: specifier: ^8.0.1 version: 8.0.1 '@types/mocha': - specifier: ^10.0.9 - version: 10.0.9 + specifier: ^10.0.10 + version: 10.0.10 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) @@ -726,8 +726,8 @@ importers: specifier: ^8.0.1 version: 8.0.1 '@types/mocha': - specifier: ^10.0.9 - version: 10.0.9 + specifier: ^10.0.10 + version: 10.0.10 '@types/node': specifier: ^22.9.1 version: 22.9.1 @@ -2946,8 +2946,8 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true - /@types/mocha@10.0.9: - resolution: {integrity: sha512-sicdRoWtYevwxjOHNMPTl3vSfJM6oyW8o1wXeI7uww6b6xHg8eBznQDNSGBCDJmsE8UMxP05JgZRtsKbTqt//Q==} + /@types/mocha@10.0.10: + resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} dev: true /@types/node-fetch@2.6.12: diff --git a/token-group/js/package.json b/token-group/js/package.json index 36ec762e99b..0573edaf0b5 100644 --- a/token-group/js/package.json +++ b/token-group/js/package.json @@ -52,7 +52,7 @@ "@solana/spl-type-length-value": "0.2.0", "@solana/web3.js": "^1.95.4", "@types/chai": "^5.0.1", - "@types/mocha": "^10.0.9", + "@types/mocha": "^10.0.10", "@types/node": "^22.9.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/token-metadata/js/package.json b/token-metadata/js/package.json index 07612d1cf57..cf7404330a8 100644 --- a/token-metadata/js/package.json +++ b/token-metadata/js/package.json @@ -52,7 +52,7 @@ "@solana/spl-type-length-value": "0.2.0", "@solana/web3.js": "^1.95.4", "@types/chai": "^5.0.1", - "@types/mocha": "^10.0.9", + "@types/mocha": "^10.0.10", "@types/node": "^22.9.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/token-swap/js/package.json b/token-swap/js/package.json index 8e80b5a9c9b..4f17f848335 100644 --- a/token-swap/js/package.json +++ b/token-swap/js/package.json @@ -54,7 +54,7 @@ "@types/bn.js": "^5.1.6", "@types/chai-as-promised": "^8.0.1", "@types/chai": "^5.0.1", - "@types/mocha": "^10.0.9", + "@types/mocha": "^10.0.10", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", diff --git a/token/js/package.json b/token/js/package.json index 969ec510852..19bec5a2539 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -65,7 +65,7 @@ "@solana/web3.js": "^1.95.4", "@types/chai-as-promised": "^8.0.1", "@types/chai": "^5.0.1", - "@types/mocha": "^10.0.9", + "@types/mocha": "^10.0.10", "@types/node": "^22.9.1", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", From 184b1cf71ef4bf4c0be91a9cf553abebdfa9ad74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 13:36:14 +0100 Subject: [PATCH 11/52] build(deps): bump @solana/web3.js from 1.95.4 to 1.95.5 (#7512) Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 1.95.4 to 1.95.5. - [Release notes](https://github.com/solana-labs/solana-web3.js/releases) - [Commits](https://github.com/solana-labs/solana-web3.js/compare/v1.95.4...v1.95.5) --- updated-dependencies: - dependency-name: "@solana/web3.js" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- memo/js/package.json | 4 +- name-service/js/package.json | 2 +- pnpm-lock.yaml | 65 +++++++++++++------- single-pool/js/packages/classic/package.json | 2 +- stake-pool/js/package.json | 2 +- token-group/js/package.json | 4 +- token-lending/js/package.json | 2 +- token-metadata/js/package.json | 4 +- token-swap/js/package.json | 4 +- token/js/package.json | 4 +- 10 files changed, 58 insertions(+), 35 deletions(-) diff --git a/memo/js/package.json b/memo/js/package.json index 30cff877941..9414e7c5dd0 100644 --- a/memo/js/package.json +++ b/memo/js/package.json @@ -45,13 +45,13 @@ "deploy:docs": "npm run docs && gh-pages --dest memo/js --dist docs --dotfiles" }, "peerDependencies": { - "@solana/web3.js": "^1.95.4" + "@solana/web3.js": "^1.95.5" }, "dependencies": { "buffer": "^6.0.3" }, "devDependencies": { - "@solana/web3.js": "^1.95.4", + "@solana/web3.js": "^1.95.5", "@types/chai": "^5.0.1", "@types/jest": "^29.5.14", "@types/node": "^22.9.1", diff --git a/name-service/js/package.json b/name-service/js/package.json index e4c5ae409c3..184f3ce153f 100644 --- a/name-service/js/package.json +++ b/name-service/js/package.json @@ -60,7 +60,7 @@ "typescript": "^5.6.3" }, "dependencies": { - "@solana/web3.js": "^1.95.4", + "@solana/web3.js": "^1.95.5", "bn.js": "^5.1.3", "borsh": "^2.0.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c4018811c0a..298e95065cc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -189,8 +189,8 @@ importers: version: 6.0.3 devDependencies: '@solana/web3.js': - specifier: ^1.95.4 - version: 1.95.4 + specifier: ^1.95.5 + version: 1.95.5 '@types/chai': specifier: ^5.0.1 version: 5.0.1 @@ -249,8 +249,8 @@ importers: name-service/js: dependencies: '@solana/web3.js': - specifier: ^1.95.4 - version: 1.95.4 + specifier: ^1.95.5 + version: 1.95.5 bn.js: specifier: ^5.1.3 version: 5.2.1 @@ -316,8 +316,8 @@ importers: specifier: 1.0.0 version: link:../modern '@solana/web3.js': - specifier: ^1.95.4 - version: 1.95.4 + specifier: ^1.95.5 + version: 1.95.5 devDependencies: '@ava/typescript': specifier: ^5.0.0 @@ -378,8 +378,8 @@ importers: specifier: 0.4.9 version: link:../../token/js '@solana/web3.js': - specifier: ^1.95.4 - version: 1.95.4 + specifier: ^1.95.5 + version: 1.95.5 bn.js: specifier: ^5.2.0 version: 5.2.1 @@ -467,8 +467,8 @@ importers: specifier: 0.2.0 version: link:../../libraries/type-length-value/js '@solana/web3.js': - specifier: ^1.95.4 - version: 1.95.4 + specifier: ^1.95.5 + version: 1.95.5 '@types/chai': specifier: ^5.0.1 version: 5.0.1 @@ -543,8 +543,8 @@ importers: specifier: 0.4.9 version: link:../../token/js '@solana/web3.js': - specifier: ^1.95.4 - version: 1.95.4 + specifier: ^1.95.5 + version: 1.95.5 '@types/eslint': specifier: ^8.56.7 version: 8.56.7 @@ -589,8 +589,8 @@ importers: specifier: 0.2.0 version: link:../../libraries/type-length-value/js '@solana/web3.js': - specifier: ^1.95.4 - version: 1.95.4 + specifier: ^1.95.5 + version: 1.95.5 '@types/chai': specifier: ^5.0.1 version: 5.0.1 @@ -650,8 +650,8 @@ importers: specifier: 0.4.9 version: link:../../token/js '@solana/web3.js': - specifier: ^1.95.4 - version: 1.95.4 + specifier: ^1.95.5 + version: 1.95.5 '@types/bn.js': specifier: ^5.1.6 version: 5.1.6 @@ -717,8 +717,8 @@ importers: specifier: 0.2.4 version: link:../../memo/js '@solana/web3.js': - specifier: ^1.95.4 - version: 1.95.4 + specifier: ^1.95.5 + version: 1.95.5 '@types/chai': specifier: ^5.0.1 version: 5.0.1 @@ -2070,7 +2070,7 @@ packages: resolution: {integrity: sha512-tgyEl6dvtLln8XX81JyBvWjIiEcjTkUwZbrM5dIobTmoqMuGewSyk9CClno8qsMsFdB5T3jC91Rjeqmu/6xk2g==} dependencies: '@metaplex-foundation/beet': 0.7.2 - '@solana/web3.js': 1.95.4 + '@solana/web3.js': 1.95.5 bs58: 5.0.0 debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: @@ -2564,7 +2564,7 @@ packages: engines: {node: '>= 10'} dependencies: '@solana/buffer-layout': 4.0.1 - '@solana/web3.js': 1.95.4 + '@solana/web3.js': 1.95.5 bigint-buffer: 1.1.5 bignumber.js: 9.1.2 transitivePeerDependencies: @@ -2805,6 +2805,29 @@ packages: - encoding - utf-8-validate + /@solana/web3.js@1.95.5: + resolution: {integrity: sha512-hU9cBrbg1z6gEjLH9vwIckGBVB78Ijm0iZFNk4ocm5OD82piPwuk3MeQ1rfiKD9YQtr95krrcaopb49EmQJlRg==} + dependencies: + '@babel/runtime': 7.25.0 + '@noble/curves': 1.4.2 + '@noble/hashes': 1.4.0 + '@solana/buffer-layout': 4.0.1 + agentkeepalive: 4.5.0 + bigint-buffer: 1.1.5 + bn.js: 5.2.1 + borsh: 0.7.0 + bs58: 4.0.1 + buffer: 6.0.3 + fast-stable-stringify: 1.0.0 + jayson: 4.1.1 + node-fetch: 2.7.0 + rpc-websockets: 9.0.2 + superstruct: 2.0.2 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + /@swc/helpers@0.5.11: resolution: {integrity: sha512-YNlnKRWF2sVojTpIyzwou9XoTNbzbzONwRhOoniEioF1AtaitTvVZblaQRrAzChWQ1bLYyYSWzM18y4WwgzJ+A==} dependencies: @@ -8682,7 +8705,7 @@ packages: resolution: {integrity: sha512-TS6vYoO/9YJZng7oiLOVyuz8V7yLow5Hp4SLYWW71XM3702v+z9f1fvUBKudRfa4dfpta4tRNufApSiBIALxJQ==} engines: {node: '>= 10'} dependencies: - '@solana/web3.js': 1.95.4 + '@solana/web3.js': 1.95.5 bs58: 4.0.1 optionalDependencies: solana-bankrun-darwin-arm64: 0.2.0 diff --git a/single-pool/js/packages/classic/package.json b/single-pool/js/packages/classic/package.json index 01794b3f447..0a404f5c586 100644 --- a/single-pool/js/packages/classic/package.json +++ b/single-pool/js/packages/classic/package.json @@ -28,7 +28,7 @@ "typescript": "^5.6.3" }, "dependencies": { - "@solana/web3.js": "^1.95.4", + "@solana/web3.js": "^1.95.5", "@solana/addresses": "2.0.0", "@solana/spl-single-pool": "1.0.0" }, diff --git a/stake-pool/js/package.json b/stake-pool/js/package.json index e1f89bf05df..f45045478ce 100644 --- a/stake-pool/js/package.json +++ b/stake-pool/js/package.json @@ -45,7 +45,7 @@ "dependencies": { "@solana/buffer-layout": "^4.0.1", "@solana/spl-token": "0.4.9", - "@solana/web3.js": "^1.95.4", + "@solana/web3.js": "^1.95.5", "bn.js": "^5.2.0", "buffer": "^6.0.3", "buffer-layout": "^1.2.2", diff --git a/token-group/js/package.json b/token-group/js/package.json index 0573edaf0b5..112cab9571a 100644 --- a/token-group/js/package.json +++ b/token-group/js/package.json @@ -43,14 +43,14 @@ "watch": "tsc --build --verbose --watch tsconfig.all.json" }, "peerDependencies": { - "@solana/web3.js": "^1.95.4" + "@solana/web3.js": "^1.95.5" }, "dependencies": { "@solana/codecs": "2.0.0" }, "devDependencies": { "@solana/spl-type-length-value": "0.2.0", - "@solana/web3.js": "^1.95.4", + "@solana/web3.js": "^1.95.5", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", "@types/node": "^22.9.1", diff --git a/token-lending/js/package.json b/token-lending/js/package.json index 76c73f9fe07..89c93ceb978 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -45,7 +45,7 @@ "@rollup/plugin-node-resolve": "^15.3.0", "@rollup/plugin-typescript": "^12.1.1", "@solana/spl-token": "0.4.9", - "@solana/web3.js": "^1.95.4", + "@solana/web3.js": "^1.95.5", "@types/eslint": "^8.56.7", "@types/node": "^22.9.1", "@typescript-eslint/eslint-plugin": "^8.4.0", diff --git a/token-metadata/js/package.json b/token-metadata/js/package.json index cf7404330a8..c7a58e2ea09 100644 --- a/token-metadata/js/package.json +++ b/token-metadata/js/package.json @@ -43,14 +43,14 @@ "watch": "tsc --build --verbose --watch tsconfig.all.json" }, "peerDependencies": { - "@solana/web3.js": "^1.95.4" + "@solana/web3.js": "^1.95.5" }, "dependencies": { "@solana/codecs": "2.0.0" }, "devDependencies": { "@solana/spl-type-length-value": "0.2.0", - "@solana/web3.js": "^1.95.4", + "@solana/web3.js": "^1.95.5", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", "@types/node": "^22.9.1", diff --git a/token-swap/js/package.json b/token-swap/js/package.json index 4f17f848335..fed64f3a97e 100644 --- a/token-swap/js/package.json +++ b/token-swap/js/package.json @@ -46,11 +46,11 @@ "@solana/buffer-layout-utils": "^0.2.0" }, "peerDependencies": { - "@solana/web3.js": "^1.95.4" + "@solana/web3.js": "^1.95.5" }, "devDependencies": { "@solana/spl-token": "0.4.9", - "@solana/web3.js": "^1.95.4", + "@solana/web3.js": "^1.95.5", "@types/bn.js": "^5.1.6", "@types/chai-as-promised": "^8.0.1", "@types/chai": "^5.0.1", diff --git a/token/js/package.json b/token/js/package.json index 19bec5a2539..42a5d81757a 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -50,7 +50,7 @@ "deploy:docs": "npm run docs && gh-pages --dest token/js --dist docs --dotfiles" }, "peerDependencies": { - "@solana/web3.js": "^1.95.4" + "@solana/web3.js": "^1.95.5" }, "dependencies": { "@solana/buffer-layout": "^4.0.0", @@ -62,7 +62,7 @@ "devDependencies": { "@solana/codecs-strings": "2.0.0", "@solana/spl-memo": "0.2.4", - "@solana/web3.js": "^1.95.4", + "@solana/web3.js": "^1.95.5", "@types/chai-as-promised": "^8.0.1", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", From 62d199b2ad1c0610166a0f133904f67a25f2a7a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:25:04 +0100 Subject: [PATCH 12/52] build(deps-dev): bump turbo from 2.3.0 to 2.3.1 (#7515) Bumps [turbo](https://github.com/vercel/turborepo) from 2.3.0 to 2.3.1. - [Release notes](https://github.com/vercel/turborepo/releases) - [Changelog](https://github.com/vercel/turborepo/blob/main/release.md) - [Commits](https://github.com/vercel/turborepo/compare/v2.3.0...v2.3.1) --- updated-dependencies: - dependency-name: turbo dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 44 ++++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 745f7017670..537e0aa17e5 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "eslint-config-turbo": "^2.3.0", "eslint-plugin-prettier": "^5.2.1", "prettier": "^3.3.3", - "turbo": "^2.3.0" + "turbo": "^2.3.1" }, "engines": { "node": ">=14.0.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 298e95065cc..f9adee157da 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: ^3.3.3 version: 3.3.3 turbo: - specifier: ^2.3.0 - version: 2.3.0 + specifier: ^2.3.1 + version: 2.3.1 account-compression/sdk: dependencies: @@ -9152,64 +9152,64 @@ packages: fsevents: 2.3.3 dev: true - /turbo-darwin-64@2.3.0: - resolution: {integrity: sha512-pji+D49PhFItyQjf2QVoLZw2d3oRGo8gJgKyOiRzvip78Rzie74quA8XNwSg/DuzM7xx6gJ3p2/LylTTlgZXxQ==} + /turbo-darwin-64@2.3.1: + resolution: {integrity: sha512-tjHfjW/Gs8Q9IO+9gPdIsSStZ8I09QYDRT/SyhFTPLnc7O2ZlxHPBVFfjUkHUjanHNYO8CpRGt+zdp1PaMCruw==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@2.3.0: - resolution: {integrity: sha512-AJrGIL9BO41mwDF/IBHsNGwvtdyB911vp8f5mbNo1wG66gWTvOBg7WCtYQBvCo11XTenTfXPRSsAb7w3WAZb6w==} + /turbo-darwin-arm64@2.3.1: + resolution: {integrity: sha512-At1WStnxCfrBQ4M2g6ynre8WsusGwA11okhVolBxyFUemYozDTtbZwelr+IqNggjT251vviokxOkcFzzogbiFw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@2.3.0: - resolution: {integrity: sha512-jZqW6vc2sPJT3M/3ZmV1Cg4ecQVPqsbHncG/RnogHpBu783KCSXIndgxvUQNm9qfgBYbZDBnP1md63O4UTElhw==} + /turbo-linux-64@2.3.1: + resolution: {integrity: sha512-COwEev7s9fsxLM2eoRCyRLPj+BXvZjFIS+GxzdAubYhoSoZit8B8QGKczyDl6448xhuFEWKrpHhcR9aBuwB4ag==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@2.3.0: - resolution: {integrity: sha512-HUbDLJlvd/hxuyCNO0BmEWYQj0TugRMvSQeG8vHJH+Lq8qOgDAe7J0K73bFNbZejZQxW3C3XEiZFB3pnpO78+A==} + /turbo-linux-arm64@2.3.1: + resolution: {integrity: sha512-AP0uE15Rhxza2Jl+Q3gxdXRA92IIeFAYaufz6CMcZuGy9yZsBlLt9w6T47H6g7XQPzWuw8pzfjM1omcTKkkDpQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@2.3.0: - resolution: {integrity: sha512-c5rxrGNTYDWX9QeMzWLFE9frOXnKjHGEvQMp1SfldDlbZYsloX9UKs31TzUThzfTgTiz8NYuShaXJ2UvTMnV/g==} + /turbo-windows-64@2.3.1: + resolution: {integrity: sha512-HDSneq0dNZYZch74c2eygq+OiJE/JYDs7OsGM0yRYVj336383xkUnxz6W2I7qiyMCQXzp4UVUDZXvZhUYcX3BA==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@2.3.0: - resolution: {integrity: sha512-7qfUuYhfIVb1AZgs89DxhXK+zZez6O2ocmixEQ4hXZK7ytnBt5vaz2zGNJJKFNYIL5HX1C3tuHolnpNgDNCUIg==} + /turbo-windows-arm64@2.3.1: + resolution: {integrity: sha512-7/2/sJZiquwoT/jWBCfV0qKq4NarsJPmDRjMcR9dDMIwCYsGM8ljomkDRTCtkNeFcUvYw54MiRWHehWgbcRPsw==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@2.3.0: - resolution: {integrity: sha512-/uOq5o2jwRPyaUDnwBpOR5k9mQq4c3wziBgWNWttiYQPmbhDtrKYPRBxTvA2WpgQwRIbt8UM612RMN8n/TvmHA==} + /turbo@2.3.1: + resolution: {integrity: sha512-vHZe/e6k1HZVKiMQPQ1BWFn53vjVQDFKdkjUq/pBKlRWi1gw9LQO6ntH4qZCcHY1rH6TXgsRmexXdgWl96YvVQ==} hasBin: true optionalDependencies: - turbo-darwin-64: 2.3.0 - turbo-darwin-arm64: 2.3.0 - turbo-linux-64: 2.3.0 - turbo-linux-arm64: 2.3.0 - turbo-windows-64: 2.3.0 - turbo-windows-arm64: 2.3.0 + turbo-darwin-64: 2.3.1 + turbo-darwin-arm64: 2.3.1 + turbo-linux-64: 2.3.1 + turbo-linux-arm64: 2.3.1 + turbo-windows-64: 2.3.1 + turbo-windows-arm64: 2.3.1 dev: true /type-check@0.4.0: From d8c33c7ae95d6ba54fbc69b480c47e5ac34a5aa5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:25:16 +0100 Subject: [PATCH 13/52] build(deps-dev): bump eslint-config-turbo from 2.3.0 to 2.3.1 (#7514) Bumps [eslint-config-turbo](https://github.com/vercel/turborepo/tree/HEAD/packages/eslint-config-turbo) from 2.3.0 to 2.3.1. - [Release notes](https://github.com/vercel/turborepo/releases) - [Changelog](https://github.com/vercel/turborepo/blob/main/release.md) - [Commits](https://github.com/vercel/turborepo/commits/v2.3.1/packages/eslint-config-turbo) --- updated-dependencies: - dependency-name: eslint-config-turbo dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- account-compression/sdk/package.json | 2 +- package.json | 2 +- pnpm-lock.yaml | 28 ++++++++++++++-------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index 337a33795e1..a0c29f46c0a 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -72,7 +72,7 @@ "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", - "eslint-config-turbo": "^2.3.0", + "eslint-config-turbo": "^2.3.1", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.9.0", "eslint-plugin-mocha": "^10.5.0", diff --git a/package.json b/package.json index 537e0aa17e5..b46908d3f8b 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@solana/eslint-config-solana": "^4.0.0", "@solana/prettier-config-solana": "^0.0.5", "eslint-config-prettier": "^9.1.0", - "eslint-config-turbo": "^2.3.0", + "eslint-config-turbo": "^2.3.1", "eslint-plugin-prettier": "^5.2.1", "prettier": "^3.3.3", "turbo": "^2.3.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f9adee157da..c02d5d9ddc7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: ^9.1.0 version: 9.1.0(eslint@9.13.0) eslint-config-turbo: - specifier: ^2.3.0 - version: 2.3.0(eslint@9.13.0) + specifier: ^2.3.1 + version: 2.3.1(eslint@9.13.0) eslint-plugin-prettier: specifier: ^5.2.1 version: 5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.3.3) @@ -85,8 +85,8 @@ importers: specifier: ^8.57.0 version: 8.57.0 eslint-config-turbo: - specifier: ^2.3.0 - version: 2.3.0(eslint@8.57.0) + specifier: ^2.3.1 + version: 2.3.1(eslint@8.57.0) eslint-plugin-import: specifier: ^2.31.0 version: 2.31.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0) @@ -4939,22 +4939,22 @@ packages: eslint: 9.13.0 dev: true - /eslint-config-turbo@2.3.0(eslint@8.57.0): - resolution: {integrity: sha512-Nm9WZgNoUIJw4bpYQugGCDjzYy1TlUD4sQ/nGblL+HdNqJWCj5NqXbJ1k+TBfYedhr65dlGoAFPYUOfjUOmKVg==} + /eslint-config-turbo@2.3.1(eslint@8.57.0): + resolution: {integrity: sha512-pxxCLLgnZYCjJoGrzUu3jAcb67bKVykLblyMtgTzHN7DlNu6tnp89K3/5fznc6ALyXwXFp0K+nM+Sxst43oaoA==} peerDependencies: eslint: '>6.6.0' dependencies: eslint: 8.57.0 - eslint-plugin-turbo: 2.3.0(eslint@8.57.0) + eslint-plugin-turbo: 2.3.1(eslint@8.57.0) dev: true - /eslint-config-turbo@2.3.0(eslint@9.13.0): - resolution: {integrity: sha512-Nm9WZgNoUIJw4bpYQugGCDjzYy1TlUD4sQ/nGblL+HdNqJWCj5NqXbJ1k+TBfYedhr65dlGoAFPYUOfjUOmKVg==} + /eslint-config-turbo@2.3.1(eslint@9.13.0): + resolution: {integrity: sha512-pxxCLLgnZYCjJoGrzUu3jAcb67bKVykLblyMtgTzHN7DlNu6tnp89K3/5fznc6ALyXwXFp0K+nM+Sxst43oaoA==} peerDependencies: eslint: '>6.6.0' dependencies: eslint: 9.13.0 - eslint-plugin-turbo: 2.3.0(eslint@9.13.0) + eslint-plugin-turbo: 2.3.1(eslint@9.13.0) dev: true /eslint-import-resolver-node@0.3.9: @@ -5261,8 +5261,8 @@ packages: requireindex: 1.2.0 dev: true - /eslint-plugin-turbo@2.3.0(eslint@8.57.0): - resolution: {integrity: sha512-2iVUoIhrjp6kI8p0J4NewKPpXaKrHvL4K4eRnNXbqZvP/7xsm4Of+33B3b7m7OsS0UgX8HHOjlB9bEjigKMkMA==} + /eslint-plugin-turbo@2.3.1(eslint@8.57.0): + resolution: {integrity: sha512-M5MBYBkcQsv11MFHJ+6WpzLpiTBx0OApeUMAHlO4L0eHqQxY03GrmHXjXfozqB+9HwGrW9fqihBzVRllyixJDA==} peerDependencies: eslint: '>6.6.0' dependencies: @@ -5270,8 +5270,8 @@ packages: eslint: 8.57.0 dev: true - /eslint-plugin-turbo@2.3.0(eslint@9.13.0): - resolution: {integrity: sha512-2iVUoIhrjp6kI8p0J4NewKPpXaKrHvL4K4eRnNXbqZvP/7xsm4Of+33B3b7m7OsS0UgX8HHOjlB9bEjigKMkMA==} + /eslint-plugin-turbo@2.3.1(eslint@9.13.0): + resolution: {integrity: sha512-M5MBYBkcQsv11MFHJ+6WpzLpiTBx0OApeUMAHlO4L0eHqQxY03GrmHXjXfozqB+9HwGrW9fqihBzVRllyixJDA==} peerDependencies: eslint: '>6.6.0' dependencies: From 74e25592612871483f39dc441ce836847d95c9ba Mon Sep 17 00:00:00 2001 From: Pavel Zaborskii Date: Sat, 23 Nov 2024 00:34:37 +0100 Subject: [PATCH 14/52] fix: typos in stake-pool comments and output messages (#7516) * Typo * Typo --- stake-pool/cli/src/output.rs | 4 ++-- stake-pool/py/stake_pool/instructions.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stake-pool/cli/src/output.rs b/stake-pool/cli/src/output.rs index 5eeb81bcdbd..39d85a0bcac 100644 --- a/stake-pool/cli/src/output.rs +++ b/stake-pool/cli/src/output.rs @@ -116,7 +116,7 @@ impl VerboseDisplay for CliStakePool { match &self.preferred_withdraw_validator_vote_address { None => {} Some(s) => { - writeln!(w, "Preferred Withraw Validator: {}", s)?; + writeln!(w, "Preferred Withdraw Validator: {}", s)?; } } writeln!(w, "Epoch Fee: {} of epoch rewards", &self.epoch_fee)?; @@ -197,7 +197,7 @@ impl Display for CliStakePool { match &self.preferred_withdraw_validator_vote_address { None => {} Some(s) => { - writeln!(f, "Preferred Withraw Validator: {}", s)?; + writeln!(f, "Preferred Withdraw Validator: {}", s)?; } } writeln!(f, "Epoch Fee: {} of epoch rewards", &self.epoch_fee)?; diff --git a/stake-pool/py/stake_pool/instructions.py b/stake-pool/py/stake_pool/instructions.py index e5d9199cd6f..493d2251977 100644 --- a/stake-pool/py/stake_pool/instructions.py +++ b/stake-pool/py/stake_pool/instructions.py @@ -368,7 +368,7 @@ class WithdrawStakeParams(NamedTuple): validator_stake: Pubkey """`[w]` Validator or reserve stake account to split""" destination_stake: Pubkey - """`[w]` Unitialized stake account to receive withdrawal""" + """`[w]` Uninitialized stake account to receive withdrawal""" destination_stake_authority: Pubkey """`[]` User account to set as a new withdraw authority""" source_transfer_authority: Pubkey From 4349310b4a6a3fa1a191fe437af90279fa518a4a Mon Sep 17 00:00:00 2001 From: Jon C Date: Mon, 25 Nov 2024 10:27:28 +0100 Subject: [PATCH 15/52] token-2022: Add scaled amount extension (#7511) * token-2022: Add scaled amount extension #### Problem The interest-bearing extension is useful for tokens that accrue in value constantly, but many "rebasing" tokens on other blockchains employ a different method of updating the number of tokens in accounts. Rather than setting a rate and allowing the number to change automatically over time, they set a scaling factor for the tokens by hand. #### Summary of changes Add a new `ScaledUiAmount` extension to token-2022 for doing just that. This is essentially a simplified version of the interest-bearing extension, where someone just sets a scaling value into the mint directly. The scale has no impact on the operation of the token, just on the output of `amount_to_ui_amount` and `ui_amount_to_amount`. * Add timestamp, rename to "multiplier" * Update token/program-2022/src/extension/scaled_ui_amount/mod.rs Co-authored-by: samkim-crypto * Address feedback --------- Co-authored-by: samkim-crypto --- token/client/src/token.rs | 44 +- .../tests/scaled_ui_amount.rs | 379 ++++++++++++++++++ token/program-2022/src/error.rs | 6 + token/program-2022/src/extension/mod.rs | 17 +- .../extension/scaled_ui_amount/instruction.rs | 143 +++++++ .../src/extension/scaled_ui_amount/mod.rs | 341 ++++++++++++++++ .../extension/scaled_ui_amount/processor.rs | 126 ++++++ token/program-2022/src/instruction.rs | 11 + token/program-2022/src/pod_instruction.rs | 1 + token/program-2022/src/processor.rs | 33 +- 10 files changed, 1097 insertions(+), 4 deletions(-) create mode 100644 token/program-2022-test/tests/scaled_ui_amount.rs create mode 100644 token/program-2022/src/extension/scaled_ui_amount/instruction.rs create mode 100644 token/program-2022/src/extension/scaled_ui_amount/mod.rs create mode 100644 token/program-2022/src/extension/scaled_ui_amount/processor.rs diff --git a/token/client/src/token.rs b/token/client/src/token.rs index a1b773b91dd..20cae87c1fe 100644 --- a/token/client/src/token.rs +++ b/token/client/src/token.rs @@ -43,8 +43,9 @@ use { ConfidentialTransferFeeConfig, }, cpi_guard, default_account_state, group_member_pointer, group_pointer, - interest_bearing_mint, memo_transfer, metadata_pointer, transfer_fee, transfer_hook, - BaseStateWithExtensions, Extension, ExtensionType, StateWithExtensionsOwned, + interest_bearing_mint, memo_transfer, metadata_pointer, scaled_ui_amount, transfer_fee, + transfer_hook, BaseStateWithExtensions, Extension, ExtensionType, + StateWithExtensionsOwned, }, instruction, offchain, solana_zk_sdk::{ @@ -188,6 +189,10 @@ pub enum ExtensionInitializationParams { authority: Option, member_address: Option, }, + ScaledUiAmountConfig { + authority: Option, + multiplier: f64, + }, } impl ExtensionInitializationParams { /// Get the extension type associated with the init params @@ -207,6 +212,7 @@ impl ExtensionInitializationParams { } Self::GroupPointer { .. } => ExtensionType::GroupPointer, Self::GroupMemberPointer { .. } => ExtensionType::GroupMemberPointer, + Self::ScaledUiAmountConfig { .. } => ExtensionType::ScaledUiAmount, } } /// Generate an appropriate initialization instruction for the given mint @@ -316,6 +322,15 @@ impl ExtensionInitializationParams { authority, member_address, ), + Self::ScaledUiAmountConfig { + authority, + multiplier, + } => scaled_ui_amount::instruction::initialize( + token_program_id, + mint, + authority, + multiplier, + ), } } } @@ -1805,6 +1820,31 @@ where .await } + /// Update multiplier + pub async fn update_multiplier( + &self, + authority: &Pubkey, + new_multiplier: f64, + new_multiplier_effective_timestamp: i64, + signing_keypairs: &S, + ) -> TokenResult { + let signing_pubkeys = signing_keypairs.pubkeys(); + let multisig_signers = self.get_multisig_signers(authority, &signing_pubkeys); + + self.process_ixs( + &[scaled_ui_amount::instruction::update_multiplier( + &self.program_id, + self.get_address(), + authority, + &multisig_signers, + new_multiplier, + new_multiplier_effective_timestamp, + )?], + signing_keypairs, + ) + .await + } + /// Update transfer hook program id pub async fn update_transfer_hook_program_id( &self, diff --git a/token/program-2022-test/tests/scaled_ui_amount.rs b/token/program-2022-test/tests/scaled_ui_amount.rs new file mode 100644 index 00000000000..062e6fafad8 --- /dev/null +++ b/token/program-2022-test/tests/scaled_ui_amount.rs @@ -0,0 +1,379 @@ +#![cfg(feature = "test-sbf")] + +mod program_test; +use { + program_test::{keypair_clone, TestContext, TokenContext}, + solana_program_test::{ + processor, + tokio::{self, sync::Mutex}, + ProgramTest, + }, + solana_sdk::{ + account_info::{next_account_info, AccountInfo}, + entrypoint::ProgramResult, + instruction::{AccountMeta, Instruction, InstructionError}, + msg, + program::{get_return_data, invoke}, + program_error::ProgramError, + pubkey::Pubkey, + signature::Signer, + signer::keypair::Keypair, + transaction::{Transaction, TransactionError}, + transport::TransportError, + }, + spl_token_2022::{ + error::TokenError, + extension::{scaled_ui_amount::ScaledUiAmountConfig, BaseStateWithExtensions}, + instruction::{amount_to_ui_amount, ui_amount_to_amount, AuthorityType}, + processor::Processor, + }, + spl_token_client::token::{ExtensionInitializationParams, TokenError as TokenClientError}, + std::{convert::TryInto, sync::Arc}, +}; + +#[tokio::test] +async fn success_initialize() { + for (multiplier, authority) in [ + (f64::MIN_POSITIVE, None), + (f64::MAX, Some(Pubkey::new_unique())), + ] { + let mut context = TestContext::new().await; + context + .init_token_with_mint(vec![ExtensionInitializationParams::ScaledUiAmountConfig { + authority, + multiplier, + }]) + .await + .unwrap(); + let TokenContext { token, .. } = context.token_context.unwrap(); + + let state = token.get_mint_info().await.unwrap(); + let extension = state.get_extension::().unwrap(); + assert_eq!(Option::::from(extension.authority), authority,); + assert_eq!(f64::from(extension.multiplier), multiplier); + assert_eq!(f64::from(extension.new_multiplier), multiplier); + assert_eq!(i64::from(extension.new_multiplier_effective_timestamp), 0); + } +} + +#[tokio::test] +async fn fail_initialize_with_interest_bearing() { + let authority = None; + let mut context = TestContext::new().await; + let err = context + .init_token_with_mint(vec![ + ExtensionInitializationParams::ScaledUiAmountConfig { + authority, + multiplier: 1.0, + }, + ExtensionInitializationParams::InterestBearingConfig { + rate_authority: None, + rate: 0, + }, + ]) + .await + .unwrap_err(); + assert_eq!( + err, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 3, + InstructionError::Custom(TokenError::InvalidExtensionCombination as u32) + ) + ))) + ); +} + +#[tokio::test] +async fn fail_initialize_with_bad_multiplier() { + let mut context = TestContext::new().await; + let err = context + .init_token_with_mint(vec![ExtensionInitializationParams::ScaledUiAmountConfig { + authority: None, + multiplier: 0.0, + }]) + .await + .unwrap_err(); + assert_eq!( + err, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 1, + InstructionError::Custom(TokenError::InvalidScale as u32) + ) + ))) + ); +} + +#[tokio::test] +async fn update_multiplier() { + let authority = Keypair::new(); + let initial_multiplier = 5.0; + let mut context = TestContext::new().await; + context + .init_token_with_mint(vec![ExtensionInitializationParams::ScaledUiAmountConfig { + authority: Some(authority.pubkey()), + multiplier: initial_multiplier, + }]) + .await + .unwrap(); + let TokenContext { token, .. } = context.token_context.take().unwrap(); + + let state = token.get_mint_info().await.unwrap(); + let extension = state.get_extension::().unwrap(); + assert_eq!(f64::from(extension.multiplier), initial_multiplier); + assert_eq!(f64::from(extension.new_multiplier), initial_multiplier); + + // correct + let new_multiplier = 10.0; + token + .update_multiplier(&authority.pubkey(), new_multiplier, 0, &[&authority]) + .await + .unwrap(); + let state = token.get_mint_info().await.unwrap(); + let extension = state.get_extension::().unwrap(); + assert_eq!(f64::from(extension.multiplier), new_multiplier); + assert_eq!(f64::from(extension.new_multiplier), new_multiplier); + assert_eq!(i64::from(extension.new_multiplier_effective_timestamp), 0); + + // fail, bad number + let err = token + .update_multiplier(&authority.pubkey(), f64::INFINITY, 0, &[&authority]) + .await + .unwrap_err(); + assert_eq!( + err, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::InvalidScale as u32) + ) + ))) + ); + + // correct in the future + let newest_multiplier = 100.0; + token + .update_multiplier( + &authority.pubkey(), + newest_multiplier, + i64::MAX, + &[&authority], + ) + .await + .unwrap(); + let state = token.get_mint_info().await.unwrap(); + let extension = state.get_extension::().unwrap(); + assert_eq!(f64::from(extension.multiplier), new_multiplier); + assert_eq!(f64::from(extension.new_multiplier), newest_multiplier); + assert_eq!( + i64::from(extension.new_multiplier_effective_timestamp), + i64::MAX + ); + + // wrong signer + let wrong_signer = Keypair::new(); + let err = token + .update_multiplier(&wrong_signer.pubkey(), 1.0, 0, &[&wrong_signer]) + .await + .unwrap_err(); + assert_eq!( + err, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::OwnerMismatch as u32) + ) + ))) + ); +} + +#[tokio::test] +async fn set_authority() { + let authority = Keypair::new(); + let initial_multiplier = 500.0; + let mut context = TestContext::new().await; + context + .init_token_with_mint(vec![ExtensionInitializationParams::ScaledUiAmountConfig { + authority: Some(authority.pubkey()), + multiplier: initial_multiplier, + }]) + .await + .unwrap(); + let TokenContext { token, .. } = context.token_context.take().unwrap(); + + // success + let new_authority = Keypair::new(); + token + .set_authority( + token.get_address(), + &authority.pubkey(), + Some(&new_authority.pubkey()), + AuthorityType::ScaledUiAmount, + &[&authority], + ) + .await + .unwrap(); + let state = token.get_mint_info().await.unwrap(); + let extension = state.get_extension::().unwrap(); + assert_eq!( + extension.authority, + Some(new_authority.pubkey()).try_into().unwrap(), + ); + token + .update_multiplier(&new_authority.pubkey(), 10.0, 0, &[&new_authority]) + .await + .unwrap(); + let err = token + .update_multiplier(&authority.pubkey(), 100.0, 0, &[&authority]) + .await + .unwrap_err(); + assert_eq!( + err, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::OwnerMismatch as u32) + ) + ))) + ); + + // set to none + token + .set_authority( + token.get_address(), + &new_authority.pubkey(), + None, + AuthorityType::ScaledUiAmount, + &[&new_authority], + ) + .await + .unwrap(); + let state = token.get_mint_info().await.unwrap(); + let extension = state.get_extension::().unwrap(); + assert_eq!(extension.authority, None.try_into().unwrap(),); + + // now all fail + let err = token + .update_multiplier(&new_authority.pubkey(), 50.0, 0, &[&new_authority]) + .await + .unwrap_err(); + assert_eq!( + err, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::NoAuthorityExists as u32) + ) + ))) + ); + let err = token + .update_multiplier(&authority.pubkey(), 5.5, 0, &[&authority]) + .await + .unwrap_err(); + assert_eq!( + err, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::NoAuthorityExists as u32) + ) + ))) + ); +} + +// test program to CPI into token to get ui amounts +fn process_instruction( + _program_id: &Pubkey, + accounts: &[AccountInfo], + _input: &[u8], +) -> ProgramResult { + let account_info_iter = &mut accounts.iter(); + let mint_info = next_account_info(account_info_iter)?; + let token_program = next_account_info(account_info_iter)?; + // 10 tokens, with 9 decimal places + let test_amount = 10_000_000_000; + // "10" as an amount should be smaller than test_amount due to interest + invoke( + &ui_amount_to_amount(token_program.key, mint_info.key, "50")?, + &[mint_info.clone(), token_program.clone()], + )?; + let (_, return_data) = get_return_data().unwrap(); + let amount = u64::from_le_bytes(return_data[0..8].try_into().unwrap()); + msg!("amount: {}", amount); + if amount != test_amount { + return Err(ProgramError::InvalidInstructionData); + } + + // test_amount as a UI amount should be larger due to interest + invoke( + &amount_to_ui_amount(token_program.key, mint_info.key, test_amount)?, + &[mint_info.clone(), token_program.clone()], + )?; + let (_, return_data) = get_return_data().unwrap(); + let ui_amount = String::from_utf8(return_data).unwrap(); + msg!("ui amount: {}", ui_amount); + let float_ui_amount = ui_amount.parse::().unwrap(); + if float_ui_amount != 50.0 { + return Err(ProgramError::InvalidInstructionData); + } + Ok(()) +} + +#[tokio::test] +async fn amount_conversions() { + let authority = Keypair::new(); + let mut program_test = ProgramTest::default(); + program_test.prefer_bpf(false); + program_test.add_program( + "spl_token_2022", + spl_token_2022::id(), + processor!(Processor::process), + ); + let program_id = Pubkey::new_unique(); + program_test.add_program( + "ui_amount_to_amount", + program_id, + processor!(process_instruction), + ); + + let context = program_test.start_with_context().await; + let payer = keypair_clone(&context.payer); + let last_blockhash = context.last_blockhash; + let context = Arc::new(Mutex::new(context)); + let mut context = TestContext { + context, + token_context: None, + }; + let initial_multiplier = 5.0; + context + .init_token_with_mint(vec![ExtensionInitializationParams::ScaledUiAmountConfig { + authority: Some(authority.pubkey()), + multiplier: initial_multiplier, + }]) + .await + .unwrap(); + let TokenContext { token, .. } = context.token_context.take().unwrap(); + + let transaction = Transaction::new_signed_with_payer( + &[Instruction { + program_id, + accounts: vec![ + AccountMeta::new_readonly(*token.get_address(), false), + AccountMeta::new_readonly(spl_token_2022::id(), false), + ], + data: vec![], + }], + Some(&payer.pubkey()), + &[&payer], + last_blockhash, + ); + context + .context + .lock() + .await + .banks_client + .process_transaction(transaction) + .await + .unwrap(); +} diff --git a/token/program-2022/src/error.rs b/token/program-2022/src/error.rs index 832ccf65715..77f20cf5877 100644 --- a/token/program-2022/src/error.rs +++ b/token/program-2022/src/error.rs @@ -263,6 +263,9 @@ pub enum TokenError { /// Withdraw / Deposit not allowed for confidential-mint-burn #[error("Withdraw / Deposit not allowed for confidential-mint-burn")] IllegalMintBurnConversion, + /// Invalid scale for scaled ui amount + #[error("Invalid scale for scaled ui amount")] + InvalidScale, } impl From for ProgramError { fn from(e: TokenError) -> Self { @@ -453,6 +456,9 @@ impl PrintProgramError for TokenError { TokenError::IllegalMintBurnConversion => { msg!("Conversions from normal to confidential token balance and vice versa are illegal if the confidential-mint-burn extension is enabled") } + TokenError::InvalidScale => { + msg!("Invalid scale for scaled ui amount") + } } } } diff --git a/token/program-2022/src/extension/mod.rs b/token/program-2022/src/extension/mod.rs index 76bdb092c8e..d3f45977041 100644 --- a/token/program-2022/src/extension/mod.rs +++ b/token/program-2022/src/extension/mod.rs @@ -22,6 +22,7 @@ use { mint_close_authority::MintCloseAuthority, non_transferable::{NonTransferable, NonTransferableAccount}, permanent_delegate::PermanentDelegate, + scaled_ui_amount::ScaledUiAmountConfig, transfer_fee::{TransferFeeAmount, TransferFeeConfig}, transfer_hook::{TransferHook, TransferHookAccount}, }, @@ -76,6 +77,8 @@ pub mod non_transferable; pub mod permanent_delegate; /// Utility to reallocate token accounts pub mod reallocate; +/// Scaled UI Amount extension +pub mod scaled_ui_amount; /// Token-group extension pub mod token_group; /// Token-metadata extension @@ -1109,6 +1112,8 @@ pub enum ExtensionType { TokenGroupMember, /// Mint allowing the minting and burning of confidential tokens ConfidentialMintBurn, + /// Tokens whose UI amount is scaled by a given amount + ScaledUiAmount, /// Test variable-length mint extension #[cfg(test)] @@ -1191,6 +1196,7 @@ impl ExtensionType { ExtensionType::GroupMemberPointer => pod_get_packed_len::(), ExtensionType::TokenGroupMember => pod_get_packed_len::(), ExtensionType::ConfidentialMintBurn => pod_get_packed_len::(), + ExtensionType::ScaledUiAmount => pod_get_packed_len::(), #[cfg(test)] ExtensionType::AccountPaddingTest => pod_get_packed_len::(), #[cfg(test)] @@ -1255,7 +1261,8 @@ impl ExtensionType { | ExtensionType::TokenGroup | ExtensionType::GroupMemberPointer | ExtensionType::ConfidentialMintBurn - | ExtensionType::TokenGroupMember => AccountType::Mint, + | ExtensionType::TokenGroupMember + | ExtensionType::ScaledUiAmount => AccountType::Mint, ExtensionType::ImmutableOwner | ExtensionType::TransferFeeAmount | ExtensionType::ConfidentialTransferAccount @@ -1307,6 +1314,8 @@ impl ExtensionType { let mut confidential_transfer_mint = false; let mut confidential_transfer_fee_config = false; let mut confidential_mint_burn = false; + let mut interest_bearing = false; + let mut scaled_ui_amount = false; for extension_type in mint_extension_types { match extension_type { @@ -1316,6 +1325,8 @@ impl ExtensionType { confidential_transfer_fee_config = true } ExtensionType::ConfidentialMintBurn => confidential_mint_burn = true, + ExtensionType::InterestBearingConfig => interest_bearing = true, + ExtensionType::ScaledUiAmount => scaled_ui_amount = true, _ => (), } } @@ -1333,6 +1344,10 @@ impl ExtensionType { return Err(TokenError::InvalidExtensionCombination); } + if scaled_ui_amount && interest_bearing { + return Err(TokenError::InvalidExtensionCombination); + } + Ok(()) } } diff --git a/token/program-2022/src/extension/scaled_ui_amount/instruction.rs b/token/program-2022/src/extension/scaled_ui_amount/instruction.rs new file mode 100644 index 00000000000..cb939f6a675 --- /dev/null +++ b/token/program-2022/src/extension/scaled_ui_amount/instruction.rs @@ -0,0 +1,143 @@ +#[cfg(feature = "serde-traits")] +use serde::{Deserialize, Serialize}; +use { + crate::{ + check_program_account, + extension::scaled_ui_amount::{PodF64, UnixTimestamp}, + instruction::{encode_instruction, TokenInstruction}, + }, + bytemuck::{Pod, Zeroable}, + num_enum::{IntoPrimitive, TryFromPrimitive}, + solana_program::{ + instruction::{AccountMeta, Instruction}, + program_error::ProgramError, + pubkey::Pubkey, + }, + spl_pod::optional_keys::OptionalNonZeroPubkey, + std::convert::TryInto, +}; + +/// Interesting-bearing mint extension instructions +#[cfg_attr(feature = "serde-traits", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde-traits", serde(rename_all = "camelCase"))] +#[derive(Clone, Copy, Debug, PartialEq, IntoPrimitive, TryFromPrimitive)] +#[repr(u8)] +pub enum ScaledUiAmountMintInstruction { + /// Initialize a new mint with scaled UI amounts. + /// + /// Fails if the mint has already been initialized, so must be called before + /// `InitializeMint`. + /// + /// Fails if the multiplier is less than or equal to 0 or if it's + /// [subnormal](https://en.wikipedia.org/wiki/Subnormal_number). + /// + /// The mint must have exactly enough space allocated for the base mint (82 + /// bytes), plus 83 bytes of padding, 1 byte reserved for the account type, + /// then space required for this extension, plus any others. + /// + /// Accounts expected by this instruction: + /// + /// 0. `[writable]` The mint to initialize. + /// + /// Data expected by this instruction: + /// `crate::extension::scaled_ui_amount::instruction::InitializeInstructionData` + Initialize, + /// Update the multiplier. Only supported for mints that include the + /// `ScaledUiAmount` extension. + /// + /// Fails if the multiplier is less than or equal to 0 or if it's + /// [subnormal](https://en.wikipedia.org/wiki/Subnormal_number). + /// + /// The authority provides a new multiplier and a unix timestamp on which + /// it should take effect. If the timestamp is before the current time, + /// immediately sets the multiplier. + /// + /// Accounts expected by this instruction: + /// + /// * Single authority + /// 0. `[writable]` The mint. + /// 1. `[signer]` The multiplier authority. + /// + /// * Multisignature authority + /// 0. `[writable]` The mint. + /// 1. `[]` The mint's multisignature multiplier authority. + /// 2. `..2+M` `[signer]` M signer accounts. + /// + /// Data expected by this instruction: + /// `crate::extension::scaled_ui_amount::instruction::UpdateMultiplierInstructionData` + UpdateMultiplier, +} + +/// Data expected by `ScaledUiAmountMint::Initialize` +#[cfg_attr(feature = "serde-traits", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde-traits", serde(rename_all = "camelCase"))] +#[derive(Clone, Copy, Pod, Zeroable)] +#[repr(C)] +pub struct InitializeInstructionData { + /// The public key for the account that can update the multiplier + pub authority: OptionalNonZeroPubkey, + /// The initial multiplier + pub multiplier: PodF64, +} + +/// Data expected by `ScaledUiAmountMint::UpdateMultiplier` +#[cfg_attr(feature = "serde-traits", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde-traits", serde(rename_all = "camelCase"))] +#[derive(Clone, Copy, Pod, Zeroable)] +#[repr(C)] +pub struct UpdateMultiplierInstructionData { + /// The new multiplier + pub multiplier: PodF64, + /// Timestamp at which the new multiplier will take effect + pub effective_timestamp: UnixTimestamp, +} + +/// Create an `Initialize` instruction +pub fn initialize( + token_program_id: &Pubkey, + mint: &Pubkey, + authority: Option, + multiplier: f64, +) -> Result { + check_program_account(token_program_id)?; + let accounts = vec![AccountMeta::new(*mint, false)]; + Ok(encode_instruction( + token_program_id, + accounts, + TokenInstruction::ScaledUiAmountExtension, + ScaledUiAmountMintInstruction::Initialize, + &InitializeInstructionData { + authority: authority.try_into()?, + multiplier: multiplier.into(), + }, + )) +} + +/// Create an `UpdateMultiplier` instruction +pub fn update_multiplier( + token_program_id: &Pubkey, + mint: &Pubkey, + authority: &Pubkey, + signers: &[&Pubkey], + multiplier: f64, + effective_timestamp: i64, +) -> Result { + check_program_account(token_program_id)?; + let mut accounts = vec![ + AccountMeta::new(*mint, false), + AccountMeta::new_readonly(*authority, signers.is_empty()), + ]; + for signer_pubkey in signers.iter() { + accounts.push(AccountMeta::new_readonly(**signer_pubkey, true)); + } + Ok(encode_instruction( + token_program_id, + accounts, + TokenInstruction::ScaledUiAmountExtension, + ScaledUiAmountMintInstruction::UpdateMultiplier, + &UpdateMultiplierInstructionData { + effective_timestamp: effective_timestamp.into(), + multiplier: multiplier.into(), + }, + )) +} diff --git a/token/program-2022/src/extension/scaled_ui_amount/mod.rs b/token/program-2022/src/extension/scaled_ui_amount/mod.rs new file mode 100644 index 00000000000..839caf585c5 --- /dev/null +++ b/token/program-2022/src/extension/scaled_ui_amount/mod.rs @@ -0,0 +1,341 @@ +#[cfg(feature = "serde-traits")] +use serde::{Deserialize, Serialize}; +use { + crate::extension::{Extension, ExtensionType}, + bytemuck::{Pod, Zeroable}, + solana_program::program_error::ProgramError, + spl_pod::{optional_keys::OptionalNonZeroPubkey, primitives::PodI64}, +}; + +/// Scaled UI amount extension instructions +pub mod instruction; + +/// Scaled UI amount extension processor +pub mod processor; + +/// `UnixTimestamp` expressed with an alignment-independent type +pub type UnixTimestamp = PodI64; + +/// `f64` type that can be used in `Pod`s +#[cfg_attr(feature = "serde-traits", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde-traits", serde(from = "f64", into = "f64"))] +#[derive(Clone, Copy, Debug, Default, PartialEq, Pod, Zeroable)] +#[repr(transparent)] +pub struct PodF64(pub [u8; 8]); +impl PodF64 { + fn from_primitive(n: f64) -> Self { + Self(n.to_le_bytes()) + } +} +impl From for PodF64 { + fn from(n: f64) -> Self { + Self::from_primitive(n) + } +} +impl From for f64 { + fn from(pod: PodF64) -> Self { + Self::from_le_bytes(pod.0) + } +} + +/// Scaled UI amount extension data for mints +#[repr(C)] +#[cfg_attr(feature = "serde-traits", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde-traits", serde(rename_all = "camelCase"))] +#[derive(Clone, Copy, Debug, Default, PartialEq, Pod, Zeroable)] +pub struct ScaledUiAmountConfig { + /// Authority that can set the scaling amount and authority + pub authority: OptionalNonZeroPubkey, + /// Amount to multiply raw amounts by, outside of the decimal + pub multiplier: PodF64, + /// Unix timestamp at which `new_multiplier` comes into effective + pub new_multiplier_effective_timestamp: UnixTimestamp, + /// Next multiplier, once `new_multiplier_effective_timestamp` is reached + pub new_multiplier: PodF64, +} +impl ScaledUiAmountConfig { + fn total_multiplier(&self, decimals: u8, unix_timestamp: i64) -> f64 { + let multiplier = if unix_timestamp >= self.new_multiplier_effective_timestamp.into() { + self.new_multiplier + } else { + self.multiplier + }; + f64::from(multiplier) / 10_f64.powi(decimals as i32) + } + + /// Convert a raw amount to its UI representation using the given decimals + /// field. Excess zeroes or unneeded decimal point are trimmed. + pub fn amount_to_ui_amount( + &self, + amount: u64, + decimals: u8, + unix_timestamp: i64, + ) -> Option { + let scaled_amount = (amount as f64) * self.total_multiplier(decimals, unix_timestamp); + Some(scaled_amount.to_string()) + } + + /// Try to convert a UI representation of a token amount to its raw amount + /// using the given decimals field + pub fn try_ui_amount_into_amount( + &self, + ui_amount: &str, + decimals: u8, + unix_timestamp: i64, + ) -> Result { + let scaled_amount = ui_amount + .parse::() + .map_err(|_| ProgramError::InvalidArgument)?; + let amount = scaled_amount / self.total_multiplier(decimals, unix_timestamp); + if amount > (u64::MAX as f64) || amount < (u64::MIN as f64) || amount.is_nan() { + Err(ProgramError::InvalidArgument) + } else { + // this is important, if you round earlier, you'll get wrong "inf" + // answers + Ok(amount.round() as u64) + } + } +} +impl Extension for ScaledUiAmountConfig { + const TYPE: ExtensionType = ExtensionType::ScaledUiAmount; +} + +#[cfg(test)] +mod tests { + use {super::*, proptest::prelude::*}; + + const TEST_DECIMALS: u8 = 2; + + #[test] + fn multiplier_choice() { + let multiplier = 5.0; + let new_multiplier = 10.0; + let new_multiplier_effective_timestamp = 1; + let config = ScaledUiAmountConfig { + authority: OptionalNonZeroPubkey::default(), + multiplier: PodF64::from(multiplier), + new_multiplier: PodF64::from(new_multiplier), + new_multiplier_effective_timestamp: UnixTimestamp::from( + new_multiplier_effective_timestamp, + ), + }; + assert_eq!( + config.total_multiplier(0, new_multiplier_effective_timestamp), + new_multiplier + ); + assert_eq!( + config.total_multiplier(0, new_multiplier_effective_timestamp - 1), + multiplier + ); + assert_eq!(config.total_multiplier(0, 0), multiplier); + assert_eq!(config.total_multiplier(0, i64::MIN), multiplier); + assert_eq!(config.total_multiplier(0, i64::MAX), new_multiplier); + } + + #[test] + fn specific_amount_to_ui_amount() { + // 5x + let config = ScaledUiAmountConfig { + authority: OptionalNonZeroPubkey::default(), + multiplier: PodF64::from(5.0), + new_multiplier_effective_timestamp: UnixTimestamp::from(1), + ..Default::default() + }; + let ui_amount = config.amount_to_ui_amount(1, 0, 0).unwrap(); + assert_eq!(ui_amount, "5"); + // with 1 decimal place + let ui_amount = config.amount_to_ui_amount(1, 1, 0).unwrap(); + assert_eq!(ui_amount, "0.5"); + // with 10 decimal places + let ui_amount = config.amount_to_ui_amount(1, 10, 0).unwrap(); + assert_eq!(ui_amount, "0.0000000005"); + + // huge amount with 10 decimal places + let ui_amount = config.amount_to_ui_amount(10_000_000_000, 10, 0).unwrap(); + assert_eq!(ui_amount, "5"); + + // huge values + let config = ScaledUiAmountConfig { + authority: OptionalNonZeroPubkey::default(), + multiplier: PodF64::from(f64::MAX), + new_multiplier_effective_timestamp: UnixTimestamp::from(1), + ..Default::default() + }; + let ui_amount = config.amount_to_ui_amount(u64::MAX, 0, 0).unwrap(); + assert_eq!(ui_amount, "inf"); + } + + #[test] + fn specific_ui_amount_to_amount() { + // constant 5x + let config = ScaledUiAmountConfig { + authority: OptionalNonZeroPubkey::default(), + multiplier: 5.0.into(), + new_multiplier_effective_timestamp: UnixTimestamp::from(1), + ..Default::default() + }; + let amount = config.try_ui_amount_into_amount("5.0", 0, 0).unwrap(); + assert_eq!(1, amount); + // with 1 decimal place + let amount = config + .try_ui_amount_into_amount("0.500000000", 1, 0) + .unwrap(); + assert_eq!(amount, 1); + // with 10 decimal places + let amount = config + .try_ui_amount_into_amount("0.00000000050000000000000000", 10, 0) + .unwrap(); + assert_eq!(amount, 1); + + // huge amount with 10 decimal places + let amount = config + .try_ui_amount_into_amount("5.0000000000000000", 10, 0) + .unwrap(); + assert_eq!(amount, 10_000_000_000); + + // huge values + let config = ScaledUiAmountConfig { + authority: OptionalNonZeroPubkey::default(), + multiplier: 5.0.into(), + new_multiplier_effective_timestamp: UnixTimestamp::from(1), + ..Default::default() + }; + let amount = config + .try_ui_amount_into_amount("92233720368547758075", 0, 0) + .unwrap(); + assert_eq!(amount, u64::MAX); + let config = ScaledUiAmountConfig { + authority: OptionalNonZeroPubkey::default(), + multiplier: f64::MAX.into(), + new_multiplier_effective_timestamp: UnixTimestamp::from(1), + ..Default::default() + }; + // scientific notation "e" + let amount = config + .try_ui_amount_into_amount("1.7976931348623157e308", 0, 0) + .unwrap(); + assert_eq!(amount, 1); + let config = ScaledUiAmountConfig { + authority: OptionalNonZeroPubkey::default(), + multiplier: 9.745314011399998e288.into(), + new_multiplier_effective_timestamp: UnixTimestamp::from(1), + ..Default::default() + }; + let amount = config + .try_ui_amount_into_amount("1.7976931348623157e308", 0, 0) + .unwrap(); + assert_eq!(amount, u64::MAX); + // scientific notation "E" + let amount = config + .try_ui_amount_into_amount("1.7976931348623157E308", 0, 0) + .unwrap(); + assert_eq!(amount, u64::MAX); + + // this is unfortunate, but underflows can happen due to floats + let config = ScaledUiAmountConfig { + authority: OptionalNonZeroPubkey::default(), + multiplier: 1.0.into(), + new_multiplier_effective_timestamp: UnixTimestamp::from(1), + ..Default::default() + }; + assert_eq!( + u64::MAX, + config + .try_ui_amount_into_amount("18446744073709551616", 0, 0) + .unwrap() // u64::MAX + 1 + ); + + // overflow u64 fail + let config = ScaledUiAmountConfig { + authority: OptionalNonZeroPubkey::default(), + multiplier: 0.1.into(), + new_multiplier_effective_timestamp: UnixTimestamp::from(1), + ..Default::default() + }; + assert_eq!( + Err(ProgramError::InvalidArgument), + config.try_ui_amount_into_amount("18446744073709551615", 0, 0) // u64::MAX + 1 + ); + + for fail_ui_amount in ["-0.0000000000000000000001", "inf", "-inf", "NaN"] { + assert_eq!( + Err(ProgramError::InvalidArgument), + config.try_ui_amount_into_amount(fail_ui_amount, 0, 0) + ); + } + } + + #[test] + fn specific_amount_to_ui_amount_no_scale() { + let config = ScaledUiAmountConfig { + authority: OptionalNonZeroPubkey::default(), + multiplier: 1.0.into(), + new_multiplier_effective_timestamp: UnixTimestamp::from(1), + ..Default::default() + }; + for (amount, expected) in [(23, "0.23"), (110, "1.1"), (4200, "42"), (0, "0")] { + let ui_amount = config + .amount_to_ui_amount(amount, TEST_DECIMALS, 0) + .unwrap(); + assert_eq!(ui_amount, expected); + } + } + + #[test] + fn specific_ui_amount_to_amount_no_scale() { + let config = ScaledUiAmountConfig { + authority: OptionalNonZeroPubkey::default(), + multiplier: 1.0.into(), + new_multiplier_effective_timestamp: UnixTimestamp::from(1), + ..Default::default() + }; + for (ui_amount, expected) in [ + ("0.23", 23), + ("0.20", 20), + ("0.2000", 20), + (".2", 20), + ("1.1", 110), + ("1.10", 110), + ("42", 4200), + ("42.", 4200), + ("0", 0), + ] { + let amount = config + .try_ui_amount_into_amount(ui_amount, TEST_DECIMALS, 0) + .unwrap(); + assert_eq!(expected, amount); + } + + // this is invalid with normal mints, but rounding for this mint makes it ok + let amount = config + .try_ui_amount_into_amount("0.111", TEST_DECIMALS, 0) + .unwrap(); + assert_eq!(11, amount); + + // fail if invalid ui_amount passed in + for ui_amount in ["", ".", "0.t"] { + assert_eq!( + Err(ProgramError::InvalidArgument), + config.try_ui_amount_into_amount(ui_amount, TEST_DECIMALS, 0), + ); + } + } + + proptest! { + #[test] + fn amount_to_ui_amount( + scale in 0f64..=f64::MAX, + amount in 0..=u64::MAX, + decimals in 0u8..20u8, + ) { + let config = ScaledUiAmountConfig { + authority: OptionalNonZeroPubkey::default(), + multiplier: scale.into(), + new_multiplier_effective_timestamp: UnixTimestamp::from(1), + ..Default::default() + }; + let ui_amount = config.amount_to_ui_amount(amount, decimals, 0); + assert!(ui_amount.is_some()); + } + } +} diff --git a/token/program-2022/src/extension/scaled_ui_amount/processor.rs b/token/program-2022/src/extension/scaled_ui_amount/processor.rs new file mode 100644 index 00000000000..1199a64c804 --- /dev/null +++ b/token/program-2022/src/extension/scaled_ui_amount/processor.rs @@ -0,0 +1,126 @@ +use { + crate::{ + check_program_account, + error::TokenError, + extension::{ + scaled_ui_amount::{ + instruction::{ + InitializeInstructionData, ScaledUiAmountMintInstruction, + UpdateMultiplierInstructionData, + }, + PodF64, ScaledUiAmountConfig, UnixTimestamp, + }, + BaseStateWithExtensionsMut, PodStateWithExtensionsMut, + }, + instruction::{decode_instruction_data, decode_instruction_type}, + pod::PodMint, + processor::Processor, + }, + solana_program::{ + account_info::{next_account_info, AccountInfo}, + clock::Clock, + entrypoint::ProgramResult, + msg, + pubkey::Pubkey, + sysvar::Sysvar, + }, + spl_pod::optional_keys::OptionalNonZeroPubkey, +}; + +fn try_validate_multiplier(multiplier: &PodF64) -> ProgramResult { + let float_multiplier = f64::from(*multiplier); + if float_multiplier.is_sign_positive() && float_multiplier.is_normal() { + Ok(()) + } else { + Err(TokenError::InvalidScale.into()) + } +} + +fn process_initialize( + _program_id: &Pubkey, + accounts: &[AccountInfo], + authority: &OptionalNonZeroPubkey, + multiplier: &PodF64, +) -> ProgramResult { + let account_info_iter = &mut accounts.iter(); + let mint_account_info = next_account_info(account_info_iter)?; + let mut mint_data = mint_account_info.data.borrow_mut(); + let mut mint = PodStateWithExtensionsMut::::unpack_uninitialized(&mut mint_data)?; + + let extension = mint.init_extension::(true)?; + extension.authority = *authority; + try_validate_multiplier(multiplier)?; + extension.multiplier = *multiplier; + extension.new_multiplier_effective_timestamp = 0.into(); + extension.new_multiplier = *multiplier; + Ok(()) +} + +fn process_update_multiplier( + program_id: &Pubkey, + accounts: &[AccountInfo], + new_multiplier: &PodF64, + effective_timestamp: &UnixTimestamp, +) -> ProgramResult { + let account_info_iter = &mut accounts.iter(); + let mint_account_info = next_account_info(account_info_iter)?; + let owner_info = next_account_info(account_info_iter)?; + let owner_info_data_len = owner_info.data_len(); + + let mut mint_data = mint_account_info.data.borrow_mut(); + let mut mint = PodStateWithExtensionsMut::::unpack(&mut mint_data)?; + let extension = mint.get_extension_mut::()?; + let authority = + Option::::from(extension.authority).ok_or(TokenError::NoAuthorityExists)?; + + Processor::validate_owner( + program_id, + &authority, + owner_info, + owner_info_data_len, + account_info_iter.as_slice(), + )?; + + try_validate_multiplier(new_multiplier)?; + let clock = Clock::get()?; + extension.new_multiplier = *new_multiplier; + let int_effective_timestamp = i64::from(*effective_timestamp); + // just floor it to 0 + if int_effective_timestamp < 0 { + extension.new_multiplier_effective_timestamp = 0.into(); + } else { + extension.new_multiplier_effective_timestamp = *effective_timestamp; + } + // if the new effective timestamp has already passed, also set the old + // multiplier, just to be clear + if clock.unix_timestamp >= int_effective_timestamp { + extension.multiplier = *new_multiplier; + } + Ok(()) +} + +pub(crate) fn process_instruction( + program_id: &Pubkey, + accounts: &[AccountInfo], + input: &[u8], +) -> ProgramResult { + check_program_account(program_id)?; + match decode_instruction_type(input)? { + ScaledUiAmountMintInstruction::Initialize => { + msg!("ScaledUiAmountMintInstruction::Initialize"); + let InitializeInstructionData { + authority, + multiplier, + } = decode_instruction_data(input)?; + process_initialize(program_id, accounts, authority, multiplier) + } + ScaledUiAmountMintInstruction::UpdateMultiplier => { + msg!("ScaledUiAmountMintInstruction::UpdateScale"); + let UpdateMultiplierInstructionData { + effective_timestamp, + multiplier, + } = decode_instruction_data(input)?; + process_update_multiplier(program_id, accounts, multiplier, effective_timestamp) + } + } +} diff --git a/token/program-2022/src/instruction.rs b/token/program-2022/src/instruction.rs index 1706271f5bb..c36c666ec58 100644 --- a/token/program-2022/src/instruction.rs +++ b/token/program-2022/src/instruction.rs @@ -712,6 +712,9 @@ pub enum TokenInstruction<'a> { /// Instruction prefix for instructions to the confidential-mint-burn /// extension ConfidentialMintBurnExtension, + /// Instruction prefix for instructions to the scaled ui amount + /// extension + ScaledUiAmountExtension, } impl<'a> TokenInstruction<'a> { /// Unpacks a byte buffer into a @@ -852,6 +855,7 @@ impl<'a> TokenInstruction<'a> { 40 => Self::GroupPointerExtension, 41 => Self::GroupMemberPointerExtension, 42 => Self::ConfidentialMintBurnExtension, + 43 => Self::ScaledUiAmountExtension, _ => return Err(TokenError::InvalidInstruction.into()), }) } @@ -1026,6 +1030,9 @@ impl<'a> TokenInstruction<'a> { &Self::ConfidentialMintBurnExtension => { buf.push(42); } + &Self::ScaledUiAmountExtension => { + buf.push(43); + } }; buf } @@ -1123,6 +1130,8 @@ pub enum AuthorityType { GroupPointer, /// Authority to set the group member address GroupMemberPointer, + /// Authority to set the UI amount scale + ScaledUiAmount, } impl AuthorityType { @@ -1143,6 +1152,7 @@ impl AuthorityType { AuthorityType::MetadataPointer => 12, AuthorityType::GroupPointer => 13, AuthorityType::GroupMemberPointer => 14, + AuthorityType::ScaledUiAmount => 15, } } @@ -1163,6 +1173,7 @@ impl AuthorityType { 12 => Ok(AuthorityType::MetadataPointer), 13 => Ok(AuthorityType::GroupPointer), 14 => Ok(AuthorityType::GroupMemberPointer), + 15 => Ok(AuthorityType::ScaledUiAmount), _ => Err(TokenError::InvalidInstruction.into()), } } diff --git a/token/program-2022/src/pod_instruction.rs b/token/program-2022/src/pod_instruction.rs index a08f8b68a7a..05da1e42d4d 100644 --- a/token/program-2022/src/pod_instruction.rs +++ b/token/program-2022/src/pod_instruction.rs @@ -115,6 +115,7 @@ pub(crate) enum PodTokenInstruction { GroupPointerExtension, GroupMemberPointerExtension, ConfidentialMintBurnExtension, + ScaledUiAmountExtension, } fn unpack_pubkey_option(input: &[u8]) -> Result, ProgramError> { diff --git a/token/program-2022/src/processor.rs b/token/program-2022/src/processor.rs index ee219bbef05..99a813e4775 100644 --- a/token/program-2022/src/processor.rs +++ b/token/program-2022/src/processor.rs @@ -21,7 +21,9 @@ use { mint_close_authority::MintCloseAuthority, non_transferable::{NonTransferable, NonTransferableAccount}, permanent_delegate::{get_permanent_delegate, PermanentDelegate}, - reallocate, token_group, token_metadata, + reallocate, + scaled_ui_amount::{self, ScaledUiAmountConfig}, + token_group, token_metadata, transfer_fee::{self, TransferFeeAmount, TransferFeeConfig}, transfer_hook::{self, TransferHook, TransferHookAccount}, AccountType, BaseStateWithExtensions, BaseStateWithExtensionsMut, ExtensionType, @@ -906,6 +908,19 @@ impl Processor { )?; extension.authority = new_authority.try_into()?; } + AuthorityType::ScaledUiAmount => { + let extension = mint.get_extension_mut::()?; + let maybe_authority: Option = extension.authority.into(); + let authority = maybe_authority.ok_or(TokenError::AuthorityTypeNotSupported)?; + Self::validate_owner( + program_id, + &authority, + authority_info, + authority_info_data_len, + account_info_iter.as_slice(), + )?; + extension.authority = new_authority.try_into()?; + } _ => { return Err(TokenError::AuthorityTypeNotSupported.into()); } @@ -1372,6 +1387,11 @@ impl Processor { extension .amount_to_ui_amount(amount, mint.base.decimals, unix_timestamp) .ok_or(ProgramError::InvalidArgument)? + } else if let Ok(extension) = mint.get_extension::() { + let unix_timestamp = Clock::get()?.unix_timestamp; + extension + .amount_to_ui_amount(amount, mint.base.decimals, unix_timestamp) + .ok_or(ProgramError::InvalidArgument)? } else { crate::amount_to_ui_amount_string_trimmed(amount, mint.base.decimals) }; @@ -1393,6 +1413,9 @@ impl Processor { let amount = if let Ok(extension) = mint.get_extension::() { let unix_timestamp = Clock::get()?.unix_timestamp; extension.try_ui_amount_into_amount(ui_amount, mint.base.decimals, unix_timestamp)? + } else if let Ok(extension) = mint.get_extension::() { + let unix_timestamp = Clock::get()?.unix_timestamp; + extension.try_ui_amount_into_amount(ui_amount, mint.base.decimals, unix_timestamp)? } else { crate::try_ui_amount_into_amount(ui_amount.to_string(), mint.base.decimals)? }; @@ -1813,6 +1836,14 @@ impl Processor { &input[1..], ) } + PodTokenInstruction::ScaledUiAmountExtension => { + msg!("Instruction: ScaledUiAmountExtension"); + scaled_ui_amount::processor::process_instruction( + program_id, + accounts, + &input[1..], + ) + } } } else if let Ok(instruction) = TokenMetadataInstruction::unpack(input) { token_metadata::processor::process_instruction(program_id, accounts, instruction) From 5aef725e083212fbc42487e9adf26734aa875a6e Mon Sep 17 00:00:00 2001 From: Jon C Date: Mon, 25 Nov 2024 11:29:34 +0100 Subject: [PATCH 16/52] deps: Bump rustls to 0.23.18 (#7518) #### Problem There's a security advisory on rustls 0.23.16, and it advises to update to 0.23.18. #### Summary of changes Bump the dependency to 0.23.18 --- Cargo.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 84c24564202..75ef8f54db7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4178,7 +4178,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.0.0", - "rustls 0.23.16", + "rustls 0.23.18", "socket2", "thiserror 1.0.68", "tokio", @@ -4195,7 +4195,7 @@ dependencies = [ "rand 0.8.5", "ring 0.17.3", "rustc-hash 2.0.0", - "rustls 0.23.16", + "rustls 0.23.18", "rustls-platform-verifier", "slab", "thiserror 1.0.68", @@ -4632,9 +4632,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.16" +version = "0.23.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" +checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" dependencies = [ "once_cell", "ring 0.17.3", @@ -4692,7 +4692,7 @@ dependencies = [ "jni", "log", "once_cell", - "rustls 0.23.16", + "rustls 0.23.18", "rustls-native-certs", "rustls-platform-verifier-android", "rustls-webpki 0.102.8", @@ -5738,7 +5738,7 @@ dependencies = [ "rand_chacha 0.3.1", "rayon", "rolling-file", - "rustls 0.23.16", + "rustls 0.23.18", "serde", "serde_bytes", "serde_derive", @@ -6633,7 +6633,7 @@ dependencies = [ "log", "quinn", "quinn-proto", - "rustls 0.23.16", + "rustls 0.23.18", "solana-connection-cache", "solana-measure", "solana-metrics", @@ -7209,7 +7209,7 @@ dependencies = [ "quinn", "quinn-proto", "rand 0.8.5", - "rustls 0.23.16", + "rustls 0.23.18", "smallvec", "socket2", "solana-measure", @@ -7461,7 +7461,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rayon", - "rustls 0.23.16", + "rustls 0.23.18", "solana-entry", "solana-feature-set", "solana-geyser-plugin-manager", From a40770c0f00f4bf42329c2305622a55582c4dc02 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:31:55 +0100 Subject: [PATCH 17/52] build(deps-dev): bump rollup from 4.27.3 to 4.27.4 (#7519) Bumps [rollup](https://github.com/rollup/rollup) from 4.27.3 to 4.27.4. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.27.3...v4.27.4) --- updated-dependencies: - dependency-name: rollup dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 192 +++++++++++++++++----------------- stake-pool/js/package.json | 2 +- token-lending/js/package.json | 2 +- 3 files changed, 98 insertions(+), 98 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c02d5d9ddc7..63423ef3d69 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -395,25 +395,25 @@ importers: devDependencies: '@rollup/plugin-alias': specifier: ^5.1.1 - version: 5.1.1(rollup@4.27.3) + version: 5.1.1(rollup@4.27.4) '@rollup/plugin-commonjs': specifier: ^28.0.1 - version: 28.0.1(rollup@4.27.3) + version: 28.0.1(rollup@4.27.4) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.27.3) + version: 6.1.0(rollup@4.27.4) '@rollup/plugin-multi-entry': specifier: ^6.0.0 - version: 6.0.1(rollup@4.27.3) + version: 6.0.1(rollup@4.27.4) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.27.3) + version: 15.3.0(rollup@4.27.4) '@rollup/plugin-terser': specifier: ^0.4.4 - version: 0.4.4(rollup@4.27.3) + version: 0.4.4(rollup@4.27.4) '@rollup/plugin-typescript': specifier: ^12.1.1 - version: 12.1.1(rollup@4.27.3)(tslib@2.8.1)(typescript@5.6.3) + version: 12.1.1(rollup@4.27.4)(tslib@2.8.1)(typescript@5.6.3) '@types/bn.js': specifier: ^5.1.6 version: 5.1.6 @@ -445,11 +445,11 @@ importers: specifier: ^6.0.1 version: 6.0.1 rollup: - specifier: ^4.27.3 - version: 4.27.3 + specifier: ^4.27.4 + version: 4.27.4 rollup-plugin-dts: specifier: ^6.1.1 - version: 6.1.1(rollup@4.27.3)(typescript@5.6.3) + version: 6.1.1(rollup@4.27.4)(typescript@5.6.3) ts-jest: specifier: ^29.2.5 version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.6.3) @@ -532,13 +532,13 @@ importers: devDependencies: '@rollup/plugin-commonjs': specifier: ^28.0.1 - version: 28.0.1(rollup@4.27.3) + version: 28.0.1(rollup@4.27.4) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.27.3) + version: 15.3.0(rollup@4.27.4) '@rollup/plugin-typescript': specifier: ^12.1.1 - version: 12.1.1(rollup@4.27.3)(tslib@2.8.1)(typescript@5.6.3) + version: 12.1.1(rollup@4.27.4)(tslib@2.8.1)(typescript@5.6.3) '@solana/spl-token': specifier: 0.4.9 version: link:../../token/js @@ -564,8 +564,8 @@ importers: specifier: ^6.2.0 version: 6.2.0 rollup: - specifier: ^4.27.3 - version: 4.27.3 + specifier: ^4.27.4 + version: 4.27.4 ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) @@ -2179,7 +2179,7 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dev: true - /@rollup/plugin-alias@5.1.1(rollup@4.27.3): + /@rollup/plugin-alias@5.1.1(rollup@4.27.4): resolution: {integrity: sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2188,10 +2188,10 @@ packages: rollup: optional: true dependencies: - rollup: 4.27.3 + rollup: 4.27.4 dev: true - /@rollup/plugin-commonjs@28.0.1(rollup@4.27.3): + /@rollup/plugin-commonjs@28.0.1(rollup@4.27.4): resolution: {integrity: sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==} engines: {node: '>=16.0.0 || 14 >= 14.17'} peerDependencies: @@ -2200,17 +2200,17 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.3) + '@rollup/pluginutils': 5.1.0(rollup@4.27.4) commondir: 1.0.1 estree-walker: 2.0.2 fdir: 6.3.0(picomatch@4.0.2) is-reference: 1.2.1 magic-string: 0.30.10 picomatch: 4.0.2 - rollup: 4.27.3 + rollup: 4.27.4 dev: true - /@rollup/plugin-json@6.1.0(rollup@4.27.3): + /@rollup/plugin-json@6.1.0(rollup@4.27.4): resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2219,11 +2219,11 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.3) - rollup: 4.27.3 + '@rollup/pluginutils': 5.1.0(rollup@4.27.4) + rollup: 4.27.4 dev: true - /@rollup/plugin-multi-entry@6.0.1(rollup@4.27.3): + /@rollup/plugin-multi-entry@6.0.1(rollup@4.27.4): resolution: {integrity: sha512-AXm6toPyTSfbYZWghQGbom1Uh7dHXlrGa+HoiYNhQtDUE3Q7LqoUYdVQx9E1579QWS1uOiu+cZRSE4okO7ySgw==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2232,12 +2232,12 @@ packages: rollup: optional: true dependencies: - '@rollup/plugin-virtual': 3.0.2(rollup@4.27.3) + '@rollup/plugin-virtual': 3.0.2(rollup@4.27.4) matched: 5.0.1 - rollup: 4.27.3 + rollup: 4.27.4 dev: true - /@rollup/plugin-node-resolve@15.3.0(rollup@4.27.3): + /@rollup/plugin-node-resolve@15.3.0(rollup@4.27.4): resolution: {integrity: sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2246,15 +2246,15 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.3) + '@rollup/pluginutils': 5.1.0(rollup@4.27.4) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-module: 1.0.0 resolve: 1.22.8 - rollup: 4.27.3 + rollup: 4.27.4 dev: true - /@rollup/plugin-terser@0.4.4(rollup@4.27.3): + /@rollup/plugin-terser@0.4.4(rollup@4.27.4): resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2263,13 +2263,13 @@ packages: rollup: optional: true dependencies: - rollup: 4.27.3 + rollup: 4.27.4 serialize-javascript: 6.0.1 smob: 1.4.1 terser: 5.24.0 dev: true - /@rollup/plugin-typescript@12.1.1(rollup@4.27.3)(tslib@2.8.1)(typescript@5.6.3): + /@rollup/plugin-typescript@12.1.1(rollup@4.27.4)(tslib@2.8.1)(typescript@5.6.3): resolution: {integrity: sha512-t7O653DpfB5MbFrqPe/VcKFFkvRuFNp9qId3xq4Eth5xlyymzxNpye2z8Hrl0RIMuXTSr5GGcFpkdlMeacUiFQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2282,14 +2282,14 @@ packages: tslib: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.3) + '@rollup/pluginutils': 5.1.0(rollup@4.27.4) resolve: 1.22.8 - rollup: 4.27.3 + rollup: 4.27.4 tslib: 2.8.1 typescript: 5.6.3 dev: true - /@rollup/plugin-virtual@3.0.2(rollup@4.27.3): + /@rollup/plugin-virtual@3.0.2(rollup@4.27.4): resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2298,7 +2298,7 @@ packages: rollup: optional: true dependencies: - rollup: 4.27.3 + rollup: 4.27.4 dev: true /@rollup/pluginutils@4.2.1: @@ -2309,7 +2309,7 @@ packages: picomatch: 2.3.1 dev: true - /@rollup/pluginutils@5.1.0(rollup@4.27.3): + /@rollup/pluginutils@5.1.0(rollup@4.27.4): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2321,147 +2321,147 @@ packages: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 4.27.3 + rollup: 4.27.4 dev: true - /@rollup/rollup-android-arm-eabi@4.27.3: - resolution: {integrity: sha512-EzxVSkIvCFxUd4Mgm4xR9YXrcp976qVaHnqom/Tgm+vU79k4vV4eYTjmRvGfeoW8m9LVcsAy/lGjcgVegKEhLQ==} + /@rollup/rollup-android-arm-eabi@4.27.4: + resolution: {integrity: sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.27.3: - resolution: {integrity: sha512-LJc5pDf1wjlt9o/Giaw9Ofl+k/vLUaYsE2zeQGH85giX2F+wn/Cg8b3c5CDP3qmVmeO5NzwVUzQQxwZvC2eQKw==} + /@rollup/rollup-android-arm64@4.27.4: + resolution: {integrity: sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.27.3: - resolution: {integrity: sha512-OuRysZ1Mt7wpWJ+aYKblVbJWtVn3Cy52h8nLuNSzTqSesYw1EuN6wKp5NW/4eSre3mp12gqFRXOKTcN3AI3LqA==} + /@rollup/rollup-darwin-arm64@4.27.4: + resolution: {integrity: sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.27.3: - resolution: {integrity: sha512-xW//zjJMlJs2sOrCmXdB4d0uiilZsOdlGQIC/jjmMWT47lkLLoB1nsNhPUcnoqyi5YR6I4h+FjBpILxbEy8JRg==} + /@rollup/rollup-darwin-x64@4.27.4: + resolution: {integrity: sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-freebsd-arm64@4.27.3: - resolution: {integrity: sha512-58E0tIcwZ+12nK1WiLzHOD8I0d0kdrY/+o7yFVPRHuVGY3twBwzwDdTIBGRxLmyjciMYl1B/U515GJy+yn46qw==} + /@rollup/rollup-freebsd-arm64@4.27.4: + resolution: {integrity: sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw==} cpu: [arm64] os: [freebsd] requiresBuild: true dev: true optional: true - /@rollup/rollup-freebsd-x64@4.27.3: - resolution: {integrity: sha512-78fohrpcVwTLxg1ZzBMlwEimoAJmY6B+5TsyAZ3Vok7YabRBUvjYTsRXPTjGEvv/mfgVBepbW28OlMEz4w8wGA==} + /@rollup/rollup-freebsd-x64@4.27.4: + resolution: {integrity: sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA==} cpu: [x64] os: [freebsd] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.27.3: - resolution: {integrity: sha512-h2Ay79YFXyQi+QZKo3ISZDyKaVD7uUvukEHTOft7kh00WF9mxAaxZsNs3o/eukbeKuH35jBvQqrT61fzKfAB/Q==} + /@rollup/rollup-linux-arm-gnueabihf@4.27.4: + resolution: {integrity: sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-musleabihf@4.27.3: - resolution: {integrity: sha512-Sv2GWmrJfRY57urktVLQ0VKZjNZGogVtASAgosDZ1aUB+ykPxSi3X1nWORL5Jk0sTIIwQiPH7iE3BMi9zGWfkg==} + /@rollup/rollup-linux-arm-musleabihf@4.27.4: + resolution: {integrity: sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.27.3: - resolution: {integrity: sha512-FPoJBLsPW2bDNWjSrwNuTPUt30VnfM8GPGRoLCYKZpPx0xiIEdFip3dH6CqgoT0RnoGXptaNziM0WlKgBc+OWQ==} + /@rollup/rollup-linux-arm64-gnu@4.27.4: + resolution: {integrity: sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.27.3: - resolution: {integrity: sha512-TKxiOvBorYq4sUpA0JT+Fkh+l+G9DScnG5Dqx7wiiqVMiRSkzTclP35pE6eQQYjP4Gc8yEkJGea6rz4qyWhp3g==} + /@rollup/rollup-linux-arm64-musl@4.27.4: + resolution: {integrity: sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.27.3: - resolution: {integrity: sha512-v2M/mPvVUKVOKITa0oCFksnQQ/TqGrT+yD0184/cWHIu0LoIuYHwox0Pm3ccXEz8cEQDLk6FPKd1CCm+PlsISw==} + /@rollup/rollup-linux-powerpc64le-gnu@4.27.4: + resolution: {integrity: sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ==} cpu: [ppc64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.27.3: - resolution: {integrity: sha512-LdrI4Yocb1a/tFVkzmOE5WyYRgEBOyEhWYJe4gsDWDiwnjYKjNs7PS6SGlTDB7maOHF4kxevsuNBl2iOcj3b4A==} + /@rollup/rollup-linux-riscv64-gnu@4.27.4: + resolution: {integrity: sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-s390x-gnu@4.27.3: - resolution: {integrity: sha512-d4wVu6SXij/jyiwPvI6C4KxdGzuZOvJ6y9VfrcleHTwo68fl8vZC5ZYHsCVPUi4tndCfMlFniWgwonQ5CUpQcA==} + /@rollup/rollup-linux-s390x-gnu@4.27.4: + resolution: {integrity: sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg==} cpu: [s390x] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.27.3: - resolution: {integrity: sha512-/6bn6pp1fsCGEY5n3yajmzZQAh+mW4QPItbiWxs69zskBzJuheb3tNynEjL+mKOsUSFK11X4LYF2BwwXnzWleA==} + /@rollup/rollup-linux-x64-gnu@4.27.4: + resolution: {integrity: sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.27.3: - resolution: {integrity: sha512-nBXOfJds8OzUT1qUreT/en3eyOXd2EH5b0wr2bVB5999qHdGKkzGzIyKYaKj02lXk6wpN71ltLIaQpu58YFBoQ==} + /@rollup/rollup-linux-x64-musl@4.27.4: + resolution: {integrity: sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.27.3: - resolution: {integrity: sha512-ogfbEVQgIZOz5WPWXF2HVb6En+kWzScuxJo/WdQTqEgeyGkaa2ui5sQav9Zkr7bnNCLK48uxmmK0TySm22eiuw==} + /@rollup/rollup-win32-arm64-msvc@4.27.4: + resolution: {integrity: sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.27.3: - resolution: {integrity: sha512-ecE36ZBMLINqiTtSNQ1vzWc5pXLQHlf/oqGp/bSbi7iedcjcNb6QbCBNG73Euyy2C+l/fn8qKWEwxr+0SSfs3w==} + /@rollup/rollup-win32-ia32-msvc@4.27.4: + resolution: {integrity: sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.27.3: - resolution: {integrity: sha512-vliZLrDmYKyaUoMzEbMTg2JkerfBjn03KmAw9CykO0Zzkzoyd7o3iZNam/TpyWNjNT+Cz2iO3P9Smv2wgrR+Eg==} + /@rollup/rollup-win32-x64-msvc@4.27.4: + resolution: {integrity: sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug==} cpu: [x64] os: [win32] requiresBuild: true @@ -8424,7 +8424,7 @@ packages: package-json-from-dist: 1.0.0 dev: true - /rollup-plugin-dts@6.1.1(rollup@4.27.3)(typescript@5.6.3): + /rollup-plugin-dts@6.1.1(rollup@4.27.4)(typescript@5.6.3): resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} engines: {node: '>=16'} peerDependencies: @@ -8432,37 +8432,37 @@ packages: typescript: ^4.5 || ^5.0 dependencies: magic-string: 0.30.10 - rollup: 4.27.3 + rollup: 4.27.4 typescript: 5.6.3 optionalDependencies: '@babel/code-frame': 7.26.2 dev: true - /rollup@4.27.3: - resolution: {integrity: sha512-SLsCOnlmGt9VoZ9Ek8yBK8tAdmPHeppkw+Xa7yDlCEhDTvwYei03JlWo1fdc7YTfLZ4tD8riJCUyAgTbszk1fQ==} + /rollup@4.27.4: + resolution: {integrity: sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.27.3 - '@rollup/rollup-android-arm64': 4.27.3 - '@rollup/rollup-darwin-arm64': 4.27.3 - '@rollup/rollup-darwin-x64': 4.27.3 - '@rollup/rollup-freebsd-arm64': 4.27.3 - '@rollup/rollup-freebsd-x64': 4.27.3 - '@rollup/rollup-linux-arm-gnueabihf': 4.27.3 - '@rollup/rollup-linux-arm-musleabihf': 4.27.3 - '@rollup/rollup-linux-arm64-gnu': 4.27.3 - '@rollup/rollup-linux-arm64-musl': 4.27.3 - '@rollup/rollup-linux-powerpc64le-gnu': 4.27.3 - '@rollup/rollup-linux-riscv64-gnu': 4.27.3 - '@rollup/rollup-linux-s390x-gnu': 4.27.3 - '@rollup/rollup-linux-x64-gnu': 4.27.3 - '@rollup/rollup-linux-x64-musl': 4.27.3 - '@rollup/rollup-win32-arm64-msvc': 4.27.3 - '@rollup/rollup-win32-ia32-msvc': 4.27.3 - '@rollup/rollup-win32-x64-msvc': 4.27.3 + '@rollup/rollup-android-arm-eabi': 4.27.4 + '@rollup/rollup-android-arm64': 4.27.4 + '@rollup/rollup-darwin-arm64': 4.27.4 + '@rollup/rollup-darwin-x64': 4.27.4 + '@rollup/rollup-freebsd-arm64': 4.27.4 + '@rollup/rollup-freebsd-x64': 4.27.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.27.4 + '@rollup/rollup-linux-arm-musleabihf': 4.27.4 + '@rollup/rollup-linux-arm64-gnu': 4.27.4 + '@rollup/rollup-linux-arm64-musl': 4.27.4 + '@rollup/rollup-linux-powerpc64le-gnu': 4.27.4 + '@rollup/rollup-linux-riscv64-gnu': 4.27.4 + '@rollup/rollup-linux-s390x-gnu': 4.27.4 + '@rollup/rollup-linux-x64-gnu': 4.27.4 + '@rollup/rollup-linux-x64-musl': 4.27.4 + '@rollup/rollup-win32-arm64-msvc': 4.27.4 + '@rollup/rollup-win32-ia32-msvc': 4.27.4 + '@rollup/rollup-win32-x64-msvc': 4.27.4 fsevents: 2.3.3 dev: true diff --git a/stake-pool/js/package.json b/stake-pool/js/package.json index f45045478ce..e1b6e7d13c1 100644 --- a/stake-pool/js/package.json +++ b/stake-pool/js/package.json @@ -69,7 +69,7 @@ "eslint": "^8.57.0", "jest": "^29.0.0", "rimraf": "^6.0.1", - "rollup": "^4.27.3", + "rollup": "^4.27.4", "rollup-plugin-dts": "^6.1.1", "ts-jest": "^29.2.5", "typescript": "^5.6.3" diff --git a/token-lending/js/package.json b/token-lending/js/package.json index 89c93ceb978..db54657a897 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -52,7 +52,7 @@ "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", "gh-pages": "^6.2.0", - "rollup": "^4.27.3", + "rollup": "^4.27.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", "typedoc": "^0.26.11", From d6ad9db811f4e0057d2c2db4bb7d1572702daf51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:32:03 +0100 Subject: [PATCH 18/52] build(deps-dev): bump chai-as-promised from 8.0.0 to 8.0.1 (#7520) Bumps [chai-as-promised](https://github.com/chaijs/chai-as-promised) from 8.0.0 to 8.0.1. - [Release notes](https://github.com/chaijs/chai-as-promised/releases) - [Commits](https://github.com/chaijs/chai-as-promised/compare/v8.0.0...v8.0.1) --- updated-dependencies: - dependency-name: chai-as-promised dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 8 ++++---- token/js/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 63423ef3d69..a1c63c68073 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -744,8 +744,8 @@ importers: specifier: ^5.1.2 version: 5.1.2 chai-as-promised: - specifier: ^8.0.0 - version: 8.0.0(chai@5.1.2) + specifier: ^8.0.1 + version: 8.0.1(chai@5.1.2) eslint: specifier: ^8.57.0 version: 8.57.0 @@ -4247,8 +4247,8 @@ packages: nofilter: 3.1.0 dev: true - /chai-as-promised@8.0.0(chai@5.1.2): - resolution: {integrity: sha512-sMsGXTrS3FunP/wbqh/KxM8Kj/aLPXQGkNtvE5wPfSToq8wkkvBpTZo1LIiEVmC4BwkKpag+l5h/20lBMk6nUg==} + /chai-as-promised@8.0.1(chai@5.1.2): + resolution: {integrity: sha512-OIEJtOL8xxJSH8JJWbIoRjybbzR52iFuDHuF8eb+nTPD6tgXLjRqsgnUGqQfFODxYvq5QdirT0pN9dZ0+Gz6rA==} peerDependencies: chai: '>= 2.1.2 < 6' dependencies: diff --git a/token/js/package.json b/token/js/package.json index 42a5d81757a..440d1a5049f 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -71,7 +71,7 @@ "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "chai": "^5.1.2", - "chai-as-promised": "^8.0.0", + "chai-as-promised": "^8.0.1", "eslint": "^8.57.0", "eslint-plugin-require-extensions": "^0.1.1", "gh-pages": "^6.2.0", From 5d1d47785a47808834bfc4f08d30ec0452d0e53c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:32:12 +0100 Subject: [PATCH 19/52] build(deps-dev): bump @types/node from 22.9.1 to 22.9.3 (#7522) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.9.1 to 22.9.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- account-compression/sdk/package.json | 2 +- libraries/type-length-value/js/package.json | 2 +- memo/js/package.json | 2 +- name-service/js/package.json | 2 +- pnpm-lock.yaml | 188 +++++++++---------- single-pool/js/packages/classic/package.json | 2 +- single-pool/js/packages/modern/package.json | 2 +- stake-pool/js/package.json | 2 +- token-group/js/package.json | 2 +- token-lending/js/package.json | 2 +- token-metadata/js/package.json | 2 +- token/js/package.json | 2 +- 12 files changed, 105 insertions(+), 105 deletions(-) diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index a0c29f46c0a..a123c278ca9 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -67,7 +67,7 @@ "@solana/eslint-config-solana": "^3.0.3", "@types/bn.js": "^5.1.6", "@types/jest": "^29.5.14", - "@types/node": "^22.9.1", + "@types/node": "^22.9.3", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/libraries/type-length-value/js/package.json b/libraries/type-length-value/js/package.json index 9fc73bb6b44..4f2c790591b 100644 --- a/libraries/type-length-value/js/package.json +++ b/libraries/type-length-value/js/package.json @@ -49,7 +49,7 @@ "devDependencies": { "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.9.1", + "@types/node": "^22.9.3", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "chai": "^5.1.2", diff --git a/memo/js/package.json b/memo/js/package.json index 9414e7c5dd0..ceaa7c5275d 100644 --- a/memo/js/package.json +++ b/memo/js/package.json @@ -54,7 +54,7 @@ "@solana/web3.js": "^1.95.5", "@types/chai": "^5.0.1", "@types/jest": "^29.5.14", - "@types/node": "^22.9.1", + "@types/node": "^22.9.3", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/name-service/js/package.json b/name-service/js/package.json index 184f3ce153f..c7be5c90d3f 100644 --- a/name-service/js/package.json +++ b/name-service/js/package.json @@ -45,7 +45,7 @@ "@jest/globals": "^29.7.0", "@types/bn.js": "^5.1.6", "@types/jest": "^29.5.14", - "@types/node": "^22.9.1", + "@types/node": "^22.9.3", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a1c63c68073..20aa4ce86e4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -70,8 +70,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.9.1 - version: 22.9.1 + specifier: ^22.9.3 + version: 22.9.3 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -107,10 +107,10 @@ importers: version: 6.2.0 jest: specifier: ^29.0.1 - version: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) jest-config: specifier: ^29.0.1 - version: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) start-server-and-test: specifier: ^2.0.8 version: 2.0.8 @@ -122,7 +122,7 @@ importers: version: 2.0.1 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) typedoc: specifier: ^0.26.10 version: 0.26.11(typescript@5.6.3) @@ -146,8 +146,8 @@ importers: specifier: ^10.0.10 version: 10.0.10 '@types/node': - specifier: ^22.9.1 - version: 22.9.1 + specifier: ^22.9.3 + version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) @@ -174,7 +174,7 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) typedoc: specifier: ^0.26.11 version: 0.26.11(typescript@5.6.3) @@ -198,8 +198,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.9.1 - version: 22.9.1 + specifier: ^22.9.3 + version: 22.9.3 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -223,7 +223,7 @@ importers: version: 6.2.0 jest: specifier: ^29.0.0 - version: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) process: specifier: ^0.11.10 version: 0.11.10 @@ -238,7 +238,7 @@ importers: version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.6.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) typedoc: specifier: ^0.26.11 version: 0.26.11(typescript@5.6.3) @@ -268,8 +268,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.9.1 - version: 22.9.1 + specifier: ^22.9.3 + version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) @@ -290,7 +290,7 @@ importers: version: 2.31.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0) jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) start-server-and-test: specifier: ^2.0.8 version: 2.0.8 @@ -299,7 +299,7 @@ importers: version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.6.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) typedoc: specifier: ^0.26.11 version: 0.26.11(typescript@5.6.3) @@ -323,8 +323,8 @@ importers: specifier: ^5.0.0 version: 5.0.0 '@types/node': - specifier: ^22.9.1 - version: 22.9.1 + specifier: ^22.9.3 + version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3) @@ -357,8 +357,8 @@ importers: version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) devDependencies: '@types/node': - specifier: ^22.9.1 - version: 22.9.1 + specifier: ^22.9.3 + version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3) @@ -421,8 +421,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.9.1 - version: 22.9.1 + specifier: ^22.9.3 + version: 22.9.3 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -440,7 +440,7 @@ importers: version: 8.57.0 jest: specifier: ^29.0.0 - version: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -476,8 +476,8 @@ importers: specifier: ^10.0.10 version: 10.0.10 '@types/node': - specifier: ^22.9.1 - version: 22.9.1 + specifier: ^22.9.3 + version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) @@ -504,7 +504,7 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) tslib: specifier: ^2.8.1 version: 2.8.1 @@ -549,8 +549,8 @@ importers: specifier: ^8.56.7 version: 8.56.7 '@types/node': - specifier: ^22.9.1 - version: 22.9.1 + specifier: ^22.9.3 + version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) @@ -568,7 +568,7 @@ importers: version: 4.27.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) tslib: specifier: ^2.8.1 version: 2.8.1 @@ -598,8 +598,8 @@ importers: specifier: ^10.0.10 version: 10.0.10 '@types/node': - specifier: ^22.9.1 - version: 22.9.1 + specifier: ^22.9.3 + version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) @@ -626,7 +626,7 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) tslib: specifier: ^2.8.1 version: 2.8.1 @@ -687,7 +687,7 @@ importers: version: 2.0.8 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) typescript: specifier: ^5.6.3 version: 5.6.3 @@ -729,8 +729,8 @@ importers: specifier: ^10.0.10 version: 10.0.10 '@types/node': - specifier: ^22.9.1 - version: 22.9.1 + specifier: ^22.9.3 + version: 22.9.3 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -769,7 +769,7 @@ importers: version: 2.0.8 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) typedoc: specifier: ^0.26.11 version: 0.26.11(typescript@5.6.3) @@ -1539,7 +1539,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.1 + '@types/node': 22.9.3 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -1551,7 +1551,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.1 + '@types/node': 22.9.3 chalk: 4.1.2 jest-message-util: 30.0.0-alpha.6 jest-util: 30.0.0-alpha.6 @@ -1572,14 +1572,14 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.1 + '@types/node': 22.9.3 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -1616,14 +1616,14 @@ packages: '@jest/test-result': 30.0.0-alpha.6 '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.1 + '@types/node': 22.9.3 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 4.0.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 30.0.0-alpha.6 - jest-config: 30.0.0-alpha.6(@types/node@22.9.1) + jest-config: 30.0.0-alpha.6(@types/node@22.9.3) jest-haste-map: 30.0.0-alpha.6 jest-message-util: 30.0.0-alpha.6 jest-regex-util: 30.0.0-alpha.6 @@ -1652,7 +1652,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.1 + '@types/node': 22.9.3 jest-mock: 29.7.0 dev: true @@ -1662,7 +1662,7 @@ packages: dependencies: '@jest/fake-timers': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.1 + '@types/node': 22.9.3 jest-mock: 30.0.0-alpha.6 dev: true @@ -1706,7 +1706,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.9.1 + '@types/node': 22.9.3 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -1718,7 +1718,7 @@ packages: dependencies: '@jest/types': 30.0.0-alpha.6 '@sinonjs/fake-timers': 11.3.1 - '@types/node': 22.9.1 + '@types/node': 22.9.3 jest-message-util: 30.0.0-alpha.6 jest-mock: 30.0.0-alpha.6 jest-util: 30.0.0-alpha.6 @@ -1752,7 +1752,7 @@ packages: resolution: {integrity: sha512-eoV3sjS1M5k3YdrFWezqdndfgepwB86gwyXC0BzV2saZdJ42ySUoEDBGKuwta8A6Zh3w8tVHNFxz1BqiFraHCQ==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 jest-regex-util: 30.0.0-alpha.6 dev: true @@ -1771,7 +1771,7 @@ packages: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.20 - '@types/node': 22.9.1 + '@types/node': 22.9.3 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -1808,7 +1808,7 @@ packages: '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.9.1 + '@types/node': 22.9.3 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -1965,7 +1965,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.9.1 + '@types/node': 22.9.3 '@types/yargs': 17.0.31 chalk: 4.1.2 dev: true @@ -1978,7 +1978,7 @@ packages: '@jest/schemas': 30.0.0-alpha.6 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.9.1 + '@types/node': 22.9.3 '@types/yargs': 17.0.31 chalk: 4.1.2 dev: true @@ -2881,7 +2881,7 @@ packages: /@types/bn.js@5.1.6: resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 dev: true /@types/chai-as-promised@8.0.1: @@ -2899,7 +2899,7 @@ packages: /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 /@types/deep-eql@4.0.2: resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} @@ -2929,7 +2929,7 @@ packages: /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 dev: true /@types/hast@3.0.4: @@ -2976,15 +2976,15 @@ packages: /@types/node-fetch@2.6.12: resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 form-data: 4.0.0 dev: true /@types/node@12.20.55: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - /@types/node@22.9.1: - resolution: {integrity: sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==} + /@types/node@22.9.3: + resolution: {integrity: sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==} dependencies: undici-types: 6.19.8 @@ -3010,12 +3010,12 @@ packages: /@types/ws@7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 /@types/ws@8.5.10: resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 /@types/yargs-parser@21.0.3: resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -4456,7 +4456,7 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /create-jest@29.7.0(@types/node@22.9.1)(ts-node@10.9.2): + /create-jest@29.7.0(@types/node@22.9.3)(ts-node@10.9.2): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -4465,7 +4465,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -5148,7 +5148,7 @@ packages: '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3) '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.6.3) eslint: 8.57.0 - jest: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) + jest: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) transitivePeerDependencies: - supports-color - typescript @@ -6633,7 +6633,7 @@ packages: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.1 + '@types/node': 22.9.3 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -6662,7 +6662,7 @@ packages: '@jest/expect': 30.0.0-alpha.6 '@jest/test-result': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.1 + '@types/node': 22.9.3 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -6683,7 +6683,7 @@ packages: - supports-color dev: true - /jest-cli@29.7.0(@types/node@22.9.1)(ts-node@10.9.2): + /jest-cli@29.7.0(@types/node@22.9.3)(ts-node@10.9.2): resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -6697,10 +6697,10 @@ packages: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) + create-jest: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -6727,7 +6727,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 import-local: 3.1.0 - jest-config: 30.0.0-alpha.6(@types/node@22.9.1) + jest-config: 30.0.0-alpha.6(@types/node@22.9.3) jest-util: 30.0.0-alpha.6 jest-validate: 30.0.0-alpha.6 yargs: 17.7.2 @@ -6739,7 +6739,7 @@ packages: - ts-node dev: true - /jest-config@29.7.0(@types/node@22.9.1)(ts-node@10.9.2): + /jest-config@29.7.0(@types/node@22.9.3)(ts-node@10.9.2): resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -6754,7 +6754,7 @@ packages: '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.1 + '@types/node': 22.9.3 babel-jest: 29.7.0(@babel/core@7.26.0) chalk: 4.1.2 ci-info: 3.9.0 @@ -6774,13 +6774,13 @@ packages: pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.2(@types/node@22.9.1)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) transitivePeerDependencies: - babel-plugin-macros - supports-color dev: true - /jest-config@30.0.0-alpha.6(@types/node@22.9.1): + /jest-config@30.0.0-alpha.6(@types/node@22.9.3): resolution: {integrity: sha512-Tq9rH1mg9+nlIhh3efGwMSogFVKZ9z7c6P33ZlK74iJlnqqIAKYERZL2nNmNC5+5p8uxlTPSFZfBz9O8NGKotw==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} peerDependencies: @@ -6799,7 +6799,7 @@ packages: '@jest/pattern': 30.0.0-alpha.6 '@jest/test-sequencer': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.1 + '@types/node': 22.9.3 babel-jest: 30.0.0-alpha.6(@babel/core@7.26.0) chalk: 4.1.2 ci-info: 4.0.0 @@ -6888,7 +6888,7 @@ packages: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.1 + '@types/node': 22.9.3 jest-mock: 29.7.0 jest-util: 29.7.0 dev: true @@ -6900,7 +6900,7 @@ packages: '@jest/environment': 30.0.0-alpha.6 '@jest/fake-timers': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.1 + '@types/node': 22.9.3 jest-mock: 30.0.0-alpha.6 jest-util: 30.0.0-alpha.6 dev: true @@ -6921,7 +6921,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.9.1 + '@types/node': 22.9.3 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -6939,7 +6939,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.1 + '@types/node': 22.9.3 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -7023,7 +7023,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.1 + '@types/node': 22.9.3 jest-util: 29.7.0 dev: true @@ -7032,7 +7032,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.1 + '@types/node': 22.9.3 jest-util: 30.0.0-alpha.6 dev: true @@ -7129,7 +7129,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.1 + '@types/node': 22.9.3 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -7158,7 +7158,7 @@ packages: '@jest/test-result': 30.0.0-alpha.6 '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.1 + '@types/node': 22.9.3 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -7189,7 +7189,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.1 + '@types/node': 22.9.3 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -7219,7 +7219,7 @@ packages: '@jest/test-result': 30.0.0-alpha.6 '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.1 + '@types/node': 22.9.3 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -7300,7 +7300,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.1 + '@types/node': 22.9.3 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -7312,7 +7312,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.1 + '@types/node': 22.9.3 chalk: 4.1.2 ci-info: 4.0.0 graceful-fs: 4.2.11 @@ -7349,7 +7349,7 @@ packages: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.1 + '@types/node': 22.9.3 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -7363,7 +7363,7 @@ packages: dependencies: '@jest/test-result': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.1 + '@types/node': 22.9.3 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -7375,7 +7375,7 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -7385,14 +7385,14 @@ packages: resolution: {integrity: sha512-qlzX7zFT/QdUV/LWsJwZBlaIBaJ+E2VH3d1gArGVP+9hUHGpJkEzCSBK7yuZrkt+M/U0Jre5+maPRmkinEF4DA==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 '@ungap/structured-clone': 1.2.0 jest-util: 30.0.0-alpha.6 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest@29.7.0(@types/node@22.9.1)(ts-node@10.9.2): + /jest@29.7.0(@types/node@22.9.3)(ts-node@10.9.2): resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -7405,7 +7405,7 @@ packages: '@jest/core': 29.7.0(ts-node@10.9.2) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) + jest-cli: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -9074,7 +9074,7 @@ packages: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.9.1)(ts-node@10.9.2) + jest: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -9084,7 +9084,7 @@ packages: yargs-parser: 21.1.1 dev: true - /ts-node@10.9.2(@types/node@22.9.1)(typescript@5.6.3): + /ts-node@10.9.2(@types/node@22.9.3)(typescript@5.6.3): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: @@ -9103,7 +9103,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.9.1 + '@types/node': 22.9.3 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 diff --git a/single-pool/js/packages/classic/package.json b/single-pool/js/packages/classic/package.json index 0a404f5c586..313b90fa3bd 100644 --- a/single-pool/js/packages/classic/package.json +++ b/single-pool/js/packages/classic/package.json @@ -18,7 +18,7 @@ "test": "sed -i '1s/.*/{ \"type\": \"module\",/' package.json && NODE_OPTIONS='--loader=tsx' ava ; ret=$?; sed -i '1s/.*/{/' package.json && exit $ret" }, "devDependencies": { - "@types/node": "^22.9.1", + "@types/node": "^22.9.3", "@ava/typescript": "^5.0.0", "@typescript-eslint/eslint-plugin": "^8.4.0", "ava": "^6.2.0", diff --git a/single-pool/js/packages/modern/package.json b/single-pool/js/packages/modern/package.json index 366fe06a895..7140b087819 100644 --- a/single-pool/js/packages/modern/package.json +++ b/single-pool/js/packages/modern/package.json @@ -16,7 +16,7 @@ "lint:fix": "eslint . --fix" }, "devDependencies": { - "@types/node": "^22.9.1", + "@types/node": "^22.9.3", "@typescript-eslint/eslint-plugin": "^8.4.0", "eslint": "^8.57.0", "typescript": "^5.6.3" diff --git a/stake-pool/js/package.json b/stake-pool/js/package.json index e1b6e7d13c1..6c515fe6153 100644 --- a/stake-pool/js/package.json +++ b/stake-pool/js/package.json @@ -61,7 +61,7 @@ "@rollup/plugin-typescript": "^12.1.1", "@types/bn.js": "^5.1.6", "@types/jest": "^29.5.14", - "@types/node": "^22.9.1", + "@types/node": "^22.9.3", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/token-group/js/package.json b/token-group/js/package.json index 112cab9571a..30d12f8418a 100644 --- a/token-group/js/package.json +++ b/token-group/js/package.json @@ -53,7 +53,7 @@ "@solana/web3.js": "^1.95.5", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.9.1", + "@types/node": "^22.9.3", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "chai": "^5.1.2", diff --git a/token-lending/js/package.json b/token-lending/js/package.json index db54657a897..73eca0628f2 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -47,7 +47,7 @@ "@solana/spl-token": "0.4.9", "@solana/web3.js": "^1.95.5", "@types/eslint": "^8.56.7", - "@types/node": "^22.9.1", + "@types/node": "^22.9.3", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", diff --git a/token-metadata/js/package.json b/token-metadata/js/package.json index c7a58e2ea09..4d91d80ca74 100644 --- a/token-metadata/js/package.json +++ b/token-metadata/js/package.json @@ -53,7 +53,7 @@ "@solana/web3.js": "^1.95.5", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.9.1", + "@types/node": "^22.9.3", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "chai": "^5.1.2", diff --git a/token/js/package.json b/token/js/package.json index 440d1a5049f..dd7af5ef748 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -66,7 +66,7 @@ "@types/chai-as-promised": "^8.0.1", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.9.1", + "@types/node": "^22.9.3", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", From eb62c69fc73576c6fe67a17974f9aafeeb682d2f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:34:45 +0100 Subject: [PATCH 20/52] build(deps-dev): bump typescript from 5.6.3 to 5.7.2 (#7521) * build(deps-dev): bump typescript from 5.6.3 to 5.7.2 Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.6.3 to 5.7.2. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.6.3...v5.7.2) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Fix build --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jon C --- account-compression/sdk/package.json | 2 +- libraries/type-length-value/js/package.json | 2 +- memo/js/package.json | 2 +- name-service/js/jest.config.ts | 2 +- name-service/js/package.json | 2 +- name-service/js/src/instructions.ts | 10 +- pnpm-lock.yaml | 570 +++++++++---------- single-pool/js/packages/classic/package.json | 2 +- single-pool/js/packages/modern/package.json | 2 +- stake-pool/js/package.json | 2 +- token-group/js/package.json | 2 +- token-lending/js/package.json | 2 +- token-metadata/js/package.json | 2 +- token-swap/js/package.json | 2 +- token/js/package.json | 2 +- 15 files changed, 303 insertions(+), 303 deletions(-) diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index a123c278ca9..5d744ffaeb3 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -86,6 +86,6 @@ "ts-jest-resolver": "^2.0.1", "ts-node": "^10.9.2", "typedoc": "^0.26.10", - "typescript": "5.6.3" + "typescript": "5.7.2" } } diff --git a/libraries/type-length-value/js/package.json b/libraries/type-length-value/js/package.json index 4f2c790591b..8ab9a66c1e6 100644 --- a/libraries/type-length-value/js/package.json +++ b/libraries/type-length-value/js/package.json @@ -60,6 +60,6 @@ "shx": "^0.3.4", "ts-node": "^10.9.2", "typedoc": "^0.26.11", - "typescript": "^5.6.3" + "typescript": "^5.7.2" } } diff --git a/memo/js/package.json b/memo/js/package.json index ceaa7c5275d..7988cb5203f 100644 --- a/memo/js/package.json +++ b/memo/js/package.json @@ -69,6 +69,6 @@ "ts-jest": "^29.2.5", "ts-node": "^10.9.2", "typedoc": "^0.26.11", - "typescript": "^5.6.3" + "typescript": "^5.7.2" } } diff --git a/name-service/js/jest.config.ts b/name-service/js/jest.config.ts index 586fb9fe3d1..e584adb3225 100644 --- a/name-service/js/jest.config.ts +++ b/name-service/js/jest.config.ts @@ -1,7 +1,7 @@ import type { JestConfigWithTsJest } from 'ts-jest'; const jestConfig: JestConfigWithTsJest = { - preset: 'ts-jest/presets/default-esm', + preset: 'ts-jest', }; export default jestConfig; diff --git a/name-service/js/package.json b/name-service/js/package.json index c7be5c90d3f..8cadc9b0c41 100644 --- a/name-service/js/package.json +++ b/name-service/js/package.json @@ -57,7 +57,7 @@ "ts-jest": "^29.2.5", "ts-node": "^10.9.2", "typedoc": "^0.26.11", - "typescript": "^5.6.3" + "typescript": "^5.7.2" }, "dependencies": { "@solana/web3.js": "^1.95.5", diff --git a/name-service/js/src/instructions.ts b/name-service/js/src/instructions.ts index 7e729cc32ed..e7e709f5bdf 100644 --- a/name-service/js/src/instructions.ts +++ b/name-service/js/src/instructions.ts @@ -16,7 +16,7 @@ export function createInstruction( nameParentOwner?: PublicKey, ): TransactionInstruction { const buffers = [ - Buffer.from(Int8Array.from([0])), + Buffer.from(Uint8Array.from([0])), new Numberu32(hashed_name.length).toBuffer(), hashed_name, lamports.toBuffer(), @@ -98,7 +98,7 @@ export function updateInstruction( parentNameKey: PublicKey | undefined, ): TransactionInstruction { const buffers = [ - Buffer.from(Int8Array.from([1])), + Buffer.from(Uint8Array.from([1])), offset.toBuffer(), new Numberu32(input_data.length).toBuffer(), input_data, @@ -141,7 +141,7 @@ export function transferInstruction( nameClassKey?: PublicKey, nameParent?: PublicKey, ): TransactionInstruction { - const buffers = [Buffer.from(Int8Array.from([2])), newOwnerKey.toBuffer()]; + const buffers = [Buffer.from(Uint8Array.from([2])), newOwnerKey.toBuffer()]; const data = Buffer.concat(buffers); @@ -187,7 +187,7 @@ export function deleteInstruction( refundTargetKey: PublicKey, nameOwnerKey: PublicKey, ): TransactionInstruction { - const buffers = [Buffer.from(Int8Array.from([3]))]; + const buffers = [Buffer.from(Uint8Array.from([3]))]; const data = Buffer.concat(buffers); const keys = [ @@ -223,7 +223,7 @@ export function reallocInstruction( nameOwnerKey: PublicKey, space: Numberu32, ): TransactionInstruction { - const buffers = [Buffer.from(Int8Array.from([4])), space.toBuffer()]; + const buffers = [Buffer.from(Uint8Array.from([4])), space.toBuffer()]; const data = Buffer.concat(buffers); const keys = [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 20aa4ce86e4..e776e7d495b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: devDependencies: '@solana/eslint-config-solana': specifier: ^4.0.0 - version: 4.0.0(@eslint/js@9.13.0)(@types/eslint__js@8.42.3)(eslint-plugin-jest@28.9.0)(eslint-plugin-react-hooks@5.0.0)(eslint-plugin-simple-import-sort@12.1.1)(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.3.0)(eslint@9.13.0)(globals@15.11.0)(jest@30.0.0-alpha.6)(typescript-eslint@8.12.2)(typescript@5.6.3) + version: 4.0.0(@eslint/js@9.13.0)(@types/eslint__js@8.42.3)(eslint-plugin-jest@28.9.0)(eslint-plugin-react-hooks@5.0.0)(eslint-plugin-simple-import-sort@12.1.1)(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.3.0)(eslint@9.13.0)(globals@15.11.0)(jest@30.0.0-alpha.6)(typescript-eslint@8.12.2)(typescript@5.7.2) '@solana/prettier-config-solana': specifier: ^0.0.5 version: 0.0.5(prettier@3.3.3) @@ -62,7 +62,7 @@ importers: version: 0.20.1 '@solana/eslint-config-solana': specifier: ^3.0.3 - version: 3.0.6(@typescript-eslint/eslint-plugin@8.12.2)(@typescript-eslint/parser@8.12.2)(eslint-plugin-jest@28.9.0)(eslint-plugin-react-hooks@4.6.2)(eslint-plugin-simple-import-sort@12.1.1)(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.3.0)(eslint@8.57.0)(typescript@5.6.3) + version: 3.0.6(@typescript-eslint/eslint-plugin@8.12.2)(@typescript-eslint/parser@8.12.2)(eslint-plugin-jest@28.9.0)(eslint-plugin-react-hooks@4.6.2)(eslint-plugin-simple-import-sort@12.1.1)(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.3.0)(eslint@8.57.0)(typescript@5.7.2) '@types/bn.js': specifier: ^5.1.6 version: 5.1.6 @@ -77,10 +77,10 @@ importers: version: 2.6.12 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 - version: 8.12.2(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3) + version: 8.12.2(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: ^8.4.0 - version: 8.12.2(eslint@8.57.0)(typescript@5.6.3) + version: 8.12.2(eslint@8.57.0)(typescript@5.7.2) eslint: specifier: ^8.57.0 version: 8.57.0 @@ -92,7 +92,7 @@ importers: version: 2.31.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0) eslint-plugin-jest: specifier: ^28.9.0 - version: 28.9.0(@typescript-eslint/eslint-plugin@8.12.2)(eslint@8.57.0)(jest@29.7.0)(typescript@5.6.3) + version: 28.9.0(@typescript-eslint/eslint-plugin@8.12.2)(eslint@8.57.0)(jest@29.7.0)(typescript@5.7.2) eslint-plugin-mocha: specifier: ^10.5.0 version: 10.5.0(eslint@8.57.0) @@ -116,25 +116,25 @@ importers: version: 2.0.8 ts-jest: specifier: ^29.2.5 - version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.6.3) + version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.7.2) ts-jest-resolver: specifier: ^2.0.1 version: 2.0.1 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) typedoc: specifier: ^0.26.10 - version: 0.26.11(typescript@5.6.3) + version: 0.26.11(typescript@5.7.2) typescript: - specifier: 5.6.3 - version: 5.6.3 + specifier: 5.7.2 + version: 5.7.2 libraries/type-length-value/js: dependencies: '@solana/assertions': specifier: ^2.0.0 - version: 2.0.0(typescript@5.6.3) + version: 2.0.0(typescript@5.7.2) buffer: specifier: ^6.0.3 version: 6.0.3 @@ -150,10 +150,10 @@ importers: version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 - version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: ^8.4.0 - version: 8.4.0(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(eslint@8.57.0)(typescript@5.7.2) chai: specifier: ^5.1.2 version: 5.1.2 @@ -174,13 +174,13 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) typedoc: specifier: ^0.26.11 - version: 0.26.11(typescript@5.6.3) + version: 0.26.11(typescript@5.7.2) typescript: - specifier: ^5.6.3 - version: 5.6.3 + specifier: ^5.7.2 + version: 5.7.2 memo/js: dependencies: @@ -205,10 +205,10 @@ importers: version: 2.6.12 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 - version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: ^8.4.0 - version: 8.4.0(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(eslint@8.57.0)(typescript@5.7.2) chai: specifier: ^5.1.2 version: 5.1.2 @@ -235,16 +235,16 @@ importers: version: 2.0.8 ts-jest: specifier: ^29.2.5 - version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.6.3) + version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.7.2) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) typedoc: specifier: ^0.26.11 - version: 0.26.11(typescript@5.6.3) + version: 0.26.11(typescript@5.7.2) typescript: - specifier: ^5.6.3 - version: 5.6.3 + specifier: ^5.7.2 + version: 5.7.2 name-service/js: dependencies: @@ -272,10 +272,10 @@ importers: version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 - version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: ^8.4.0 - version: 8.4.0(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(eslint@8.57.0)(typescript@5.7.2) eslint: specifier: ^8.57.0 version: 8.57.0 @@ -284,7 +284,7 @@ importers: version: 3.2.0(eslint@8.57.0) eslint-plugin-functional: specifier: ^7.1.0 - version: 7.1.0(eslint@8.57.0)(typescript@5.6.3) + version: 7.1.0(eslint@8.57.0)(typescript@5.7.2) eslint-plugin-import: specifier: ^2.31.0 version: 2.31.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0) @@ -296,22 +296,22 @@ importers: version: 2.0.8 ts-jest: specifier: ^29.2.5 - version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.6.3) + version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.7.2) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) typedoc: specifier: ^0.26.11 - version: 0.26.11(typescript@5.6.3) + version: 0.26.11(typescript@5.7.2) typescript: - specifier: ^5.6.3 - version: 5.6.3 + specifier: ^5.7.2 + version: 5.7.2 single-pool/js/packages/classic: dependencies: '@solana/addresses': specifier: 2.0.0 - version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) + version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) '@solana/spl-single-pool': specifier: 1.0.0 version: link:../modern @@ -327,7 +327,7 @@ importers: version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 - version: 8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2) ava: specifier: ^6.2.0 version: 6.2.0(@ava/typescript@5.0.0) @@ -341,33 +341,33 @@ importers: specifier: ^4.19.2 version: 4.19.2 typescript: - specifier: ^5.6.3 - version: 5.6.3 + specifier: ^5.7.2 + version: 5.7.2 single-pool/js/packages/modern: dependencies: '@solana/addresses': specifier: 2.0.0 - version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) + version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) '@solana/instructions': specifier: 2.0.0 - version: 2.0.0(typescript@5.6.3) + version: 2.0.0(typescript@5.7.2) '@solana/transaction-messages': specifier: 2.0.0 - version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) + version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) devDependencies: '@types/node': specifier: ^22.9.3 version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 - version: 8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2) eslint: specifier: ^8.57.0 version: 8.57.0 typescript: - specifier: ^5.6.3 - version: 5.6.3 + specifier: ^5.7.2 + version: 5.7.2 stake-pool/js: dependencies: @@ -413,7 +413,7 @@ importers: version: 0.4.4(rollup@4.27.4) '@rollup/plugin-typescript': specifier: ^12.1.1 - version: 12.1.1(rollup@4.27.4)(tslib@2.8.1)(typescript@5.6.3) + version: 12.1.1(rollup@4.27.4)(tslib@2.8.1)(typescript@5.7.2) '@types/bn.js': specifier: ^5.1.6 version: 5.1.6 @@ -428,10 +428,10 @@ importers: version: 2.6.12 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 - version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: ^8.4.0 - version: 8.4.0(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(eslint@8.57.0)(typescript@5.7.2) cross-env: specifier: ^7.0.3 version: 7.0.3 @@ -449,19 +449,19 @@ importers: version: 4.27.4 rollup-plugin-dts: specifier: ^6.1.1 - version: 6.1.1(rollup@4.27.4)(typescript@5.6.3) + version: 6.1.1(rollup@4.27.4)(typescript@5.7.2) ts-jest: specifier: ^29.2.5 - version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.6.3) + version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.7.2) typescript: - specifier: ^5.6.3 - version: 5.6.3 + specifier: ^5.7.2 + version: 5.7.2 token-group/js: dependencies: '@solana/codecs': specifier: 2.0.0 - version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) + version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) devDependencies: '@solana/spl-type-length-value': specifier: 0.2.0 @@ -480,10 +480,10 @@ importers: version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 - version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: ^8.4.0 - version: 8.4.0(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(eslint@8.57.0)(typescript@5.7.2) chai: specifier: ^5.1.2 version: 5.1.2 @@ -504,16 +504,16 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) tslib: specifier: ^2.8.1 version: 2.8.1 typedoc: specifier: ^0.26.11 - version: 0.26.11(typescript@5.6.3) + version: 0.26.11(typescript@5.7.2) typescript: - specifier: ^5.6.3 - version: 5.6.3 + specifier: ^5.7.2 + version: 5.7.2 token-lending/js: dependencies: @@ -538,7 +538,7 @@ importers: version: 15.3.0(rollup@4.27.4) '@rollup/plugin-typescript': specifier: ^12.1.1 - version: 12.1.1(rollup@4.27.4)(tslib@2.8.1)(typescript@5.6.3) + version: 12.1.1(rollup@4.27.4)(tslib@2.8.1)(typescript@5.7.2) '@solana/spl-token': specifier: 0.4.9 version: link:../../token/js @@ -553,10 +553,10 @@ importers: version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 - version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: ^8.4.0 - version: 8.4.0(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(eslint@8.57.0)(typescript@5.7.2) eslint: specifier: ^8.57.0 version: 8.57.0 @@ -568,22 +568,22 @@ importers: version: 4.27.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) tslib: specifier: ^2.8.1 version: 2.8.1 typedoc: specifier: ^0.26.11 - version: 0.26.11(typescript@5.6.3) + version: 0.26.11(typescript@5.7.2) typescript: - specifier: ^5.6.3 - version: 5.6.3 + specifier: ^5.7.2 + version: 5.7.2 token-metadata/js: dependencies: '@solana/codecs': specifier: 2.0.0 - version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) + version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) devDependencies: '@solana/spl-type-length-value': specifier: 0.2.0 @@ -602,10 +602,10 @@ importers: version: 22.9.3 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 - version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: ^8.4.0 - version: 8.4.0(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(eslint@8.57.0)(typescript@5.7.2) chai: specifier: ^5.1.2 version: 5.1.2 @@ -626,16 +626,16 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) tslib: specifier: ^2.8.1 version: 2.8.1 typedoc: specifier: ^0.26.11 - version: 0.26.11(typescript@5.6.3) + version: 0.26.11(typescript@5.7.2) typescript: - specifier: ^5.6.3 - version: 5.6.3 + specifier: ^5.7.2 + version: 5.7.2 token-swap/js: dependencies: @@ -666,10 +666,10 @@ importers: version: 10.0.10 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 - version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: ^8.4.0 - version: 8.4.0(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(eslint@8.57.0)(typescript@5.7.2) eslint: specifier: ^8.57.0 version: 8.57.0 @@ -687,10 +687,10 @@ importers: version: 2.0.8 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) typescript: - specifier: ^5.6.3 - version: 5.6.3 + specifier: ^5.7.2 + version: 5.7.2 token/js: dependencies: @@ -712,7 +712,7 @@ importers: devDependencies: '@solana/codecs-strings': specifier: 2.0.0 - version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) + version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) '@solana/spl-memo': specifier: 0.2.4 version: link:../../memo/js @@ -736,10 +736,10 @@ importers: version: 2.6.12 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 - version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: ^8.4.0 - version: 8.4.0(eslint@8.57.0)(typescript@5.6.3) + version: 8.4.0(eslint@8.57.0)(typescript@5.7.2) chai: specifier: ^5.1.2 version: 5.1.2 @@ -769,13 +769,13 @@ importers: version: 2.0.8 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) + version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) typedoc: specifier: ^0.26.11 - version: 0.26.11(typescript@5.6.3) + version: 0.26.11(typescript@5.7.2) typescript: - specifier: ^5.6.3 - version: 5.6.3 + specifier: ^5.7.2 + version: 5.7.2 packages: @@ -2269,7 +2269,7 @@ packages: terser: 5.24.0 dev: true - /@rollup/plugin-typescript@12.1.1(rollup@4.27.4)(tslib@2.8.1)(typescript@5.6.3): + /@rollup/plugin-typescript@12.1.1(rollup@4.27.4)(tslib@2.8.1)(typescript@5.7.2): resolution: {integrity: sha512-t7O653DpfB5MbFrqPe/VcKFFkvRuFNp9qId3xq4Eth5xlyymzxNpye2z8Hrl0RIMuXTSr5GGcFpkdlMeacUiFQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2286,7 +2286,7 @@ packages: resolve: 1.22.8 rollup: 4.27.4 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.7.2 dev: true /@rollup/plugin-virtual@3.0.2(rollup@4.27.4): @@ -2534,29 +2534,29 @@ packages: '@sinonjs/commons': 3.0.1 dev: true - /@solana/addresses@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3): + /@solana/addresses@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2): resolution: {integrity: sha512-8n3c/mUlH1/z+pM8e7OJ6uDSXw26Be0dgYiokiqblO66DGQ0d+7pqFUFZ5pEGjJ9PU2lDTSfY8rHf4cemOqwzQ==} engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5' dependencies: - '@solana/assertions': 2.0.0(typescript@5.6.3) - '@solana/codecs-core': 2.0.0(typescript@5.6.3) - '@solana/codecs-strings': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) - '@solana/errors': 2.0.0(typescript@5.6.3) - typescript: 5.6.3 + '@solana/assertions': 2.0.0(typescript@5.7.2) + '@solana/codecs-core': 2.0.0(typescript@5.7.2) + '@solana/codecs-strings': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) + '@solana/errors': 2.0.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - fastestsmallesttextencoderdecoder dev: false - /@solana/assertions@2.0.0(typescript@5.6.3): + /@solana/assertions@2.0.0(typescript@5.7.2): resolution: {integrity: sha512-NyPPqZRNGXs/GAjfgsw7YS6vCTXWt4ibXveS+ciy5sdmp/0v3pA6DlzYjleF9Sljrew0IiON15rjaXamhDxYfQ==} engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5' dependencies: - '@solana/errors': 2.0.0(typescript@5.6.3) - typescript: 5.6.3 + '@solana/errors': 2.0.0(typescript@5.7.2) + typescript: 5.7.2 dev: false /@solana/buffer-layout-utils@0.2.0: @@ -2579,67 +2579,67 @@ packages: dependencies: buffer: 6.0.3 - /@solana/codecs-core@2.0.0(typescript@5.6.3): + /@solana/codecs-core@2.0.0(typescript@5.7.2): resolution: {integrity: sha512-qCG+3hDU5Pm8V6joJjR4j4Zv9md1z0RaecniNDIkEglnxmOUODnmPLWbtOjnDylfItyuZeDihK8hkewdj8cUtw==} engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5' dependencies: - '@solana/errors': 2.0.0(typescript@5.6.3) - typescript: 5.6.3 + '@solana/errors': 2.0.0(typescript@5.7.2) + typescript: 5.7.2 - /@solana/codecs-data-structures@2.0.0(typescript@5.6.3): + /@solana/codecs-data-structures@2.0.0(typescript@5.7.2): resolution: {integrity: sha512-N98Y4jsrC/XeOgqrfsGqcOFIaOoMsKdAxOmy5oqVaEN67YoGSLNC9ROnqamOAOrsZdicTWx9/YLKFmQi9DPh1A==} engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5' dependencies: - '@solana/codecs-core': 2.0.0(typescript@5.6.3) - '@solana/codecs-numbers': 2.0.0(typescript@5.6.3) - '@solana/errors': 2.0.0(typescript@5.6.3) - typescript: 5.6.3 + '@solana/codecs-core': 2.0.0(typescript@5.7.2) + '@solana/codecs-numbers': 2.0.0(typescript@5.7.2) + '@solana/errors': 2.0.0(typescript@5.7.2) + typescript: 5.7.2 dev: false - /@solana/codecs-numbers@2.0.0(typescript@5.6.3): + /@solana/codecs-numbers@2.0.0(typescript@5.7.2): resolution: {integrity: sha512-r66i7VzJO1MZkQWZIAI6jjJOFVpnq0+FIabo2Z2ZDtrArFus/SbSEv543yCLeD2tdR/G/p+1+P5On10qF50Y1Q==} engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5' dependencies: - '@solana/codecs-core': 2.0.0(typescript@5.6.3) - '@solana/errors': 2.0.0(typescript@5.6.3) - typescript: 5.6.3 + '@solana/codecs-core': 2.0.0(typescript@5.7.2) + '@solana/errors': 2.0.0(typescript@5.7.2) + typescript: 5.7.2 - /@solana/codecs-strings@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3): + /@solana/codecs-strings@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2): resolution: {integrity: sha512-dNqeCypsvaHcjW86H0gYgAZGGkKVBeKVeh7WXlOZ9kno7PeQ2wNkpccyzDfuzaIsKv+HZUD3v/eo86GCvnKazQ==} engines: {node: '>=20.18.0'} peerDependencies: fastestsmallesttextencoderdecoder: ^1.0.22 typescript: '>=5' dependencies: - '@solana/codecs-core': 2.0.0(typescript@5.6.3) - '@solana/codecs-numbers': 2.0.0(typescript@5.6.3) - '@solana/errors': 2.0.0(typescript@5.6.3) + '@solana/codecs-core': 2.0.0(typescript@5.7.2) + '@solana/codecs-numbers': 2.0.0(typescript@5.7.2) + '@solana/errors': 2.0.0(typescript@5.7.2) fastestsmallesttextencoderdecoder: 1.0.22 - typescript: 5.6.3 + typescript: 5.7.2 - /@solana/codecs@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3): + /@solana/codecs@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2): resolution: {integrity: sha512-xneIG5ppE6WIGaZCK7JTys0uLhzlnEJUdBO8nRVIyerwH6aqCfb0fGe7q5WNNYAVDRSxC0Pc1TDe1hpdx3KWmQ==} engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5' dependencies: - '@solana/codecs-core': 2.0.0(typescript@5.6.3) - '@solana/codecs-data-structures': 2.0.0(typescript@5.6.3) - '@solana/codecs-numbers': 2.0.0(typescript@5.6.3) - '@solana/codecs-strings': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) - '@solana/options': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) - typescript: 5.6.3 + '@solana/codecs-core': 2.0.0(typescript@5.7.2) + '@solana/codecs-data-structures': 2.0.0(typescript@5.7.2) + '@solana/codecs-numbers': 2.0.0(typescript@5.7.2) + '@solana/codecs-strings': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) + '@solana/options': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - fastestsmallesttextencoderdecoder dev: false - /@solana/errors@2.0.0(typescript@5.6.3): + /@solana/errors@2.0.0(typescript@5.7.2): resolution: {integrity: sha512-IHlaPFSy4lvYco1oHJ3X8DbchWwAwJaL/4wZKnF1ugwZ0g0re8wbABrqNOe/jyZ84VU9Z14PYM8W9oDAebdJbw==} engines: {node: '>=20.18.0'} hasBin: true @@ -2648,9 +2648,9 @@ packages: dependencies: chalk: 5.3.0 commander: 12.1.0 - typescript: 5.6.3 + typescript: 5.7.2 - /@solana/eslint-config-solana@3.0.6(@typescript-eslint/eslint-plugin@8.12.2)(@typescript-eslint/parser@8.12.2)(eslint-plugin-jest@28.9.0)(eslint-plugin-react-hooks@4.6.2)(eslint-plugin-simple-import-sort@12.1.1)(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.3.0)(eslint@8.57.0)(typescript@5.6.3): + /@solana/eslint-config-solana@3.0.6(@typescript-eslint/eslint-plugin@8.12.2)(@typescript-eslint/parser@8.12.2)(eslint-plugin-jest@28.9.0)(eslint-plugin-react-hooks@4.6.2)(eslint-plugin-simple-import-sort@12.1.1)(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.3.0)(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-3u024DkukJCfzUfOgN1EmWzVZLaZtgRLJ52FEdQmIG8NYOzLpaIJFgQvjYXWQlnK6ycIcSn/MesHG6sbKkMtTQ==} peerDependencies: '@typescript-eslint/eslint-plugin': ^7.0.0 @@ -2663,18 +2663,18 @@ packages: eslint-plugin-typescript-sort-keys: ^3.2.0 typescript: ^5.1.6 dependencies: - '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3) - '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.7.2) eslint: 8.57.0 - eslint-plugin-jest: 28.9.0(@typescript-eslint/eslint-plugin@8.12.2)(eslint@8.57.0)(jest@29.7.0)(typescript@5.6.3) + eslint-plugin-jest: 28.9.0(@typescript-eslint/eslint-plugin@8.12.2)(eslint@8.57.0)(jest@29.7.0)(typescript@5.7.2) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) eslint-plugin-simple-import-sort: 12.1.1(eslint@8.57.0) eslint-plugin-sort-keys-fix: 1.1.2 - eslint-plugin-typescript-sort-keys: 3.3.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3) - typescript: 5.6.3 + eslint-plugin-typescript-sort-keys: 3.3.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2) + typescript: 5.7.2 dev: true - /@solana/eslint-config-solana@4.0.0(@eslint/js@9.13.0)(@types/eslint__js@8.42.3)(eslint-plugin-jest@28.9.0)(eslint-plugin-react-hooks@5.0.0)(eslint-plugin-simple-import-sort@12.1.1)(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.3.0)(eslint@9.13.0)(globals@15.11.0)(jest@30.0.0-alpha.6)(typescript-eslint@8.12.2)(typescript@5.6.3): + /@solana/eslint-config-solana@4.0.0(@eslint/js@9.13.0)(@types/eslint__js@8.42.3)(eslint-plugin-jest@28.9.0)(eslint-plugin-react-hooks@5.0.0)(eslint-plugin-simple-import-sort@12.1.1)(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.3.0)(eslint@9.13.0)(globals@15.11.0)(jest@30.0.0-alpha.6)(typescript-eslint@8.12.2)(typescript@5.7.2): resolution: {integrity: sha512-kDhd7uOsby+7Gffenn0EBeE692s2cwPe0/Lv1BsdfeniDM4NxBcfIXLQFB8iCCvdFWrO9b+0SMuGrhRHdgTDQQ==} peerDependencies: '@eslint/js': ^9.13.0 @@ -2693,48 +2693,48 @@ packages: '@eslint/js': 9.13.0 '@types/eslint__js': 8.42.3 eslint: 9.13.0 - eslint-plugin-jest: 28.9.0(eslint@9.13.0)(jest@30.0.0-alpha.6)(typescript@5.6.3) + eslint-plugin-jest: 28.9.0(eslint@9.13.0)(jest@30.0.0-alpha.6)(typescript@5.7.2) eslint-plugin-react-hooks: 5.0.0(eslint@9.13.0) eslint-plugin-simple-import-sort: 12.1.1(eslint@9.13.0) eslint-plugin-sort-keys-fix: 1.1.2 - eslint-plugin-typescript-sort-keys: 3.3.0(@typescript-eslint/parser@8.12.2)(eslint@9.13.0)(typescript@5.6.3) + eslint-plugin-typescript-sort-keys: 3.3.0(@typescript-eslint/parser@8.12.2)(eslint@9.13.0)(typescript@5.7.2) globals: 15.11.0 jest: 30.0.0-alpha.6 - typescript: 5.6.3 - typescript-eslint: 8.12.2(eslint@9.13.0)(typescript@5.6.3) + typescript: 5.7.2 + typescript-eslint: 8.12.2(eslint@9.13.0)(typescript@5.7.2) dev: true - /@solana/functional@2.0.0(typescript@5.6.3): + /@solana/functional@2.0.0(typescript@5.7.2): resolution: {integrity: sha512-Sj+sLiUTimnMEyGnSLGt0lbih2xPDUhxhonnrIkPwA+hjQ3ULGHAxeevHU06nqiVEgENQYUJ5rCtHs4xhUFAkQ==} engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5' dependencies: - typescript: 5.6.3 + typescript: 5.7.2 dev: false - /@solana/instructions@2.0.0(typescript@5.6.3): + /@solana/instructions@2.0.0(typescript@5.7.2): resolution: {integrity: sha512-MiTEiNF7Pzp+Y+x4yadl2VUcNHboaW5WP52psBuhHns3GpbbruRv5efMpM9OEQNe1OsN+Eg39vjEidX55+P+DQ==} engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5' dependencies: - '@solana/errors': 2.0.0(typescript@5.6.3) - typescript: 5.6.3 + '@solana/errors': 2.0.0(typescript@5.7.2) + typescript: 5.7.2 dev: false - /@solana/options@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3): + /@solana/options@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2): resolution: {integrity: sha512-OVc4KnYosB8oAukQ/htgrxXSxlUP6gUu5Aau6d/BgEkPQzWd/Pr+w91VWw3i3zZuu2SGpedbyh05RoJBe/hSXA==} engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5' dependencies: - '@solana/codecs-core': 2.0.0(typescript@5.6.3) - '@solana/codecs-data-structures': 2.0.0(typescript@5.6.3) - '@solana/codecs-numbers': 2.0.0(typescript@5.6.3) - '@solana/codecs-strings': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) - '@solana/errors': 2.0.0(typescript@5.6.3) - typescript: 5.6.3 + '@solana/codecs-core': 2.0.0(typescript@5.7.2) + '@solana/codecs-data-structures': 2.0.0(typescript@5.7.2) + '@solana/codecs-numbers': 2.0.0(typescript@5.7.2) + '@solana/codecs-strings': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) + '@solana/errors': 2.0.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - fastestsmallesttextencoderdecoder dev: false @@ -2747,37 +2747,37 @@ packages: prettier: 3.3.3 dev: true - /@solana/rpc-types@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3): + /@solana/rpc-types@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2): resolution: {integrity: sha512-o1ApB9PYR0A3XjVSOh//SOVWgjDcqMlR3UNmtqciuREIBmWqnvPirdOa5EJxD3iPhfA4gnNnhGzT+tMDeDW/Kw==} engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5' dependencies: - '@solana/addresses': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) - '@solana/codecs-core': 2.0.0(typescript@5.6.3) - '@solana/codecs-numbers': 2.0.0(typescript@5.6.3) - '@solana/codecs-strings': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) - '@solana/errors': 2.0.0(typescript@5.6.3) - typescript: 5.6.3 + '@solana/addresses': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) + '@solana/codecs-core': 2.0.0(typescript@5.7.2) + '@solana/codecs-numbers': 2.0.0(typescript@5.7.2) + '@solana/codecs-strings': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) + '@solana/errors': 2.0.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - fastestsmallesttextencoderdecoder dev: false - /@solana/transaction-messages@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3): + /@solana/transaction-messages@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2): resolution: {integrity: sha512-Uc6Fw1EJLBrmgS1lH2ZfLAAKFvprWPQQzOVwZS78Pv8Whsk7tweYTK6S0Upv0nHr50rGpnORJfmdBrXE6OfNGg==} engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5' dependencies: - '@solana/addresses': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) - '@solana/codecs-core': 2.0.0(typescript@5.6.3) - '@solana/codecs-data-structures': 2.0.0(typescript@5.6.3) - '@solana/codecs-numbers': 2.0.0(typescript@5.6.3) - '@solana/errors': 2.0.0(typescript@5.6.3) - '@solana/functional': 2.0.0(typescript@5.6.3) - '@solana/instructions': 2.0.0(typescript@5.6.3) - '@solana/rpc-types': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) - typescript: 5.6.3 + '@solana/addresses': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) + '@solana/codecs-core': 2.0.0(typescript@5.7.2) + '@solana/codecs-data-structures': 2.0.0(typescript@5.7.2) + '@solana/codecs-numbers': 2.0.0(typescript@5.7.2) + '@solana/errors': 2.0.0(typescript@5.7.2) + '@solana/functional': 2.0.0(typescript@5.7.2) + '@solana/instructions': 2.0.0(typescript@5.7.2) + '@solana/rpc-types': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - fastestsmallesttextencoderdecoder dev: false @@ -3027,7 +3027,7 @@ packages: '@types/yargs-parser': 21.0.3 dev: true - /@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3): + /@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3039,22 +3039,22 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/scope-manager': 8.12.2 - '@typescript-eslint/type-utils': 8.12.2(eslint@8.57.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.12.2(eslint@8.57.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.12.2 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.3) - typescript: 5.6.3 + ts-api-utils: 1.3.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2)(eslint@9.13.0)(typescript@5.6.3): + /@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2)(eslint@9.13.0)(typescript@5.7.2): resolution: {integrity: sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3066,22 +3066,22 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.12.2(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.12.2(eslint@9.13.0)(typescript@5.7.2) '@typescript-eslint/scope-manager': 8.12.2 - '@typescript-eslint/type-utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.12.2(eslint@9.13.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.12.2 eslint: 9.13.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.3) - typescript: 5.6.3 + ts-api-utils: 1.3.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3): + /@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-rg8LGdv7ri3oAlenMACk9e+AR4wUV0yrrG+XKsGKOK0EVgeEDqurkXMPILG2836fW4ibokTB5v4b6Z9+GYQDEw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3093,22 +3093,22 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/scope-manager': 8.4.0 - '@typescript-eslint/type-utils': 8.4.0(eslint@8.57.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.4.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.4.0(eslint@8.57.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.4.0(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.4.0 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.3) - typescript: 5.6.3 + ts-api-utils: 1.3.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.6.3): + /@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-rg8LGdv7ri3oAlenMACk9e+AR4wUV0yrrG+XKsGKOK0EVgeEDqurkXMPILG2836fW4ibokTB5v4b6Z9+GYQDEw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3120,48 +3120,48 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 8.4.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.4.0(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/scope-manager': 8.4.0 - '@typescript-eslint/type-utils': 8.4.0(eslint@8.57.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.4.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.4.0(eslint@8.57.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.4.0(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.4.0 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.3) - typescript: 5.6.3 + ts-api-utils: 1.3.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/experimental-utils@5.62.0(eslint@8.57.0)(typescript@5.6.3): + /@typescript-eslint/experimental-utils@5.62.0(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-RTXpeB3eMkpoclG3ZHft6vG/Z30azNHuqY6wKPBHlVMZFuEvrtlEDe8gMqDb+SO+9hjC/pLekeSCryf9vMZlCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.7.2) eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/experimental-utils@5.62.0(eslint@9.13.0)(typescript@5.6.3): + /@typescript-eslint/experimental-utils@5.62.0(eslint@9.13.0)(typescript@5.7.2): resolution: {integrity: sha512-RTXpeB3eMkpoclG3ZHft6vG/Z30azNHuqY6wKPBHlVMZFuEvrtlEDe8gMqDb+SO+9hjC/pLekeSCryf9vMZlCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 5.62.0(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/utils': 5.62.0(eslint@9.13.0)(typescript@5.7.2) eslint: 9.13.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3): + /@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3173,16 +3173,16 @@ packages: dependencies: '@typescript-eslint/scope-manager': 8.12.2 '@typescript-eslint/types': 8.12.2 - '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.12.2 debug: 4.3.7(supports-color@8.1.1) eslint: 8.57.0 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3): + /@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.7.2): resolution: {integrity: sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3194,16 +3194,16 @@ packages: dependencies: '@typescript-eslint/scope-manager': 8.12.2 '@typescript-eslint/types': 8.12.2 - '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.12.2 debug: 4.3.7(supports-color@8.1.1) eslint: 9.13.0 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@8.4.0(eslint@8.57.0)(typescript@5.6.3): + /@typescript-eslint/parser@8.4.0(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-NHgWmKSgJk5K9N16GIhQ4jSobBoJwrmURaLErad0qlLjrpP5bECYg+wxVTGlGZmJbU03jj/dfnb6V9bw+5icsA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3215,11 +3215,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 8.4.0 '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.4.0 debug: 4.3.6 eslint: 8.57.0 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true @@ -3256,7 +3256,7 @@ packages: '@typescript-eslint/visitor-keys': 8.4.0 dev: true - /@typescript-eslint/type-utils@8.12.2(eslint@8.57.0)(typescript@5.6.3): + /@typescript-eslint/type-utils@8.12.2(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3265,17 +3265,17 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) - '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.7.2) + '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.7.2) debug: 4.3.7(supports-color@8.1.1) - ts-api-utils: 1.3.0(typescript@5.6.3) - typescript: 5.6.3 + ts-api-utils: 1.3.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - eslint - supports-color dev: true - /@typescript-eslint/type-utils@8.12.2(eslint@9.13.0)(typescript@5.6.3): + /@typescript-eslint/type-utils@8.12.2(eslint@9.13.0)(typescript@5.7.2): resolution: {integrity: sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3284,17 +3284,17 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) - '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.7.2) + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.7.2) debug: 4.3.7(supports-color@8.1.1) - ts-api-utils: 1.3.0(typescript@5.6.3) - typescript: 5.6.3 + ts-api-utils: 1.3.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - eslint - supports-color dev: true - /@typescript-eslint/type-utils@8.4.0(eslint@8.57.0)(typescript@5.6.3): + /@typescript-eslint/type-utils@8.4.0(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-pu2PAmNrl9KX6TtirVOrbLPLwDmASpZhK/XU7WvoKoCUkdtq9zF7qQ7gna0GBZFN0hci0vHaSusiL2WpsQk37A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3303,11 +3303,11 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.4.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.4.0(eslint@8.57.0)(typescript@5.7.2) debug: 4.3.7(supports-color@8.1.1) - ts-api-utils: 1.3.0(typescript@5.6.3) - typescript: 5.6.3 + ts-api-utils: 1.3.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - eslint - supports-color @@ -3333,7 +3333,7 @@ packages: engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dev: true - /@typescript-eslint/typescript-estree@5.62.0(typescript@5.6.3): + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.7.2): resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -3348,13 +3348,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.3 - tsutils: 3.21.0(typescript@5.6.3) - typescript: 5.6.3 + tsutils: 3.21.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@8.10.0(typescript@5.6.3): + /@typescript-eslint/typescript-estree@8.10.0(typescript@5.7.2): resolution: {integrity: sha512-3OE0nlcOHaMvQ8Xu5gAfME3/tWVDpb/HxtpUZ1WeOAksZ/h/gwrBzCklaGzwZT97/lBbbxJ16dMA98JMEngW4w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3370,13 +3370,13 @@ packages: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) - typescript: 5.6.3 + ts-api-utils: 1.3.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@8.12.2(typescript@5.6.3): + /@typescript-eslint/typescript-estree@8.12.2(typescript@5.7.2): resolution: {integrity: sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3392,13 +3392,13 @@ packages: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) - typescript: 5.6.3 + ts-api-utils: 1.3.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@8.4.0(typescript@5.6.3): + /@typescript-eslint/typescript-estree@8.4.0(typescript@5.7.2): resolution: {integrity: sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3414,13 +3414,13 @@ packages: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) - typescript: 5.6.3 + ts-api-utils: 1.3.0(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.6.3): + /@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -3431,7 +3431,7 @@ packages: '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.7.2) eslint: 8.57.0 eslint-scope: 5.1.1 semver: 7.6.3 @@ -3440,7 +3440,7 @@ packages: - typescript dev: true - /@typescript-eslint/utils@5.62.0(eslint@9.13.0)(typescript@5.6.3): + /@typescript-eslint/utils@5.62.0(eslint@9.13.0)(typescript@5.7.2): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -3451,7 +3451,7 @@ packages: '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.7.2) eslint: 9.13.0 eslint-scope: 5.1.1 semver: 7.6.3 @@ -3460,7 +3460,7 @@ packages: - typescript dev: true - /@typescript-eslint/utils@8.10.0(eslint@8.57.0)(typescript@5.6.3): + /@typescript-eslint/utils@8.10.0(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-Oq4uZ7JFr9d1ZunE/QKy5egcDRXT/FrS2z/nlxzPua2VHFtmMvFNDvpq1m/hq0ra+T52aUezfcjGRIB7vNJF9w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3469,14 +3469,14 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.10.0 '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.7.2) eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/utils@8.12.2(eslint@8.57.0)(typescript@5.6.3): + /@typescript-eslint/utils@8.12.2(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3485,14 +3485,14 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.12.2 '@typescript-eslint/types': 8.12.2 - '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.7.2) eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/utils@8.12.2(eslint@9.13.0)(typescript@5.6.3): + /@typescript-eslint/utils@8.12.2(eslint@9.13.0)(typescript@5.7.2): resolution: {integrity: sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3501,14 +3501,14 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) '@typescript-eslint/scope-manager': 8.12.2 '@typescript-eslint/types': 8.12.2 - '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.7.2) eslint: 9.13.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/utils@8.4.0(eslint@8.57.0)(typescript@5.6.3): + /@typescript-eslint/utils@8.4.0(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-swULW8n1IKLjRAgciCkTCafyTHHfwVQFt8DovmaF69sKbOxTSFMmIZaSHjqO9i/RV0wIblaawhzvtva8Nmm7lQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -3517,7 +3517,7 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.4.0 '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.7.2) eslint: 8.57.0 transitivePeerDependencies: - supports-color @@ -4988,7 +4988,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.7.2) debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -5017,7 +5017,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 8.4.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.4.0(eslint@8.57.0)(typescript@5.7.2) debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -5036,7 +5036,7 @@ packages: ignore: 5.2.4 dev: true - /eslint-plugin-functional@7.1.0(eslint@8.57.0)(typescript@5.6.3): + /eslint-plugin-functional@7.1.0(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-eu7lVAF9dDTw2xzlsLDvJRXx9t4g/S/pmCSdGx2oFmibmkz2LMoPDu7B+UA9CV/RzvNr4wWd4apc71nMAazdKQ==} engines: {node: '>=v18.18.0'} peerDependencies: @@ -5046,14 +5046,14 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 8.10.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.10.0(eslint@8.57.0)(typescript@5.7.2) deepmerge-ts: 7.1.3 escape-string-regexp: 5.0.0 eslint: 8.57.0 - is-immutable-type: 5.0.0(eslint@8.57.0)(typescript@5.6.3) - ts-api-utils: 1.3.0(typescript@5.6.3) - ts-declaration-location: 1.0.4(typescript@5.6.3) - typescript: 5.6.3 + is-immutable-type: 5.0.0(eslint@8.57.0)(typescript@5.7.2) + ts-api-utils: 1.3.0(typescript@5.7.2) + ts-declaration-location: 1.0.4(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true @@ -5069,7 +5069,7 @@ packages: optional: true dependencies: '@rtsao/scc': 1.1.0 - '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.7.2) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 @@ -5106,7 +5106,7 @@ packages: optional: true dependencies: '@rtsao/scc': 1.1.0 - '@typescript-eslint/parser': 8.4.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.4.0(eslint@8.57.0)(typescript@5.7.2) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 @@ -5132,7 +5132,7 @@ packages: - supports-color dev: true - /eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@8.12.2)(eslint@8.57.0)(jest@29.7.0)(typescript@5.6.3): + /eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@8.12.2)(eslint@8.57.0)(jest@29.7.0)(typescript@5.7.2): resolution: {integrity: sha512-rLu1s1Wf96TgUUxSw6loVIkNtUjq1Re7A9QdCCHSohnvXEBAjuL420h0T/fMmkQlNsQP2GhQzEUpYHPfxBkvYQ==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} peerDependencies: @@ -5145,8 +5145,8 @@ packages: jest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.7.2) eslint: 8.57.0 jest: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) transitivePeerDependencies: @@ -5154,7 +5154,7 @@ packages: - typescript dev: true - /eslint-plugin-jest@28.9.0(eslint@9.13.0)(jest@30.0.0-alpha.6)(typescript@5.6.3): + /eslint-plugin-jest@28.9.0(eslint@9.13.0)(jest@30.0.0-alpha.6)(typescript@5.7.2): resolution: {integrity: sha512-rLu1s1Wf96TgUUxSw6loVIkNtUjq1Re7A9QdCCHSohnvXEBAjuL420h0T/fMmkQlNsQP2GhQzEUpYHPfxBkvYQ==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} peerDependencies: @@ -5167,7 +5167,7 @@ packages: jest: optional: true dependencies: - '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.7.2) eslint: 9.13.0 jest: 30.0.0-alpha.6 transitivePeerDependencies: @@ -5279,7 +5279,7 @@ packages: eslint: 9.13.0 dev: true - /eslint-plugin-typescript-sort-keys@3.3.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.6.3): + /eslint-plugin-typescript-sort-keys@3.3.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-bRW3Rc/VNdrSP9OoY5wgjjaXCOOkZKpzvl/Mk6l8Sg8CMehVIcg9K4y33l+ZcZiknpl0aR6rKusxuCJNGZWmVw==} engines: {node: '>= 16'} peerDependencies: @@ -5287,17 +5287,17 @@ packages: eslint: ^7 || ^8 typescript: ^3 || ^4 || ^5 dependencies: - '@typescript-eslint/experimental-utils': 5.62.0(eslint@8.57.0)(typescript@5.6.3) - '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/experimental-utils': 5.62.0(eslint@8.57.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.7.2) eslint: 8.57.0 json-schema: 0.4.0 natural-compare-lite: 1.4.0 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-typescript-sort-keys@3.3.0(@typescript-eslint/parser@8.12.2)(eslint@9.13.0)(typescript@5.6.3): + /eslint-plugin-typescript-sort-keys@3.3.0(@typescript-eslint/parser@8.12.2)(eslint@9.13.0)(typescript@5.7.2): resolution: {integrity: sha512-bRW3Rc/VNdrSP9OoY5wgjjaXCOOkZKpzvl/Mk6l8Sg8CMehVIcg9K4y33l+ZcZiknpl0aR6rKusxuCJNGZWmVw==} engines: {node: '>= 16'} peerDependencies: @@ -5305,12 +5305,12 @@ packages: eslint: ^7 || ^8 typescript: ^3 || ^4 || ^5 dependencies: - '@typescript-eslint/experimental-utils': 5.62.0(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/parser': 8.12.2(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/experimental-utils': 5.62.0(eslint@9.13.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.12.2(eslint@9.13.0)(typescript@5.7.2) eslint: 9.13.0 json-schema: 0.4.0 natural-compare-lite: 1.4.0 - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true @@ -6331,17 +6331,17 @@ packages: is-extglob: 2.1.1 dev: true - /is-immutable-type@5.0.0(eslint@8.57.0)(typescript@5.6.3): + /is-immutable-type@5.0.0(eslint@8.57.0)(typescript@5.7.2): resolution: {integrity: sha512-mcvHasqbRBWJznuPqqHRKiJgYAz60sZ0mvO3bN70JbkuK7ksfmgc489aKZYxMEjIbRvyOseaTjaRZLRF/xFeRA==} peerDependencies: eslint: '*' typescript: '>=4.7.4' dependencies: - '@typescript-eslint/type-utils': 8.4.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.4.0(eslint@8.57.0)(typescript@5.7.2) eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.6.3) - ts-declaration-location: 1.0.4(typescript@5.6.3) - typescript: 5.6.3 + ts-api-utils: 1.3.0(typescript@5.7.2) + ts-declaration-location: 1.0.4(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - supports-color dev: true @@ -6774,7 +6774,7 @@ packages: pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.2(@types/node@22.9.3)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -8424,7 +8424,7 @@ packages: package-json-from-dist: 1.0.0 dev: true - /rollup-plugin-dts@6.1.1(rollup@4.27.4)(typescript@5.6.3): + /rollup-plugin-dts@6.1.1(rollup@4.27.4)(typescript@5.7.2): resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} engines: {node: '>=16'} peerDependencies: @@ -8433,7 +8433,7 @@ packages: dependencies: magic-string: 0.30.10 rollup: 4.27.4 - typescript: 5.6.3 + typescript: 5.7.2 optionalDependencies: '@babel/code-frame': 7.26.2 dev: true @@ -9022,22 +9022,22 @@ packages: escape-string-regexp: 1.0.5 dev: true - /ts-api-utils@1.3.0(typescript@5.6.3): + /ts-api-utils@1.3.0(typescript@5.7.2): resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.6.3 + typescript: 5.7.2 dev: true - /ts-declaration-location@1.0.4(typescript@5.6.3): + /ts-declaration-location@1.0.4(typescript@5.7.2): resolution: {integrity: sha512-r4JoxYhKULbZuH81Pjrp9OEG5St7XWk7zXwGkLKhmVcjiBVHTJXV5wK6dEa9JKW5QGSTW6b1lOjxAKp8R1SQhg==} peerDependencies: typescript: '>=4.0.0' dependencies: minimatch: 10.0.1 - typescript: 5.6.3 + typescript: 5.7.2 dev: true /ts-jest-resolver@2.0.1: @@ -9046,7 +9046,7 @@ packages: jest-resolve: 29.7.0 dev: true - /ts-jest@29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.6.3): + /ts-jest@29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.7.2): resolution: {integrity: sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==} engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} hasBin: true @@ -9080,11 +9080,11 @@ packages: lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.6.3 - typescript: 5.6.3 + typescript: 5.7.2 yargs-parser: 21.1.1 dev: true - /ts-node@10.9.2(@types/node@22.9.3)(typescript@5.6.3): + /ts-node@10.9.2(@types/node@22.9.3)(typescript@5.7.2): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: @@ -9110,7 +9110,7 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.6.3 + typescript: 5.7.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -9131,14 +9131,14 @@ packages: /tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - /tsutils@3.21.0(typescript@5.6.3): + /tsutils@3.21.0(typescript@5.7.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 5.6.3 + typescript: 5.7.2 dev: true /tsx@4.19.2: @@ -9283,7 +9283,7 @@ packages: possible-typed-array-names: 1.0.0 dev: true - /typedoc@0.26.11(typescript@5.6.3): + /typedoc@0.26.11(typescript@5.7.2): resolution: {integrity: sha512-sFEgRRtrcDl2FxVP58Ze++ZK2UQAEvtvvH8rRlig1Ja3o7dDaMHmaBfvJmdGnNEFaLTpQsN8dpvZaTqJSu/Ugw==} engines: {node: '>= 18'} hasBin: true @@ -9294,7 +9294,7 @@ packages: markdown-it: 14.1.0 minimatch: 9.0.5 shiki: 1.16.2 - typescript: 5.6.3 + typescript: 5.7.2 yaml: 2.5.1 dev: true @@ -9302,7 +9302,7 @@ packages: resolution: {integrity: sha512-7sI4e/bZijOzyURng88oOFZCISQPTHozfE2sUu5AviFYk5QV7fYGb6YiDl+vKjF/pICA354JImBImL9XJWUvdQ==} dev: false - /typescript-eslint@8.12.2(eslint@9.13.0)(typescript@5.6.3): + /typescript-eslint@8.12.2(eslint@9.13.0)(typescript@5.7.2): resolution: {integrity: sha512-UbuVUWSrHVR03q9CWx+JDHeO6B/Hr9p4U5lRH++5tq/EbFq1faYZe50ZSBePptgfIKLEti0aPQ3hFgnPVcd8ZQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -9311,17 +9311,17 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2)(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/parser': 8.12.2(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) - typescript: 5.6.3 + '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2)(eslint@9.13.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.12.2(eslint@9.13.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.7.2) + typescript: 5.7.2 transitivePeerDependencies: - eslint - supports-color dev: true - /typescript@5.6.3: - resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} + /typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} engines: {node: '>=14.17'} hasBin: true diff --git a/single-pool/js/packages/classic/package.json b/single-pool/js/packages/classic/package.json index 313b90fa3bd..a8540698952 100644 --- a/single-pool/js/packages/classic/package.json +++ b/single-pool/js/packages/classic/package.json @@ -25,7 +25,7 @@ "eslint": "^8.57.0", "solana-bankrun": "^0.2.0", "tsx": "^4.19.2", - "typescript": "^5.6.3" + "typescript": "^5.7.2" }, "dependencies": { "@solana/web3.js": "^1.95.5", diff --git a/single-pool/js/packages/modern/package.json b/single-pool/js/packages/modern/package.json index 7140b087819..5ee49a77a38 100644 --- a/single-pool/js/packages/modern/package.json +++ b/single-pool/js/packages/modern/package.json @@ -19,7 +19,7 @@ "@types/node": "^22.9.3", "@typescript-eslint/eslint-plugin": "^8.4.0", "eslint": "^8.57.0", - "typescript": "^5.6.3" + "typescript": "^5.7.2" }, "dependencies": { "@solana/addresses": "2.0.0", diff --git a/stake-pool/js/package.json b/stake-pool/js/package.json index 6c515fe6153..8a334c2fa8c 100644 --- a/stake-pool/js/package.json +++ b/stake-pool/js/package.json @@ -72,7 +72,7 @@ "rollup": "^4.27.4", "rollup-plugin-dts": "^6.1.1", "ts-jest": "^29.2.5", - "typescript": "^5.6.3" + "typescript": "^5.7.2" }, "jest": { "moduleFileExtensions": [ diff --git a/token-group/js/package.json b/token-group/js/package.json index 30d12f8418a..c23cb0477e4 100644 --- a/token-group/js/package.json +++ b/token-group/js/package.json @@ -65,6 +65,6 @@ "ts-node": "^10.9.2", "tslib": "^2.8.1", "typedoc": "^0.26.11", - "typescript": "^5.6.3" + "typescript": "^5.7.2" } } diff --git a/token-lending/js/package.json b/token-lending/js/package.json index 73eca0628f2..b74a1dc7290 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -56,6 +56,6 @@ "ts-node": "^10.9.2", "tslib": "^2.8.1", "typedoc": "^0.26.11", - "typescript": "^5.6.3" + "typescript": "^5.7.2" } } diff --git a/token-metadata/js/package.json b/token-metadata/js/package.json index 4d91d80ca74..13c7498fbf2 100644 --- a/token-metadata/js/package.json +++ b/token-metadata/js/package.json @@ -65,6 +65,6 @@ "ts-node": "^10.9.2", "tslib": "^2.8.1", "typedoc": "^0.26.11", - "typescript": "^5.6.3" + "typescript": "^5.7.2" } } diff --git a/token-swap/js/package.json b/token-swap/js/package.json index fed64f3a97e..f58ca9f3ef7 100644 --- a/token-swap/js/package.json +++ b/token-swap/js/package.json @@ -63,6 +63,6 @@ "mocha": "^10.8.2", "start-server-and-test": "^2.0.8", "ts-node": "^10.9.2", - "typescript": "^5.6.3" + "typescript": "^5.7.2" } } diff --git a/token/js/package.json b/token/js/package.json index dd7af5ef748..f14e7903f94 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -81,6 +81,6 @@ "start-server-and-test": "^2.0.8", "ts-node": "^10.9.2", "typedoc": "^0.26.11", - "typescript": "^5.6.3" + "typescript": "^5.7.2" } } From 3f3fd6e026e1c4c02f45fce95f6851b6afc82b4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:04:39 +0100 Subject: [PATCH 21/52] build(deps-dev): bump eslint-config-turbo from 2.3.1 to 2.3.2 (#7530) Bumps [eslint-config-turbo](https://github.com/vercel/turborepo/tree/HEAD/packages/eslint-config-turbo) from 2.3.1 to 2.3.2. - [Release notes](https://github.com/vercel/turborepo/releases) - [Changelog](https://github.com/vercel/turborepo/blob/main/release.md) - [Commits](https://github.com/vercel/turborepo/commits/v2.3.2/packages/eslint-config-turbo) --- updated-dependencies: - dependency-name: eslint-config-turbo dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- account-compression/sdk/package.json | 2 +- package.json | 2 +- pnpm-lock.yaml | 28 ++++++++++++++-------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index 5d744ffaeb3..673c4da67da 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -72,7 +72,7 @@ "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", - "eslint-config-turbo": "^2.3.1", + "eslint-config-turbo": "^2.3.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.9.0", "eslint-plugin-mocha": "^10.5.0", diff --git a/package.json b/package.json index b46908d3f8b..30afdf9a313 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@solana/eslint-config-solana": "^4.0.0", "@solana/prettier-config-solana": "^0.0.5", "eslint-config-prettier": "^9.1.0", - "eslint-config-turbo": "^2.3.1", + "eslint-config-turbo": "^2.3.2", "eslint-plugin-prettier": "^5.2.1", "prettier": "^3.3.3", "turbo": "^2.3.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e776e7d495b..756f93445a9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: ^9.1.0 version: 9.1.0(eslint@9.13.0) eslint-config-turbo: - specifier: ^2.3.1 - version: 2.3.1(eslint@9.13.0) + specifier: ^2.3.2 + version: 2.3.2(eslint@9.13.0) eslint-plugin-prettier: specifier: ^5.2.1 version: 5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.3.3) @@ -85,8 +85,8 @@ importers: specifier: ^8.57.0 version: 8.57.0 eslint-config-turbo: - specifier: ^2.3.1 - version: 2.3.1(eslint@8.57.0) + specifier: ^2.3.2 + version: 2.3.2(eslint@8.57.0) eslint-plugin-import: specifier: ^2.31.0 version: 2.31.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0) @@ -4939,22 +4939,22 @@ packages: eslint: 9.13.0 dev: true - /eslint-config-turbo@2.3.1(eslint@8.57.0): - resolution: {integrity: sha512-pxxCLLgnZYCjJoGrzUu3jAcb67bKVykLblyMtgTzHN7DlNu6tnp89K3/5fznc6ALyXwXFp0K+nM+Sxst43oaoA==} + /eslint-config-turbo@2.3.2(eslint@8.57.0): + resolution: {integrity: sha512-gIH/BQdbfWNa9uw/Obo7PZa/NNilZNP8STD0ppVKd8ekSVFONm2GebvOxNiSr5zHregRzokfynnHjZfB5ngJig==} peerDependencies: eslint: '>6.6.0' dependencies: eslint: 8.57.0 - eslint-plugin-turbo: 2.3.1(eslint@8.57.0) + eslint-plugin-turbo: 2.3.2(eslint@8.57.0) dev: true - /eslint-config-turbo@2.3.1(eslint@9.13.0): - resolution: {integrity: sha512-pxxCLLgnZYCjJoGrzUu3jAcb67bKVykLblyMtgTzHN7DlNu6tnp89K3/5fznc6ALyXwXFp0K+nM+Sxst43oaoA==} + /eslint-config-turbo@2.3.2(eslint@9.13.0): + resolution: {integrity: sha512-gIH/BQdbfWNa9uw/Obo7PZa/NNilZNP8STD0ppVKd8ekSVFONm2GebvOxNiSr5zHregRzokfynnHjZfB5ngJig==} peerDependencies: eslint: '>6.6.0' dependencies: eslint: 9.13.0 - eslint-plugin-turbo: 2.3.1(eslint@9.13.0) + eslint-plugin-turbo: 2.3.2(eslint@9.13.0) dev: true /eslint-import-resolver-node@0.3.9: @@ -5261,8 +5261,8 @@ packages: requireindex: 1.2.0 dev: true - /eslint-plugin-turbo@2.3.1(eslint@8.57.0): - resolution: {integrity: sha512-M5MBYBkcQsv11MFHJ+6WpzLpiTBx0OApeUMAHlO4L0eHqQxY03GrmHXjXfozqB+9HwGrW9fqihBzVRllyixJDA==} + /eslint-plugin-turbo@2.3.2(eslint@8.57.0): + resolution: {integrity: sha512-NoGxnaFi/8KotvKdbwR+VJOB3nVvIOjS193qCjHz2eBKhnO+Wr3cFgw9IZvk1rBIqg3a6VtJQmxkwNIYo2yWOw==} peerDependencies: eslint: '>6.6.0' dependencies: @@ -5270,8 +5270,8 @@ packages: eslint: 8.57.0 dev: true - /eslint-plugin-turbo@2.3.1(eslint@9.13.0): - resolution: {integrity: sha512-M5MBYBkcQsv11MFHJ+6WpzLpiTBx0OApeUMAHlO4L0eHqQxY03GrmHXjXfozqB+9HwGrW9fqihBzVRllyixJDA==} + /eslint-plugin-turbo@2.3.2(eslint@9.13.0): + resolution: {integrity: sha512-NoGxnaFi/8KotvKdbwR+VJOB3nVvIOjS193qCjHz2eBKhnO+Wr3cFgw9IZvk1rBIqg3a6VtJQmxkwNIYo2yWOw==} peerDependencies: eslint: '>6.6.0' dependencies: From c1c776169ebe1754e111f6cd6558a3c8a4eb02c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:05:02 +0100 Subject: [PATCH 22/52] build(deps-dev): bump prettier from 3.3.3 to 3.4.0 (#7532) Bumps [prettier](https://github.com/prettier/prettier) from 3.3.3 to 3.4.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.3.3...3.4.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 30afdf9a313..9233dd7c70f 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "eslint-config-prettier": "^9.1.0", "eslint-config-turbo": "^2.3.2", "eslint-plugin-prettier": "^5.2.1", - "prettier": "^3.3.3", + "prettier": "^3.4.0", "turbo": "^2.3.1" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 756f93445a9..a2501c6d809 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 4.0.0(@eslint/js@9.13.0)(@types/eslint__js@8.42.3)(eslint-plugin-jest@28.9.0)(eslint-plugin-react-hooks@5.0.0)(eslint-plugin-simple-import-sort@12.1.1)(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.3.0)(eslint@9.13.0)(globals@15.11.0)(jest@30.0.0-alpha.6)(typescript-eslint@8.12.2)(typescript@5.7.2) '@solana/prettier-config-solana': specifier: ^0.0.5 - version: 0.0.5(prettier@3.3.3) + version: 0.0.5(prettier@3.4.0) eslint-config-prettier: specifier: ^9.1.0 version: 9.1.0(eslint@9.13.0) @@ -22,10 +22,10 @@ importers: version: 2.3.2(eslint@9.13.0) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.3.3) + version: 5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.4.0) prettier: - specifier: ^3.3.3 - version: 3.3.3 + specifier: ^3.4.0 + version: 3.4.0 turbo: specifier: ^2.3.1 version: 2.3.1 @@ -2739,12 +2739,12 @@ packages: - fastestsmallesttextencoderdecoder dev: false - /@solana/prettier-config-solana@0.0.5(prettier@3.3.3): + /@solana/prettier-config-solana@0.0.5(prettier@3.4.0): resolution: {integrity: sha512-igtLH1QaX5xzSLlqteexRIg9X1QKA03xKYQc2qY1TrMDDhxKXoRZOStQPWdita2FVJzxTGz/tdMGC1vS0biRcg==} peerDependencies: prettier: ^3.2.0 dependencies: - prettier: 3.3.3 + prettier: 3.4.0 dev: true /@solana/rpc-types@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2): @@ -5187,7 +5187,7 @@ packages: rambda: 7.5.0 dev: true - /eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.3.3): + /eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.4.0): resolution: {integrity: sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -5203,7 +5203,7 @@ packages: dependencies: eslint: 9.13.0 eslint-config-prettier: 9.1.0(eslint@9.13.0) - prettier: 3.3.3 + prettier: 3.4.0 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 dev: true @@ -8233,8 +8233,8 @@ packages: hasBin: true dev: true - /prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + /prettier@3.4.0: + resolution: {integrity: sha512-/OXNZcLyWkfo13ofOW5M7SLh+k5pnIs07owXK2teFpnfaOEcycnSy7HQxldaVX1ZP/7Q8oO1eDuQJNwbomQq5Q==} engines: {node: '>=14'} hasBin: true dev: true From d627c5838aeed3347653998f0869cd2b83c04afe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:05:10 +0100 Subject: [PATCH 23/52] build(deps-dev): bump @types/node from 22.9.3 to 22.10.0 (#7534) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.9.3 to 22.10.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- account-compression/sdk/package.json | 2 +- libraries/type-length-value/js/package.json | 2 +- memo/js/package.json | 2 +- name-service/js/package.json | 2 +- pnpm-lock.yaml | 194 +++++++++---------- single-pool/js/packages/classic/package.json | 2 +- single-pool/js/packages/modern/package.json | 2 +- stake-pool/js/package.json | 2 +- token-group/js/package.json | 2 +- token-lending/js/package.json | 2 +- token-metadata/js/package.json | 2 +- token/js/package.json | 2 +- 12 files changed, 108 insertions(+), 108 deletions(-) diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index 673c4da67da..b7eb5d320b5 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -67,7 +67,7 @@ "@solana/eslint-config-solana": "^3.0.3", "@types/bn.js": "^5.1.6", "@types/jest": "^29.5.14", - "@types/node": "^22.9.3", + "@types/node": "^22.10.0", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/libraries/type-length-value/js/package.json b/libraries/type-length-value/js/package.json index 8ab9a66c1e6..00233fe7da5 100644 --- a/libraries/type-length-value/js/package.json +++ b/libraries/type-length-value/js/package.json @@ -49,7 +49,7 @@ "devDependencies": { "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.9.3", + "@types/node": "^22.10.0", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "chai": "^5.1.2", diff --git a/memo/js/package.json b/memo/js/package.json index 7988cb5203f..b11e51a4d10 100644 --- a/memo/js/package.json +++ b/memo/js/package.json @@ -54,7 +54,7 @@ "@solana/web3.js": "^1.95.5", "@types/chai": "^5.0.1", "@types/jest": "^29.5.14", - "@types/node": "^22.9.3", + "@types/node": "^22.10.0", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/name-service/js/package.json b/name-service/js/package.json index 8cadc9b0c41..15f9b189e80 100644 --- a/name-service/js/package.json +++ b/name-service/js/package.json @@ -45,7 +45,7 @@ "@jest/globals": "^29.7.0", "@types/bn.js": "^5.1.6", "@types/jest": "^29.5.14", - "@types/node": "^22.9.3", + "@types/node": "^22.10.0", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a2501c6d809..215a8afdefe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -70,8 +70,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.9.3 - version: 22.9.3 + specifier: ^22.10.0 + version: 22.10.0 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -107,10 +107,10 @@ importers: version: 6.2.0 jest: specifier: ^29.0.1 - version: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) jest-config: specifier: ^29.0.1 - version: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) start-server-and-test: specifier: ^2.0.8 version: 2.0.8 @@ -122,7 +122,7 @@ importers: version: 2.0.1 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) typedoc: specifier: ^0.26.10 version: 0.26.11(typescript@5.7.2) @@ -146,8 +146,8 @@ importers: specifier: ^10.0.10 version: 10.0.10 '@types/node': - specifier: ^22.9.3 - version: 22.9.3 + specifier: ^22.10.0 + version: 22.10.0 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) @@ -174,7 +174,7 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) typedoc: specifier: ^0.26.11 version: 0.26.11(typescript@5.7.2) @@ -198,8 +198,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.9.3 - version: 22.9.3 + specifier: ^22.10.0 + version: 22.10.0 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -223,7 +223,7 @@ importers: version: 6.2.0 jest: specifier: ^29.0.0 - version: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) process: specifier: ^0.11.10 version: 0.11.10 @@ -238,7 +238,7 @@ importers: version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.7.2) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) typedoc: specifier: ^0.26.11 version: 0.26.11(typescript@5.7.2) @@ -268,8 +268,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.9.3 - version: 22.9.3 + specifier: ^22.10.0 + version: 22.10.0 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) @@ -290,7 +290,7 @@ importers: version: 2.31.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0) jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) start-server-and-test: specifier: ^2.0.8 version: 2.0.8 @@ -299,7 +299,7 @@ importers: version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.7.2) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) typedoc: specifier: ^0.26.11 version: 0.26.11(typescript@5.7.2) @@ -323,8 +323,8 @@ importers: specifier: ^5.0.0 version: 5.0.0 '@types/node': - specifier: ^22.9.3 - version: 22.9.3 + specifier: ^22.10.0 + version: 22.10.0 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2) @@ -357,8 +357,8 @@ importers: version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) devDependencies: '@types/node': - specifier: ^22.9.3 - version: 22.9.3 + specifier: ^22.10.0 + version: 22.10.0 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2) @@ -421,8 +421,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.9.3 - version: 22.9.3 + specifier: ^22.10.0 + version: 22.10.0 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -440,7 +440,7 @@ importers: version: 8.57.0 jest: specifier: ^29.0.0 - version: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -476,8 +476,8 @@ importers: specifier: ^10.0.10 version: 10.0.10 '@types/node': - specifier: ^22.9.3 - version: 22.9.3 + specifier: ^22.10.0 + version: 22.10.0 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) @@ -504,7 +504,7 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) tslib: specifier: ^2.8.1 version: 2.8.1 @@ -549,8 +549,8 @@ importers: specifier: ^8.56.7 version: 8.56.7 '@types/node': - specifier: ^22.9.3 - version: 22.9.3 + specifier: ^22.10.0 + version: 22.10.0 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) @@ -568,7 +568,7 @@ importers: version: 4.27.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) tslib: specifier: ^2.8.1 version: 2.8.1 @@ -598,8 +598,8 @@ importers: specifier: ^10.0.10 version: 10.0.10 '@types/node': - specifier: ^22.9.3 - version: 22.9.3 + specifier: ^22.10.0 + version: 22.10.0 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) @@ -626,7 +626,7 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) tslib: specifier: ^2.8.1 version: 2.8.1 @@ -687,7 +687,7 @@ importers: version: 2.0.8 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -729,8 +729,8 @@ importers: specifier: ^10.0.10 version: 10.0.10 '@types/node': - specifier: ^22.9.3 - version: 22.9.3 + specifier: ^22.10.0 + version: 22.10.0 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -769,7 +769,7 @@ importers: version: 2.0.8 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) typedoc: specifier: ^0.26.11 version: 0.26.11(typescript@5.7.2) @@ -1539,7 +1539,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.3 + '@types/node': 22.10.0 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -1551,7 +1551,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.3 + '@types/node': 22.10.0 chalk: 4.1.2 jest-message-util: 30.0.0-alpha.6 jest-util: 30.0.0-alpha.6 @@ -1572,14 +1572,14 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.3 + '@types/node': 22.10.0 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -1616,14 +1616,14 @@ packages: '@jest/test-result': 30.0.0-alpha.6 '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.3 + '@types/node': 22.10.0 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 4.0.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 30.0.0-alpha.6 - jest-config: 30.0.0-alpha.6(@types/node@22.9.3) + jest-config: 30.0.0-alpha.6(@types/node@22.10.0) jest-haste-map: 30.0.0-alpha.6 jest-message-util: 30.0.0-alpha.6 jest-regex-util: 30.0.0-alpha.6 @@ -1652,7 +1652,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.3 + '@types/node': 22.10.0 jest-mock: 29.7.0 dev: true @@ -1662,7 +1662,7 @@ packages: dependencies: '@jest/fake-timers': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.3 + '@types/node': 22.10.0 jest-mock: 30.0.0-alpha.6 dev: true @@ -1706,7 +1706,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.9.3 + '@types/node': 22.10.0 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -1718,7 +1718,7 @@ packages: dependencies: '@jest/types': 30.0.0-alpha.6 '@sinonjs/fake-timers': 11.3.1 - '@types/node': 22.9.3 + '@types/node': 22.10.0 jest-message-util: 30.0.0-alpha.6 jest-mock: 30.0.0-alpha.6 jest-util: 30.0.0-alpha.6 @@ -1752,7 +1752,7 @@ packages: resolution: {integrity: sha512-eoV3sjS1M5k3YdrFWezqdndfgepwB86gwyXC0BzV2saZdJ42ySUoEDBGKuwta8A6Zh3w8tVHNFxz1BqiFraHCQ==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 jest-regex-util: 30.0.0-alpha.6 dev: true @@ -1771,7 +1771,7 @@ packages: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.20 - '@types/node': 22.9.3 + '@types/node': 22.10.0 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -1808,7 +1808,7 @@ packages: '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.9.3 + '@types/node': 22.10.0 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -1965,7 +1965,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.9.3 + '@types/node': 22.10.0 '@types/yargs': 17.0.31 chalk: 4.1.2 dev: true @@ -1978,7 +1978,7 @@ packages: '@jest/schemas': 30.0.0-alpha.6 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.9.3 + '@types/node': 22.10.0 '@types/yargs': 17.0.31 chalk: 4.1.2 dev: true @@ -2881,7 +2881,7 @@ packages: /@types/bn.js@5.1.6: resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 dev: true /@types/chai-as-promised@8.0.1: @@ -2899,7 +2899,7 @@ packages: /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 /@types/deep-eql@4.0.2: resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} @@ -2929,7 +2929,7 @@ packages: /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 dev: true /@types/hast@3.0.4: @@ -2976,17 +2976,17 @@ packages: /@types/node-fetch@2.6.12: resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 form-data: 4.0.0 dev: true /@types/node@12.20.55: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - /@types/node@22.9.3: - resolution: {integrity: sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==} + /@types/node@22.10.0: + resolution: {integrity: sha512-XC70cRZVElFHfIUB40FgZOBbgJYFKKMa5nb9lxcwYstFG/Mi+/Y0bGS+rs6Dmhmkpq4pnNiLiuZAbc02YCOnmA==} dependencies: - undici-types: 6.19.8 + undici-types: 6.20.0 /@types/resolve@1.20.2: resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} @@ -3010,12 +3010,12 @@ packages: /@types/ws@7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 /@types/ws@8.5.10: resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 /@types/yargs-parser@21.0.3: resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -4456,7 +4456,7 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /create-jest@29.7.0(@types/node@22.9.3)(ts-node@10.9.2): + /create-jest@29.7.0(@types/node@22.10.0)(ts-node@10.9.2): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -4465,7 +4465,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -5148,7 +5148,7 @@ packages: '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.7.2) eslint: 8.57.0 - jest: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) + jest: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) transitivePeerDependencies: - supports-color - typescript @@ -6633,7 +6633,7 @@ packages: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.3 + '@types/node': 22.10.0 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -6662,7 +6662,7 @@ packages: '@jest/expect': 30.0.0-alpha.6 '@jest/test-result': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.3 + '@types/node': 22.10.0 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -6683,7 +6683,7 @@ packages: - supports-color dev: true - /jest-cli@29.7.0(@types/node@22.9.3)(ts-node@10.9.2): + /jest-cli@29.7.0(@types/node@22.10.0)(ts-node@10.9.2): resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -6697,10 +6697,10 @@ packages: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) + create-jest: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -6727,7 +6727,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 import-local: 3.1.0 - jest-config: 30.0.0-alpha.6(@types/node@22.9.3) + jest-config: 30.0.0-alpha.6(@types/node@22.10.0) jest-util: 30.0.0-alpha.6 jest-validate: 30.0.0-alpha.6 yargs: 17.7.2 @@ -6739,7 +6739,7 @@ packages: - ts-node dev: true - /jest-config@29.7.0(@types/node@22.9.3)(ts-node@10.9.2): + /jest-config@29.7.0(@types/node@22.10.0)(ts-node@10.9.2): resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -6754,7 +6754,7 @@ packages: '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.3 + '@types/node': 22.10.0 babel-jest: 29.7.0(@babel/core@7.26.0) chalk: 4.1.2 ci-info: 3.9.0 @@ -6774,13 +6774,13 @@ packages: pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.2(@types/node@22.9.3)(typescript@5.7.2) + ts-node: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) transitivePeerDependencies: - babel-plugin-macros - supports-color dev: true - /jest-config@30.0.0-alpha.6(@types/node@22.9.3): + /jest-config@30.0.0-alpha.6(@types/node@22.10.0): resolution: {integrity: sha512-Tq9rH1mg9+nlIhh3efGwMSogFVKZ9z7c6P33ZlK74iJlnqqIAKYERZL2nNmNC5+5p8uxlTPSFZfBz9O8NGKotw==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} peerDependencies: @@ -6799,7 +6799,7 @@ packages: '@jest/pattern': 30.0.0-alpha.6 '@jest/test-sequencer': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.3 + '@types/node': 22.10.0 babel-jest: 30.0.0-alpha.6(@babel/core@7.26.0) chalk: 4.1.2 ci-info: 4.0.0 @@ -6888,7 +6888,7 @@ packages: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.3 + '@types/node': 22.10.0 jest-mock: 29.7.0 jest-util: 29.7.0 dev: true @@ -6900,7 +6900,7 @@ packages: '@jest/environment': 30.0.0-alpha.6 '@jest/fake-timers': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.3 + '@types/node': 22.10.0 jest-mock: 30.0.0-alpha.6 jest-util: 30.0.0-alpha.6 dev: true @@ -6921,7 +6921,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.9.3 + '@types/node': 22.10.0 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -6939,7 +6939,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.3 + '@types/node': 22.10.0 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -7023,7 +7023,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.3 + '@types/node': 22.10.0 jest-util: 29.7.0 dev: true @@ -7032,7 +7032,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.3 + '@types/node': 22.10.0 jest-util: 30.0.0-alpha.6 dev: true @@ -7129,7 +7129,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.3 + '@types/node': 22.10.0 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -7158,7 +7158,7 @@ packages: '@jest/test-result': 30.0.0-alpha.6 '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.3 + '@types/node': 22.10.0 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -7189,7 +7189,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.3 + '@types/node': 22.10.0 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -7219,7 +7219,7 @@ packages: '@jest/test-result': 30.0.0-alpha.6 '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.3 + '@types/node': 22.10.0 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -7300,7 +7300,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.3 + '@types/node': 22.10.0 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -7312,7 +7312,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.3 + '@types/node': 22.10.0 chalk: 4.1.2 ci-info: 4.0.0 graceful-fs: 4.2.11 @@ -7349,7 +7349,7 @@ packages: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.3 + '@types/node': 22.10.0 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -7363,7 +7363,7 @@ packages: dependencies: '@jest/test-result': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.9.3 + '@types/node': 22.10.0 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -7375,7 +7375,7 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -7385,14 +7385,14 @@ packages: resolution: {integrity: sha512-qlzX7zFT/QdUV/LWsJwZBlaIBaJ+E2VH3d1gArGVP+9hUHGpJkEzCSBK7yuZrkt+M/U0Jre5+maPRmkinEF4DA==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 '@ungap/structured-clone': 1.2.0 jest-util: 30.0.0-alpha.6 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest@29.7.0(@types/node@22.9.3)(ts-node@10.9.2): + /jest@29.7.0(@types/node@22.10.0)(ts-node@10.9.2): resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -7405,7 +7405,7 @@ packages: '@jest/core': 29.7.0(ts-node@10.9.2) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) + jest-cli: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -9074,7 +9074,7 @@ packages: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.9.3)(ts-node@10.9.2) + jest: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -9084,7 +9084,7 @@ packages: yargs-parser: 21.1.1 dev: true - /ts-node@10.9.2(@types/node@22.9.3)(typescript@5.7.2): + /ts-node@10.9.2(@types/node@22.10.0)(typescript@5.7.2): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: @@ -9103,7 +9103,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.9.3 + '@types/node': 22.10.0 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 @@ -9338,8 +9338,8 @@ packages: which-boxed-primitive: 1.0.2 dev: true - /undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + /undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} /unicorn-magic@0.1.0: resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} diff --git a/single-pool/js/packages/classic/package.json b/single-pool/js/packages/classic/package.json index a8540698952..bbaac9ed9a2 100644 --- a/single-pool/js/packages/classic/package.json +++ b/single-pool/js/packages/classic/package.json @@ -18,7 +18,7 @@ "test": "sed -i '1s/.*/{ \"type\": \"module\",/' package.json && NODE_OPTIONS='--loader=tsx' ava ; ret=$?; sed -i '1s/.*/{/' package.json && exit $ret" }, "devDependencies": { - "@types/node": "^22.9.3", + "@types/node": "^22.10.0", "@ava/typescript": "^5.0.0", "@typescript-eslint/eslint-plugin": "^8.4.0", "ava": "^6.2.0", diff --git a/single-pool/js/packages/modern/package.json b/single-pool/js/packages/modern/package.json index 5ee49a77a38..5454db5fb50 100644 --- a/single-pool/js/packages/modern/package.json +++ b/single-pool/js/packages/modern/package.json @@ -16,7 +16,7 @@ "lint:fix": "eslint . --fix" }, "devDependencies": { - "@types/node": "^22.9.3", + "@types/node": "^22.10.0", "@typescript-eslint/eslint-plugin": "^8.4.0", "eslint": "^8.57.0", "typescript": "^5.7.2" diff --git a/stake-pool/js/package.json b/stake-pool/js/package.json index 8a334c2fa8c..86f3918a969 100644 --- a/stake-pool/js/package.json +++ b/stake-pool/js/package.json @@ -61,7 +61,7 @@ "@rollup/plugin-typescript": "^12.1.1", "@types/bn.js": "^5.1.6", "@types/jest": "^29.5.14", - "@types/node": "^22.9.3", + "@types/node": "^22.10.0", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/token-group/js/package.json b/token-group/js/package.json index c23cb0477e4..38962b23565 100644 --- a/token-group/js/package.json +++ b/token-group/js/package.json @@ -53,7 +53,7 @@ "@solana/web3.js": "^1.95.5", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.9.3", + "@types/node": "^22.10.0", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "chai": "^5.1.2", diff --git a/token-lending/js/package.json b/token-lending/js/package.json index b74a1dc7290..32225cad958 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -47,7 +47,7 @@ "@solana/spl-token": "0.4.9", "@solana/web3.js": "^1.95.5", "@types/eslint": "^8.56.7", - "@types/node": "^22.9.3", + "@types/node": "^22.10.0", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", diff --git a/token-metadata/js/package.json b/token-metadata/js/package.json index 13c7498fbf2..334de7f102b 100644 --- a/token-metadata/js/package.json +++ b/token-metadata/js/package.json @@ -53,7 +53,7 @@ "@solana/web3.js": "^1.95.5", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.9.3", + "@types/node": "^22.10.0", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "chai": "^5.1.2", diff --git a/token/js/package.json b/token/js/package.json index f14e7903f94..668716d2662 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -66,7 +66,7 @@ "@types/chai-as-promised": "^8.0.1", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.9.3", + "@types/node": "^22.10.0", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", From d2f5144c1650179376cb0e2fad6aa656ffd5749a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:29:56 +0100 Subject: [PATCH 24/52] build(deps-dev): bump turbo from 2.3.1 to 2.3.2 (#7533) Bumps [turbo](https://github.com/vercel/turborepo) from 2.3.1 to 2.3.2. - [Release notes](https://github.com/vercel/turborepo/releases) - [Changelog](https://github.com/vercel/turborepo/blob/main/release.md) - [Commits](https://github.com/vercel/turborepo/compare/v2.3.1...v2.3.2) --- updated-dependencies: - dependency-name: turbo dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 44 ++++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 9233dd7c70f..c1fb4d20be9 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "eslint-config-turbo": "^2.3.2", "eslint-plugin-prettier": "^5.2.1", "prettier": "^3.4.0", - "turbo": "^2.3.1" + "turbo": "^2.3.2" }, "engines": { "node": ">=14.0.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 215a8afdefe..7d8c20f4efb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: ^3.4.0 version: 3.4.0 turbo: - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.3.2 + version: 2.3.2 account-compression/sdk: dependencies: @@ -9152,64 +9152,64 @@ packages: fsevents: 2.3.3 dev: true - /turbo-darwin-64@2.3.1: - resolution: {integrity: sha512-tjHfjW/Gs8Q9IO+9gPdIsSStZ8I09QYDRT/SyhFTPLnc7O2ZlxHPBVFfjUkHUjanHNYO8CpRGt+zdp1PaMCruw==} + /turbo-darwin-64@2.3.2: + resolution: {integrity: sha512-B1lS/UqjXNsG+kx1uzJNwXMuw2i5wavcyNy8opvSLjfuECdsqQU9B1wPqkSTU+mZjFTJcEfiGKyJ/I2EVk8vdw==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@2.3.1: - resolution: {integrity: sha512-At1WStnxCfrBQ4M2g6ynre8WsusGwA11okhVolBxyFUemYozDTtbZwelr+IqNggjT251vviokxOkcFzzogbiFw==} + /turbo-darwin-arm64@2.3.2: + resolution: {integrity: sha512-XHeuEdk9tHaw2Bsr3rTzFtZyldeSyagDZkOSPIJ1zioavMjWEFPA75vdgy4j8ns96EBpZMaPXVEnODuEHfiZfQ==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@2.3.1: - resolution: {integrity: sha512-COwEev7s9fsxLM2eoRCyRLPj+BXvZjFIS+GxzdAubYhoSoZit8B8QGKczyDl6448xhuFEWKrpHhcR9aBuwB4ag==} + /turbo-linux-64@2.3.2: + resolution: {integrity: sha512-oKDsO5+flqpPx5tNLFGVUYpJ/sBc3KvaGpyNzXl2u3epzyafgblFKWMG5YsSiU1ruouPpcC6YG5SN5chA7Abfg==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@2.3.1: - resolution: {integrity: sha512-AP0uE15Rhxza2Jl+Q3gxdXRA92IIeFAYaufz6CMcZuGy9yZsBlLt9w6T47H6g7XQPzWuw8pzfjM1omcTKkkDpQ==} + /turbo-linux-arm64@2.3.2: + resolution: {integrity: sha512-luyvTl3wQ1hF+ljK7ljH4TL7rg4pmx5pQ2mzvfMvPo5eaLuKr/tImmbdH6/vr56iffUIISkIsLVhVxgZeAsUOw==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@2.3.1: - resolution: {integrity: sha512-HDSneq0dNZYZch74c2eygq+OiJE/JYDs7OsGM0yRYVj336383xkUnxz6W2I7qiyMCQXzp4UVUDZXvZhUYcX3BA==} + /turbo-windows-64@2.3.2: + resolution: {integrity: sha512-yw7BnTU5cE7GdUnZEW3jIAI98hh4dcWk+Jwza8X7CXpxpill2zteq7VPf+a/B3o/xm+oVXzLmP83YP91Bm0SaA==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@2.3.1: - resolution: {integrity: sha512-7/2/sJZiquwoT/jWBCfV0qKq4NarsJPmDRjMcR9dDMIwCYsGM8ljomkDRTCtkNeFcUvYw54MiRWHehWgbcRPsw==} + /turbo-windows-arm64@2.3.2: + resolution: {integrity: sha512-Hgp6V7jaIYlDcy5xpKN+XXyYCf5afT690GmXcEsMoUawd5dStvZe0QHWcGxuqho497BAlx0XGAWftm0KelNePA==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@2.3.1: - resolution: {integrity: sha512-vHZe/e6k1HZVKiMQPQ1BWFn53vjVQDFKdkjUq/pBKlRWi1gw9LQO6ntH4qZCcHY1rH6TXgsRmexXdgWl96YvVQ==} + /turbo@2.3.2: + resolution: {integrity: sha512-vCJPoy8/3KkqY3W0cX2nrwhmtBQSZhEyrVgeJ4NlEXwGxu5vNRQDyV6se5VVAQMwfBsBJswlo87B7ai7Dr1MpQ==} hasBin: true optionalDependencies: - turbo-darwin-64: 2.3.1 - turbo-darwin-arm64: 2.3.1 - turbo-linux-64: 2.3.1 - turbo-linux-arm64: 2.3.1 - turbo-windows-64: 2.3.1 - turbo-windows-arm64: 2.3.1 + turbo-darwin-64: 2.3.2 + turbo-darwin-arm64: 2.3.2 + turbo-linux-64: 2.3.2 + turbo-linux-arm64: 2.3.2 + turbo-windows-64: 2.3.2 + turbo-windows-arm64: 2.3.2 dev: true /type-check@0.4.0: From 59854eb69d3a3bdeef7fcaf04e40e66ecc3ad7b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:03:38 +0100 Subject: [PATCH 25/52] build(deps-dev): bump turbo from 2.3.2 to 2.3.3 (#7539) Bumps [turbo](https://github.com/vercel/turborepo) from 2.3.2 to 2.3.3. - [Release notes](https://github.com/vercel/turborepo/releases) - [Changelog](https://github.com/vercel/turborepo/blob/main/release.md) - [Commits](https://github.com/vercel/turborepo/compare/v2.3.2...v2.3.3) --- updated-dependencies: - dependency-name: turbo dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 44 ++++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index c1fb4d20be9..16acb0e5003 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "eslint-config-turbo": "^2.3.2", "eslint-plugin-prettier": "^5.2.1", "prettier": "^3.4.0", - "turbo": "^2.3.2" + "turbo": "^2.3.3" }, "engines": { "node": ">=14.0.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7d8c20f4efb..aba7bdf6956 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: ^3.4.0 version: 3.4.0 turbo: - specifier: ^2.3.2 - version: 2.3.2 + specifier: ^2.3.3 + version: 2.3.3 account-compression/sdk: dependencies: @@ -9152,64 +9152,64 @@ packages: fsevents: 2.3.3 dev: true - /turbo-darwin-64@2.3.2: - resolution: {integrity: sha512-B1lS/UqjXNsG+kx1uzJNwXMuw2i5wavcyNy8opvSLjfuECdsqQU9B1wPqkSTU+mZjFTJcEfiGKyJ/I2EVk8vdw==} + /turbo-darwin-64@2.3.3: + resolution: {integrity: sha512-bxX82xe6du/3rPmm4aCC5RdEilIN99VUld4HkFQuw+mvFg6darNBuQxyWSHZTtc25XgYjQrjsV05888w1grpaA==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@2.3.2: - resolution: {integrity: sha512-XHeuEdk9tHaw2Bsr3rTzFtZyldeSyagDZkOSPIJ1zioavMjWEFPA75vdgy4j8ns96EBpZMaPXVEnODuEHfiZfQ==} + /turbo-darwin-arm64@2.3.3: + resolution: {integrity: sha512-DYbQwa3NsAuWkCUYVzfOUBbSUBVQzH5HWUFy2Kgi3fGjIWVZOFk86ss+xsWu//rlEAfYwEmopigsPYSmW4X15A==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@2.3.2: - resolution: {integrity: sha512-oKDsO5+flqpPx5tNLFGVUYpJ/sBc3KvaGpyNzXl2u3epzyafgblFKWMG5YsSiU1ruouPpcC6YG5SN5chA7Abfg==} + /turbo-linux-64@2.3.3: + resolution: {integrity: sha512-eHj9OIB0dFaP6BxB88jSuaCLsOQSYWBgmhy2ErCu6D2GG6xW3b6e2UWHl/1Ho9FsTg4uVgo4DB9wGsKa5erjUA==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@2.3.2: - resolution: {integrity: sha512-luyvTl3wQ1hF+ljK7ljH4TL7rg4pmx5pQ2mzvfMvPo5eaLuKr/tImmbdH6/vr56iffUIISkIsLVhVxgZeAsUOw==} + /turbo-linux-arm64@2.3.3: + resolution: {integrity: sha512-NmDE/NjZoDj1UWBhMtOPmqFLEBKhzGS61KObfrDEbXvU3lekwHeoPvAMfcovzswzch+kN2DrtbNIlz+/rp8OCg==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@2.3.2: - resolution: {integrity: sha512-yw7BnTU5cE7GdUnZEW3jIAI98hh4dcWk+Jwza8X7CXpxpill2zteq7VPf+a/B3o/xm+oVXzLmP83YP91Bm0SaA==} + /turbo-windows-64@2.3.3: + resolution: {integrity: sha512-O2+BS4QqjK3dOERscXqv7N2GXNcqHr9hXumkMxDj/oGx9oCatIwnnwx34UmzodloSnJpgSqjl8iRWiY65SmYoQ==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@2.3.2: - resolution: {integrity: sha512-Hgp6V7jaIYlDcy5xpKN+XXyYCf5afT690GmXcEsMoUawd5dStvZe0QHWcGxuqho497BAlx0XGAWftm0KelNePA==} + /turbo-windows-arm64@2.3.3: + resolution: {integrity: sha512-dW4ZK1r6XLPNYLIKjC4o87HxYidtRRcBeo/hZ9Wng2XM/MqqYkAyzJXJGgRMsc0MMEN9z4+ZIfnSNBrA0b08ag==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@2.3.2: - resolution: {integrity: sha512-vCJPoy8/3KkqY3W0cX2nrwhmtBQSZhEyrVgeJ4NlEXwGxu5vNRQDyV6se5VVAQMwfBsBJswlo87B7ai7Dr1MpQ==} + /turbo@2.3.3: + resolution: {integrity: sha512-DUHWQAcC8BTiUZDRzAYGvpSpGLiaOQPfYXlCieQbwUvmml/LRGIe3raKdrOPOoiX0DYlzxs2nH6BoWJoZrj8hA==} hasBin: true optionalDependencies: - turbo-darwin-64: 2.3.2 - turbo-darwin-arm64: 2.3.2 - turbo-linux-64: 2.3.2 - turbo-linux-arm64: 2.3.2 - turbo-windows-64: 2.3.2 - turbo-windows-arm64: 2.3.2 + turbo-darwin-64: 2.3.3 + turbo-darwin-arm64: 2.3.3 + turbo-linux-64: 2.3.3 + turbo-linux-arm64: 2.3.3 + turbo-windows-64: 2.3.3 + turbo-windows-arm64: 2.3.3 dev: true /type-check@0.4.0: From 2acabdf093730045b6f2a7399da5f6afebc189a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:03:51 +0100 Subject: [PATCH 26/52] build(deps-dev): bump eslint-config-turbo from 2.3.2 to 2.3.3 (#7537) Bumps [eslint-config-turbo](https://github.com/vercel/turborepo/tree/HEAD/packages/eslint-config-turbo) from 2.3.2 to 2.3.3. - [Release notes](https://github.com/vercel/turborepo/releases) - [Changelog](https://github.com/vercel/turborepo/blob/main/release.md) - [Commits](https://github.com/vercel/turborepo/commits/v2.3.3/packages/eslint-config-turbo) --- updated-dependencies: - dependency-name: eslint-config-turbo dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- account-compression/sdk/package.json | 2 +- package.json | 2 +- pnpm-lock.yaml | 28 ++++++++++++++-------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index b7eb5d320b5..946b567d285 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -72,7 +72,7 @@ "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", - "eslint-config-turbo": "^2.3.2", + "eslint-config-turbo": "^2.3.3", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.9.0", "eslint-plugin-mocha": "^10.5.0", diff --git a/package.json b/package.json index 16acb0e5003..9b01594801f 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@solana/eslint-config-solana": "^4.0.0", "@solana/prettier-config-solana": "^0.0.5", "eslint-config-prettier": "^9.1.0", - "eslint-config-turbo": "^2.3.2", + "eslint-config-turbo": "^2.3.3", "eslint-plugin-prettier": "^5.2.1", "prettier": "^3.4.0", "turbo": "^2.3.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aba7bdf6956..6d2a4db488e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: ^9.1.0 version: 9.1.0(eslint@9.13.0) eslint-config-turbo: - specifier: ^2.3.2 - version: 2.3.2(eslint@9.13.0) + specifier: ^2.3.3 + version: 2.3.3(eslint@9.13.0) eslint-plugin-prettier: specifier: ^5.2.1 version: 5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.4.0) @@ -85,8 +85,8 @@ importers: specifier: ^8.57.0 version: 8.57.0 eslint-config-turbo: - specifier: ^2.3.2 - version: 2.3.2(eslint@8.57.0) + specifier: ^2.3.3 + version: 2.3.3(eslint@8.57.0) eslint-plugin-import: specifier: ^2.31.0 version: 2.31.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0) @@ -4939,22 +4939,22 @@ packages: eslint: 9.13.0 dev: true - /eslint-config-turbo@2.3.2(eslint@8.57.0): - resolution: {integrity: sha512-gIH/BQdbfWNa9uw/Obo7PZa/NNilZNP8STD0ppVKd8ekSVFONm2GebvOxNiSr5zHregRzokfynnHjZfB5ngJig==} + /eslint-config-turbo@2.3.3(eslint@8.57.0): + resolution: {integrity: sha512-cM9wSBYowQIrjx2MPCzFE6jTnG4vpTPJKZ/O+Ps3CqrmGK/wtNOsY6WHGMwLtKY/nNbgRahAJH6jGVF6k2coOg==} peerDependencies: eslint: '>6.6.0' dependencies: eslint: 8.57.0 - eslint-plugin-turbo: 2.3.2(eslint@8.57.0) + eslint-plugin-turbo: 2.3.3(eslint@8.57.0) dev: true - /eslint-config-turbo@2.3.2(eslint@9.13.0): - resolution: {integrity: sha512-gIH/BQdbfWNa9uw/Obo7PZa/NNilZNP8STD0ppVKd8ekSVFONm2GebvOxNiSr5zHregRzokfynnHjZfB5ngJig==} + /eslint-config-turbo@2.3.3(eslint@9.13.0): + resolution: {integrity: sha512-cM9wSBYowQIrjx2MPCzFE6jTnG4vpTPJKZ/O+Ps3CqrmGK/wtNOsY6WHGMwLtKY/nNbgRahAJH6jGVF6k2coOg==} peerDependencies: eslint: '>6.6.0' dependencies: eslint: 9.13.0 - eslint-plugin-turbo: 2.3.2(eslint@9.13.0) + eslint-plugin-turbo: 2.3.3(eslint@9.13.0) dev: true /eslint-import-resolver-node@0.3.9: @@ -5261,8 +5261,8 @@ packages: requireindex: 1.2.0 dev: true - /eslint-plugin-turbo@2.3.2(eslint@8.57.0): - resolution: {integrity: sha512-NoGxnaFi/8KotvKdbwR+VJOB3nVvIOjS193qCjHz2eBKhnO+Wr3cFgw9IZvk1rBIqg3a6VtJQmxkwNIYo2yWOw==} + /eslint-plugin-turbo@2.3.3(eslint@8.57.0): + resolution: {integrity: sha512-j8UEA0Z+NNCsjZep9G5u5soDQHcXq/x4amrwulk6eHF1U91H2qAjp5I4jQcvJewmccCJbVp734PkHHTRnosjpg==} peerDependencies: eslint: '>6.6.0' dependencies: @@ -5270,8 +5270,8 @@ packages: eslint: 8.57.0 dev: true - /eslint-plugin-turbo@2.3.2(eslint@9.13.0): - resolution: {integrity: sha512-NoGxnaFi/8KotvKdbwR+VJOB3nVvIOjS193qCjHz2eBKhnO+Wr3cFgw9IZvk1rBIqg3a6VtJQmxkwNIYo2yWOw==} + /eslint-plugin-turbo@2.3.3(eslint@9.13.0): + resolution: {integrity: sha512-j8UEA0Z+NNCsjZep9G5u5soDQHcXq/x4amrwulk6eHF1U91H2qAjp5I4jQcvJewmccCJbVp734PkHHTRnosjpg==} peerDependencies: eslint: '>6.6.0' dependencies: From 3a96f5f5d37e2a059f7dc22c42c69a5049bd9c94 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:04:00 +0100 Subject: [PATCH 27/52] build(deps-dev): bump typedoc from 0.26.11 to 0.27.0 (#7536) Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.26.11 to 0.27.0. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.26.11...v0.27.0) --- updated-dependencies: - dependency-name: typedoc dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- account-compression/sdk/package.json | 2 +- libraries/type-length-value/js/package.json | 2 +- memo/js/package.json | 2 +- name-service/js/package.json | 2 +- pnpm-lock.yaml | 79 +++++++++++---------- token-group/js/package.json | 2 +- token-lending/js/package.json | 2 +- token-metadata/js/package.json | 2 +- token/js/package.json | 2 +- 9 files changed, 51 insertions(+), 44 deletions(-) diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index 946b567d285..ea528403214 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -85,7 +85,7 @@ "ts-jest": "^29.2.5", "ts-jest-resolver": "^2.0.1", "ts-node": "^10.9.2", - "typedoc": "^0.26.10", + "typedoc": "^0.27.0", "typescript": "5.7.2" } } diff --git a/libraries/type-length-value/js/package.json b/libraries/type-length-value/js/package.json index 00233fe7da5..e12fabbd65e 100644 --- a/libraries/type-length-value/js/package.json +++ b/libraries/type-length-value/js/package.json @@ -59,7 +59,7 @@ "mocha": "^10.8.2", "shx": "^0.3.4", "ts-node": "^10.9.2", - "typedoc": "^0.26.11", + "typedoc": "^0.27.0", "typescript": "^5.7.2" } } diff --git a/memo/js/package.json b/memo/js/package.json index b11e51a4d10..138c45b5369 100644 --- a/memo/js/package.json +++ b/memo/js/package.json @@ -68,7 +68,7 @@ "start-server-and-test": "^2.0.8", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "typedoc": "^0.26.11", + "typedoc": "^0.27.0", "typescript": "^5.7.2" } } diff --git a/name-service/js/package.json b/name-service/js/package.json index 15f9b189e80..5e64f79cefc 100644 --- a/name-service/js/package.json +++ b/name-service/js/package.json @@ -56,7 +56,7 @@ "start-server-and-test": "^2.0.8", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "typedoc": "^0.26.11", + "typedoc": "^0.27.0", "typescript": "^5.7.2" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6d2a4db488e..4aafaa0a3c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -124,8 +124,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) typedoc: - specifier: ^0.26.10 - version: 0.26.11(typescript@5.7.2) + specifier: ^0.27.0 + version: 0.27.0(typescript@5.7.2) typescript: specifier: 5.7.2 version: 5.7.2 @@ -176,8 +176,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) typedoc: - specifier: ^0.26.11 - version: 0.26.11(typescript@5.7.2) + specifier: ^0.27.0 + version: 0.27.0(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -240,8 +240,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) typedoc: - specifier: ^0.26.11 - version: 0.26.11(typescript@5.7.2) + specifier: ^0.27.0 + version: 0.27.0(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -301,8 +301,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) typedoc: - specifier: ^0.26.11 - version: 0.26.11(typescript@5.7.2) + specifier: ^0.27.0 + version: 0.27.0(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -509,8 +509,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.26.11 - version: 0.26.11(typescript@5.7.2) + specifier: ^0.27.0 + version: 0.27.0(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -573,8 +573,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.26.11 - version: 0.26.11(typescript@5.7.2) + specifier: ^0.27.0 + version: 0.27.0(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -631,8 +631,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.26.11 - version: 0.26.11(typescript@5.7.2) + specifier: ^0.27.0 + version: 0.27.0(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -771,8 +771,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) typedoc: - specifier: ^0.26.11 - version: 0.26.11(typescript@5.7.2) + specifier: ^0.27.0 + version: 0.27.0(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -1458,6 +1458,14 @@ packages: levn: 0.4.1 dev: true + /@gerrit0/mini-shiki@1.23.2: + resolution: {integrity: sha512-6e/41ZAilc2iE4n0bxxMSvzrt1dy2MSa9lSdd2M5lcTDlrzcau+FucIEDrG+xF1dPou/a093tm1t4HPTSI4g1w==} + dependencies: + '@shikijs/engine-oniguruma': 1.23.1 + '@shikijs/types': 1.23.1 + '@shikijs/vscode-textmate': 9.3.0 + dev: true + /@hapi/hoek@9.3.0: resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} dev: true @@ -2472,15 +2480,22 @@ packages: resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} dev: true - /@shikijs/core@1.16.2: - resolution: {integrity: sha512-XSVH5OZCvE4WLMgdoBqfPMYmGHGmCC3OgZhw0S7KcSi2XKZ+5oHGe71GFnTljgdOxvxx5WrRks6QoTLKrl1eAA==} + /@shikijs/engine-oniguruma@1.23.1: + resolution: {integrity: sha512-KQ+lgeJJ5m2ISbUZudLR1qHeH3MnSs2mjFg7bnencgs5jDVPeJ2NVDJ3N5ZHbcTsOIh0qIueyAJnwg7lg7kwXQ==} + dependencies: + '@shikijs/types': 1.23.1 + '@shikijs/vscode-textmate': 9.3.0 + dev: true + + /@shikijs/types@1.23.1: + resolution: {integrity: sha512-98A5hGyEhzzAgQh2dAeHKrWW4HfCMeoFER2z16p5eJ+vmPeF6lZ/elEne6/UCU551F/WqkopqRsr1l2Yu6+A0g==} dependencies: - '@shikijs/vscode-textmate': 9.2.0 + '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 dev: true - /@shikijs/vscode-textmate@9.2.0: - resolution: {integrity: sha512-5FinaOp6Vdh/dl4/yaOTh0ZeKch+rYS8DUb38V3GMKYVkdqzxw53lViRKUYkVILRiVQT7dcPC7VvAKOR73zVtQ==} + /@shikijs/vscode-textmate@9.3.0: + resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==} dev: true /@sideway/address@4.1.5: @@ -8590,14 +8605,6 @@ packages: rechoir: 0.6.2 dev: true - /shiki@1.16.2: - resolution: {integrity: sha512-gSym0hZf5a1U0iDPsdoOAZbvoi+e0c6c3NKAi03FoSLTm7oG20tum29+gk0wzzivOasn3loxfGUPT+jZXIUbWg==} - dependencies: - '@shikijs/core': 1.16.2 - '@shikijs/vscode-textmate': 9.2.0 - '@types/hast': 3.0.4 - dev: true - /shx@0.3.4: resolution: {integrity: sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==} engines: {node: '>=6'} @@ -9283,19 +9290,19 @@ packages: possible-typed-array-names: 1.0.0 dev: true - /typedoc@0.26.11(typescript@5.7.2): - resolution: {integrity: sha512-sFEgRRtrcDl2FxVP58Ze++ZK2UQAEvtvvH8rRlig1Ja3o7dDaMHmaBfvJmdGnNEFaLTpQsN8dpvZaTqJSu/Ugw==} + /typedoc@0.27.0(typescript@5.7.2): + resolution: {integrity: sha512-7AkTJhFdhsihthaBFHNpj5iFdLyR7FpQqXM+IABJmE1/qTjWypirCLrheToUP3fjpWHN1Drn3K7PWH1t37KvNQ==} engines: {node: '>= 18'} hasBin: true peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x + typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x dependencies: + '@gerrit0/mini-shiki': 1.23.2 lunr: 2.3.9 markdown-it: 14.1.0 minimatch: 9.0.5 - shiki: 1.16.2 typescript: 5.7.2 - yaml: 2.5.1 + yaml: 2.6.1 dev: true /typescript-collections@1.3.3: @@ -9563,8 +9570,8 @@ packages: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true - /yaml@2.5.1: - resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} + /yaml@2.6.1: + resolution: {integrity: sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==} engines: {node: '>= 14'} hasBin: true dev: true diff --git a/token-group/js/package.json b/token-group/js/package.json index 38962b23565..e3a295af519 100644 --- a/token-group/js/package.json +++ b/token-group/js/package.json @@ -64,7 +64,7 @@ "shx": "^0.3.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.26.11", + "typedoc": "^0.27.0", "typescript": "^5.7.2" } } diff --git a/token-lending/js/package.json b/token-lending/js/package.json index 32225cad958..9a6b9da99c7 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -55,7 +55,7 @@ "rollup": "^4.27.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.26.11", + "typedoc": "^0.27.0", "typescript": "^5.7.2" } } diff --git a/token-metadata/js/package.json b/token-metadata/js/package.json index 334de7f102b..0012fea439b 100644 --- a/token-metadata/js/package.json +++ b/token-metadata/js/package.json @@ -64,7 +64,7 @@ "shx": "^0.3.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.26.11", + "typedoc": "^0.27.0", "typescript": "^5.7.2" } } diff --git a/token/js/package.json b/token/js/package.json index 668716d2662..a9470d4f8f4 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -80,7 +80,7 @@ "shx": "^0.3.4", "start-server-and-test": "^2.0.8", "ts-node": "^10.9.2", - "typedoc": "^0.26.11", + "typedoc": "^0.27.0", "typescript": "^5.7.2" } } From 4b914915f45054c7fbc3be42c57031a1eaf7cb89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:16:46 +0100 Subject: [PATCH 28/52] build(deps-dev): bump prettier from 3.4.0 to 3.4.1 (#7538) Bumps [prettier](https://github.com/prettier/prettier) from 3.4.0 to 3.4.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.4.0...3.4.1) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 9b01594801f..f6bade3eca5 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "eslint-config-prettier": "^9.1.0", "eslint-config-turbo": "^2.3.3", "eslint-plugin-prettier": "^5.2.1", - "prettier": "^3.4.0", + "prettier": "^3.4.1", "turbo": "^2.3.3" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4aafaa0a3c8..c800ac130b0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 4.0.0(@eslint/js@9.13.0)(@types/eslint__js@8.42.3)(eslint-plugin-jest@28.9.0)(eslint-plugin-react-hooks@5.0.0)(eslint-plugin-simple-import-sort@12.1.1)(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.3.0)(eslint@9.13.0)(globals@15.11.0)(jest@30.0.0-alpha.6)(typescript-eslint@8.12.2)(typescript@5.7.2) '@solana/prettier-config-solana': specifier: ^0.0.5 - version: 0.0.5(prettier@3.4.0) + version: 0.0.5(prettier@3.4.1) eslint-config-prettier: specifier: ^9.1.0 version: 9.1.0(eslint@9.13.0) @@ -22,10 +22,10 @@ importers: version: 2.3.3(eslint@9.13.0) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.4.0) + version: 5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.4.1) prettier: - specifier: ^3.4.0 - version: 3.4.0 + specifier: ^3.4.1 + version: 3.4.1 turbo: specifier: ^2.3.3 version: 2.3.3 @@ -2754,12 +2754,12 @@ packages: - fastestsmallesttextencoderdecoder dev: false - /@solana/prettier-config-solana@0.0.5(prettier@3.4.0): + /@solana/prettier-config-solana@0.0.5(prettier@3.4.1): resolution: {integrity: sha512-igtLH1QaX5xzSLlqteexRIg9X1QKA03xKYQc2qY1TrMDDhxKXoRZOStQPWdita2FVJzxTGz/tdMGC1vS0biRcg==} peerDependencies: prettier: ^3.2.0 dependencies: - prettier: 3.4.0 + prettier: 3.4.1 dev: true /@solana/rpc-types@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2): @@ -5202,7 +5202,7 @@ packages: rambda: 7.5.0 dev: true - /eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.4.0): + /eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.4.1): resolution: {integrity: sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -5218,7 +5218,7 @@ packages: dependencies: eslint: 9.13.0 eslint-config-prettier: 9.1.0(eslint@9.13.0) - prettier: 3.4.0 + prettier: 3.4.1 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 dev: true @@ -8248,8 +8248,8 @@ packages: hasBin: true dev: true - /prettier@3.4.0: - resolution: {integrity: sha512-/OXNZcLyWkfo13ofOW5M7SLh+k5pnIs07owXK2teFpnfaOEcycnSy7HQxldaVX1ZP/7Q8oO1eDuQJNwbomQq5Q==} + /prettier@3.4.1: + resolution: {integrity: sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==} engines: {node: '>=14'} hasBin: true dev: true From dcfc02b7409d74d9cfc18d71f0348b060cb40b21 Mon Sep 17 00:00:00 2001 From: samkim-crypto Date: Wed, 27 Nov 2024 21:42:52 +0900 Subject: [PATCH 29/52] [token-cli] Fix panicking behavior from `sign_only` (#7527) fix panicking behavior from `sign_only` --- token/cli/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/token/cli/src/config.rs b/token/cli/src/config.rs index 0ea6284bb78..ee3a4dc903d 100644 --- a/token/cli/src/config.rs +++ b/token/cli/src/config.rs @@ -106,7 +106,7 @@ impl<'a> Config<'a> { CommitmentConfig::confirmed(), DEFAULT_CONFIRM_TX_TIMEOUT, )); - let sign_only = matches.is_present(SIGN_ONLY_ARG.name); + let sign_only = matches.try_contains_id(SIGN_ONLY_ARG.name).unwrap_or(false); let program_client: Arc> = if sign_only { let blockhash = matches .get_one::(BLOCKHASH_ARG.name) From 633f061704b56a126d2c537fa58d014a253d6d3e Mon Sep 17 00:00:00 2001 From: Ashwin Sekar Date: Thu, 28 Nov 2024 00:12:58 -0500 Subject: [PATCH 30/52] slashing: add duplicate block proof verification (#7418) * slashing: add duplicate block proof verification * pr feedback: use local record dep * pr feedback: update to v2.1 crates * pr feedback: rename errors for consistency * pr feedback: do not log pubkey * pass along workspace lints * pr feedback: use zerocopy for instruction data * add one epoch statue of limitations * pr feedback: zerocopy from proof account to proof data struct * Fix `proof_account_length` for the new size of a proof account * pr feedback: revert Cargo.lock * pr feedback: remove unecessary allow(dead_code) * pr feedback: use SLOT - 1 and constants in test code * pr feedback: return error if proof buffer is too small for shred1_length * pr feedback: remove lifetime on shred reference in get_payload * pr feedback: use rwlock in test rather than unsafe const modification * pr feedback: use epoch schedule sysvar instead of hardcoding length * Add Cargo.lock just for slashing crate --- Cargo.lock | 28 + Cargo.toml | 1 + slashing/README.md | 0 slashing/program/Cargo.toml | 48 + slashing/program/program-id.md | 1 + slashing/program/src/duplicate_block_proof.rs | 872 ++++++++++++++++++ slashing/program/src/entrypoint.rs | 14 + slashing/program/src/error.rs | 83 ++ slashing/program/src/instruction.rs | 144 +++ slashing/program/src/lib.rs | 16 + slashing/program/src/processor.rs | 166 ++++ slashing/program/src/shred.rs | 564 +++++++++++ slashing/program/src/state.rs | 82 ++ .../program/tests/duplicate_block_proof.rs | 390 ++++++++ 14 files changed, 2409 insertions(+) create mode 100644 slashing/README.md create mode 100644 slashing/program/Cargo.toml create mode 100644 slashing/program/program-id.md create mode 100644 slashing/program/src/duplicate_block_proof.rs create mode 100644 slashing/program/src/entrypoint.rs create mode 100644 slashing/program/src/error.rs create mode 100644 slashing/program/src/instruction.rs create mode 100644 slashing/program/src/lib.rs create mode 100644 slashing/program/src/processor.rs create mode 100644 slashing/program/src/shred.rs create mode 100644 slashing/program/src/state.rs create mode 100644 slashing/program/tests/duplicate_block_proof.rs diff --git a/Cargo.lock b/Cargo.lock index 75ef8f54db7..068e8d32d94 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8371,6 +8371,34 @@ dependencies = [ "tokio", ] +[[package]] +name = "spl-slashing" +version = "0.1.0" +dependencies = [ + "bincode", + "bitflags 2.6.0", + "bytemuck", + "generic-array 0.14.7", + "lazy_static", + "num-derive", + "num-traits", + "num_enum", + "rand 0.8.5", + "serde", + "serde_bytes", + "serde_derive", + "serde_with", + "solana-client", + "solana-entry", + "solana-ledger", + "solana-program", + "solana-program-test", + "solana-sdk", + "spl-pod 0.5.0", + "spl-record", + "thiserror 1.0.68", +] + [[package]] name = "spl-stake-pool" version = "2.0.1" diff --git a/Cargo.toml b/Cargo.toml index 3aa974f74d1..df80da2c754 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,6 +50,7 @@ members = [ "shared-memory/program", "single-pool/cli", "single-pool/program", + "slashing/program", "stake-pool/cli", "stake-pool/program", "stateless-asks/program", diff --git a/slashing/README.md b/slashing/README.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/slashing/program/Cargo.toml b/slashing/program/Cargo.toml new file mode 100644 index 00000000000..a8e47e5b022 --- /dev/null +++ b/slashing/program/Cargo.toml @@ -0,0 +1,48 @@ +[package] +name = "spl-slashing" +version = "0.1.0" +description = "Solana Program Library Slashing" +authors = ["Solana Labs Maintainers "] +repository = "https://github.com/solana-labs/solana-program-library" +license = "Apache-2.0" +edition = "2021" + +[features] +no-entrypoint = [] +test-sbf = [] + +[dependencies] +bitflags = { version = "2.6.0", features = ["serde"] } +bytemuck = { version = "1.19.0", features = ["derive"] } +num_enum = "0.7.3" +generic-array = { version = "0.14.7", features = ["serde"], default-features = false } +bincode = "1.3.3" +num-derive = "0.4" +num-traits = "0.2" +solana-program = "2.1.0" +serde = "1.0.210" # must match the serde_derive version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251 +serde_bytes = "0.11.15" +serde_derive = "1.0.210" # must match the serde version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251 +serde_with = { version = "3.11.0", default-features = false } + +thiserror = "1.0" +spl-pod = { version = "0.5.0", path = "../../libraries/pod" } + +[dev-dependencies] +lazy_static = "1.5.0" +solana-program-test = "2.1.0" +solana-sdk = "2.1.0" +solana-ledger = "2.1.0" +solana-entry = "2.1.0" +solana-client = "2.1.0" +spl-record = { version = "0.3.0", path = "../../record/program" } +rand = "0.8.5" + +[lib] +crate-type = ["cdylib", "lib"] + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[lints] +workspace = true diff --git a/slashing/program/program-id.md b/slashing/program/program-id.md new file mode 100644 index 00000000000..116e8d6bcc1 --- /dev/null +++ b/slashing/program/program-id.md @@ -0,0 +1 @@ +S1ashing11111111111111111111111111111111111 diff --git a/slashing/program/src/duplicate_block_proof.rs b/slashing/program/src/duplicate_block_proof.rs new file mode 100644 index 00000000000..8a093f6ee51 --- /dev/null +++ b/slashing/program/src/duplicate_block_proof.rs @@ -0,0 +1,872 @@ +//! Duplicate block proof data and verification +use { + crate::{ + error::SlashingError, + shred::{Shred, ShredType}, + state::{ProofType, SlashingProofData}, + }, + bytemuck::try_from_bytes, + solana_program::{clock::Slot, msg, pubkey::Pubkey}, + spl_pod::primitives::PodU32, +}; + +/// Proof of a duplicate block violation +pub struct DuplicateBlockProofData<'a> { + /// Shred signed by a leader + pub shred1: &'a [u8], + /// Conflicting shred signed by the same leader + pub shred2: &'a [u8], +} + +impl<'a> DuplicateBlockProofData<'a> { + const LENGTH_SIZE: usize = std::mem::size_of::(); + + /// Packs proof data to write in account for + /// `SlashingInstruction::DuplicateBlockProof` + pub fn pack(self) -> Vec { + let mut buf = vec![]; + buf.extend_from_slice(&(self.shred1.len() as u32).to_le_bytes()); + buf.extend_from_slice(self.shred1); + buf.extend_from_slice(&(self.shred2.len() as u32).to_le_bytes()); + buf.extend_from_slice(self.shred2); + buf + } + + /// Given the maximum size of a shred as `shred_size` this returns + /// the maximum size of the account needed to store a + /// `DuplicateBlockProofData` + pub const fn size_of(shred_size: usize) -> usize { + 2usize + .wrapping_mul(shred_size) + .saturating_add(2 * Self::LENGTH_SIZE) + } +} + +impl<'a> SlashingProofData<'a> for DuplicateBlockProofData<'a> { + const PROOF_TYPE: ProofType = ProofType::DuplicateBlockProof; + + fn verify_proof(self, slot: Slot, _node_pubkey: &Pubkey) -> Result<(), SlashingError> { + // TODO: verify through instruction inspection that the shreds were sigverified + // earlier in this transaction. + // Ed25519 Singature verification is performed on the merkle root: + // node_pubkey.verify_strict(merkle_root, signature). + // We will verify that the pubkey merkle root and signature match the shred and + // that the verification was successful. + let shred1 = Shred::new_from_payload(self.shred1)?; + let shred2 = Shred::new_from_payload(self.shred2)?; + check_shreds(slot, &shred1, &shred2) + } + + fn unpack(data: &'a [u8]) -> Result + where + Self: Sized, + { + if data.len() < Self::LENGTH_SIZE { + return Err(SlashingError::ProofBufferTooSmall); + } + let (length1, data) = data.split_at(Self::LENGTH_SIZE); + let shred1_length = try_from_bytes::(length1) + .map_err(|_| SlashingError::ProofBufferDeserializationError)?; + let shred1_length = u32::from(*shred1_length) as usize; + + if data.len() < shred1_length { + return Err(SlashingError::ProofBufferTooSmall); + } + let (shred1, data) = data.split_at(shred1_length); + + if data.len() < Self::LENGTH_SIZE { + return Err(SlashingError::ProofBufferTooSmall); + } + let (length2, shred2) = data.split_at(Self::LENGTH_SIZE); + let shred2_length = try_from_bytes::(length2) + .map_err(|_| SlashingError::ProofBufferDeserializationError)?; + let shred2_length = u32::from(*shred2_length) as usize; + + if shred2.len() < shred2_length { + return Err(SlashingError::ProofBufferTooSmall); + } + + Ok(Self { shred1, shred2 }) + } +} + +/// Check that `shred1` and `shred2` indicate a valid duplicate proof +/// - Must be for the same slot `slot` +/// - Must be for the same shred version +/// - Must have a merkle root conflict, otherwise `shred1` and `shred2` must +/// have the same `shred_type` +/// - If `shred1` and `shred2` share the same index they must be not have +/// equal payloads excluding the retransmitter signature +/// - If `shred1` and `shred2` do not share the same index and are data +/// shreds verify that they indicate an index conflict. One of them must +/// be the LAST_SHRED_IN_SLOT, however the other shred must have a higher +/// index. +/// - If `shred1` and `shred2` do not share the same index and are coding +/// shreds verify that they have conflicting erasure metas +fn check_shreds(slot: Slot, shred1: &Shred, shred2: &Shred) -> Result<(), SlashingError> { + if shred1.slot()? != slot { + msg!( + "Invalid proof for different slots {} vs {}", + shred1.slot()?, + slot, + ); + return Err(SlashingError::SlotMismatch); + } + + if shred2.slot()? != slot { + msg!( + "Invalid proof for different slots {} vs {}", + shred1.slot()?, + slot, + ); + return Err(SlashingError::SlotMismatch); + } + + if shred1.version()? != shred2.version()? { + msg!( + "Invalid proof for different shred versions {} vs {}", + shred1.version()?, + shred2.version()?, + ); + return Err(SlashingError::InvalidShredVersion); + } + + // Merkle root conflict check + if shred1.fec_set_index()? == shred2.fec_set_index()? + && shred1.merkle_root()? != shred2.merkle_root()? + { + // Legacy shreds are discarded by validators and already filtered out + // above during proof deserialization, so any valid proof should have + // merkle roots. + msg!( + "Valid merkle root conflict for fec set {}, {:?} vs {:?}", + shred1.fec_set_index()?, + shred1.merkle_root()?, + shred2.merkle_root()? + ); + return Ok(()); + } + + // Overlapping fec set check + if shred1.shred_type() == ShredType::Code && shred1.fec_set_index()? < shred2.fec_set_index()? { + let next_fec_set_index = shred1.next_fec_set_index()?; + if next_fec_set_index > shred2.fec_set_index()? { + msg!( + "Valid overlapping fec set conflict. fec set {}'s next set is {} \ + however we observed a shred with fec set index {}", + shred1.fec_set_index()?, + next_fec_set_index, + shred2.fec_set_index()? + ); + return Ok(()); + } + } + + if shred2.shred_type() == ShredType::Code && shred1.fec_set_index()? > shred2.fec_set_index()? { + let next_fec_set_index = shred2.next_fec_set_index()?; + if next_fec_set_index > shred1.fec_set_index()? { + msg!( + "Valid overlapping fec set conflict. fec set {}'s next set is {} \ + however we observed a shred with fec set index {}", + shred2.fec_set_index()?, + next_fec_set_index, + shred1.fec_set_index()? + ); + return Ok(()); + } + } + + if shred1.shred_type() != shred2.shred_type() { + msg!( + "Invalid proof for different shred types {:?} vs {:?}", + shred1.shred_type(), + shred2.shred_type() + ); + return Err(SlashingError::ShredTypeMismatch); + } + + if shred1.index()? == shred2.index()? { + if shred1.is_shred_duplicate(shred2) { + msg!("Valid payload mismatch for shred index {}", shred1.index()?); + return Ok(()); + } + msg!( + "Invalid proof, payload matches for index {}", + shred1.index()? + ); + return Err(SlashingError::InvalidPayloadProof); + } + + if shred1.shred_type() == ShredType::Data { + if shred1.last_in_slot()? && shred2.index()? > shred1.index()? { + msg!( + "Valid last in slot conflict last index {} but shred with index {} is present", + shred1.index()?, + shred2.index()? + ); + return Ok(()); + } + if shred2.last_in_slot()? && shred1.index()? > shred2.index()? { + msg!( + "Valid last in slot conflict last index {} but shred with index {} is present", + shred2.index()?, + shred1.index()? + ); + return Ok(()); + } + msg!( + "Invalid proof, no last in shred conflict for data shreds {} and {}", + shred1.index()?, + shred2.index()? + ); + return Err(SlashingError::InvalidLastIndexConflict); + } + + if shred1.fec_set_index() == shred2.fec_set_index() + && !shred1.check_erasure_consistency(shred2)? + { + msg!( + "Valid erasure meta conflict in fec set {}, config {:?} vs {:?}", + shred1.fec_set_index()?, + shred1.erasure_meta()?, + shred2.erasure_meta()?, + ); + return Ok(()); + } + msg!( + "Invalid proof, no erasure meta conflict for coding shreds set {} idx {} and set {} idx {}", + shred1.fec_set_index()?, + shred1.index()?, + shred2.fec_set_index()?, + shred2.index()?, + ); + Err(SlashingError::InvalidErasureMetaConflict) +} + +#[cfg(test)] +mod tests { + use { + super::*, + crate::shred::{ + tests::{new_rand_coding_shreds, new_rand_data_shred, new_rand_shreds}, + SIZE_OF_SIGNATURE, + }, + rand::Rng, + solana_ledger::shred::{Shred as SolanaShred, Shredder}, + solana_sdk::signature::{Keypair, Signature, Signer}, + std::sync::Arc, + }; + + const SLOT: Slot = 53084024; + const PARENT_SLOT: Slot = SLOT - 1; + const REFERENCE_TICK: u8 = 0; + const VERSION: u16 = 0; + + fn generate_proof_data<'a>( + shred1: &'a SolanaShred, + shred2: &'a SolanaShred, + ) -> DuplicateBlockProofData<'a> { + DuplicateBlockProofData { + shred1: shred1.payload().as_slice(), + shred2: shred2.payload().as_slice(), + } + } + + #[test] + fn test_legacy_shreds_invalid() { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let legacy_data_shred = + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, false, false); + let legacy_coding_shred = + new_rand_coding_shreds(&mut rng, next_shred_index, 5, &shredder, &leader, false)[0] + .clone(); + let data_shred = + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true, false); + let coding_shred = + new_rand_coding_shreds(&mut rng, next_shred_index, 5, &shredder, &leader, true)[0] + .clone(); + + let test_cases = [ + (legacy_data_shred.clone(), legacy_data_shred.clone()), + (legacy_coding_shred.clone(), legacy_coding_shred.clone()), + (legacy_data_shred.clone(), legacy_coding_shred.clone()), + // Mix of legacy and merkle + (legacy_data_shred.clone(), data_shred.clone()), + (legacy_coding_shred.clone(), coding_shred.clone()), + (legacy_data_shred.clone(), coding_shred.clone()), + (data_shred.clone(), legacy_coding_shred.clone()), + ]; + for (shred1, shred2) in test_cases.iter().flat_map(|(a, b)| [(a, b), (b, a)]) { + let proof_data = generate_proof_data(shred1, shred2); + assert_eq!( + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap_err(), + SlashingError::LegacyShreds, + ); + } + } + + #[test] + fn test_slot_invalid() { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder_slot = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let shredder_bad_slot = + Shredder::new(SLOT + 1, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let data_shred = new_rand_data_shred( + &mut rng, + next_shred_index, + &shredder_slot, + &leader, + true, + false, + ); + let data_shred_bad_slot = new_rand_data_shred( + &mut rng, + next_shred_index, + &shredder_bad_slot, + &leader, + true, + false, + ); + let coding_shred = + new_rand_coding_shreds(&mut rng, next_shred_index, 5, &shredder_slot, &leader, true)[0] + .clone(); + + let coding_shred_bad_slot = new_rand_coding_shreds( + &mut rng, + next_shred_index, + 5, + &shredder_bad_slot, + &leader, + true, + )[0] + .clone(); + + let test_cases = vec![ + (data_shred_bad_slot.clone(), data_shred_bad_slot.clone()), + (coding_shred_bad_slot.clone(), coding_shred_bad_slot.clone()), + (data_shred_bad_slot.clone(), coding_shred_bad_slot.clone()), + (data_shred.clone(), data_shred_bad_slot.clone()), + (coding_shred.clone(), coding_shred_bad_slot.clone()), + (data_shred.clone(), coding_shred_bad_slot.clone()), + (data_shred_bad_slot.clone(), coding_shred.clone()), + ]; + + for (shred1, shred2) in test_cases.iter().flat_map(|(a, b)| [(a, b), (b, a)]) { + let proof_data = generate_proof_data(shred1, shred2); + assert_eq!( + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap_err(), + SlashingError::SlotMismatch + ); + } + } + + #[test] + fn test_payload_proof_valid() { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let shred1 = + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true, true); + let shred2 = + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true, true); + let proof_data = generate_proof_data(&shred1, &shred2); + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap(); + } + + #[test] + fn test_payload_proof_invalid() { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let data_shred = + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true, true); + let coding_shreds = + new_rand_coding_shreds(&mut rng, next_shred_index, 10, &shredder, &leader, true); + let test_cases = vec![ + // Same data_shred + (data_shred.clone(), data_shred), + // Same coding_shred + (coding_shreds[0].clone(), coding_shreds[0].clone()), + ]; + + for (shred1, shred2) in test_cases.into_iter() { + let proof_data = generate_proof_data(&shred1, &shred2); + assert_eq!( + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap_err(), + SlashingError::InvalidPayloadProof + ); + } + } + + #[test] + fn test_merkle_root_proof_valid() { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let (data_shreds, coding_shreds) = new_rand_shreds( + &mut rng, + next_shred_index, + next_shred_index, + 10, + true, /* merkle_variant */ + &shredder, + &leader, + false, + ); + + let (diff_data_shreds, diff_coding_shreds) = new_rand_shreds( + &mut rng, + next_shred_index, + next_shred_index, + 10, + true, /* merkle_variant */ + &shredder, + &leader, + false, + ); + + let test_cases = vec![ + (data_shreds[0].clone(), diff_data_shreds[1].clone()), + (coding_shreds[0].clone(), diff_coding_shreds[1].clone()), + (data_shreds[0].clone(), diff_coding_shreds[0].clone()), + (coding_shreds[0].clone(), diff_data_shreds[0].clone()), + ]; + + for (shred1, shred2) in test_cases.iter().flat_map(|(a, b)| [(a, b), (b, a)]) { + let proof_data = generate_proof_data(shred1, shred2); + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap(); + } + } + + #[test] + fn test_merkle_root_proof_invalid() { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let (data_shreds, coding_shreds) = new_rand_shreds( + &mut rng, + next_shred_index, + next_shred_index, + 10, + true, + &shredder, + &leader, + true, + ); + + let (next_data_shreds, next_coding_shreds) = new_rand_shreds( + &mut rng, + next_shred_index + 33, + next_shred_index + 33, + 10, + true, + &shredder, + &leader, + true, + ); + + let test_cases = vec![ + // Same fec set same merkle root + (coding_shreds[0].clone(), data_shreds[0].clone()), + // Different FEC set different merkle root + (coding_shreds[0].clone(), next_data_shreds[0].clone()), + (next_coding_shreds[0].clone(), data_shreds[0].clone()), + ]; + + for (shred1, shred2) in test_cases.iter().flat_map(|(a, b)| [(a, b), (b, a)]) { + let proof_data = generate_proof_data(shred1, shred2); + assert_eq!( + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap_err(), + SlashingError::ShredTypeMismatch + ); + } + } + + #[test] + fn test_last_index_conflict_valid() { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let test_cases = vec![ + ( + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true, true), + new_rand_data_shred( + &mut rng, + // With Merkle shreds, last erasure batch is padded with + // empty data shreds. + next_shred_index + 30, + &shredder, + &leader, + true, + false, + ), + ), + ( + new_rand_data_shred( + &mut rng, + next_shred_index + 100, + &shredder, + &leader, + true, + true, + ), + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true, true), + ), + ]; + + for (shred1, shred2) in test_cases.iter().flat_map(|(a, b)| [(a, b), (b, a)]) { + let proof_data = generate_proof_data(shred1, shred2); + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap(); + } + } + + #[test] + fn test_last_index_conflict_invalid() { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let test_cases = vec![ + ( + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true, false), + new_rand_data_shred( + &mut rng, + next_shred_index + 1, + &shredder, + &leader, + true, + true, + ), + ), + ( + new_rand_data_shred( + &mut rng, + next_shred_index + 1, + &shredder, + &leader, + true, + true, + ), + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true, false), + ), + ( + new_rand_data_shred( + &mut rng, + next_shred_index + 100, + &shredder, + &leader, + true, + false, + ), + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true, false), + ), + ( + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true, false), + new_rand_data_shred( + &mut rng, + next_shred_index + 100, + &shredder, + &leader, + true, + false, + ), + ), + ]; + + for (shred1, shred2) in test_cases.iter().flat_map(|(a, b)| [(a, b), (b, a)]) { + let proof_data = generate_proof_data(shred1, shred2); + assert_eq!( + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap_err(), + SlashingError::InvalidLastIndexConflict + ); + } + } + + #[test] + fn test_erasure_meta_conflict_valid() { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let coding_shreds = + new_rand_coding_shreds(&mut rng, next_shred_index, 10, &shredder, &leader, true); + let coding_shreds_bigger = + new_rand_coding_shreds(&mut rng, next_shred_index, 13, &shredder, &leader, true); + let coding_shreds_smaller = + new_rand_coding_shreds(&mut rng, next_shred_index, 7, &shredder, &leader, true); + + // Same fec-set, different index, different erasure meta + let test_cases = vec![ + (coding_shreds[0].clone(), coding_shreds_bigger[1].clone()), + (coding_shreds[0].clone(), coding_shreds_smaller[1].clone()), + ]; + for (shred1, shred2) in test_cases.iter().flat_map(|(a, b)| [(a, b), (b, a)]) { + let proof_data = generate_proof_data(shred1, shred2); + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap(); + } + } + + #[test] + fn test_erasure_meta_conflict_invalid() { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let coding_shreds = + new_rand_coding_shreds(&mut rng, next_shred_index, 10, &shredder, &leader, true); + let coding_shreds_different_fec = new_rand_coding_shreds( + &mut rng, + next_shred_index + 100, + 10, + &shredder, + &leader, + true, + ); + let coding_shreds_different_fec_and_size = new_rand_coding_shreds( + &mut rng, + next_shred_index + 100, + 13, + &shredder, + &leader, + true, + ); + + let test_cases = vec![ + // Different index, different fec set, same erasure meta + ( + coding_shreds[0].clone(), + coding_shreds_different_fec[1].clone(), + ), + // Different index, different fec set, different erasure meta + ( + coding_shreds[0].clone(), + coding_shreds_different_fec_and_size[1].clone(), + ), + // Different index, same fec set, same erasure meta + (coding_shreds[0].clone(), coding_shreds[1].clone()), + ( + coding_shreds_different_fec[0].clone(), + coding_shreds_different_fec[1].clone(), + ), + ( + coding_shreds_different_fec_and_size[0].clone(), + coding_shreds_different_fec_and_size[1].clone(), + ), + ]; + + for (shred1, shred2) in test_cases.iter().flat_map(|(a, b)| [(a, b), (b, a)]) { + let proof_data = generate_proof_data(shred1, shred2); + assert_eq!( + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap_err(), + SlashingError::InvalidErasureMetaConflict + ); + } + } + + #[test] + fn test_shred_version_invalid() { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let (data_shreds, coding_shreds) = new_rand_shreds( + &mut rng, + next_shred_index, + next_shred_index, + 10, + true, + &shredder, + &leader, + true, + ); + + // Wrong shred VERSION + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION + 1).unwrap(); + let (wrong_data_shreds, wrong_coding_shreds) = new_rand_shreds( + &mut rng, + next_shred_index, + next_shred_index, + 10, + true, + &shredder, + &leader, + true, + ); + let test_cases = vec![ + // One correct shred VERSION, one wrong + (coding_shreds[0].clone(), wrong_coding_shreds[0].clone()), + (coding_shreds[0].clone(), wrong_data_shreds[0].clone()), + (data_shreds[0].clone(), wrong_coding_shreds[0].clone()), + (data_shreds[0].clone(), wrong_data_shreds[0].clone()), + ]; + + for (shred1, shred2) in test_cases.iter().flat_map(|(a, b)| [(a, b), (b, a)]) { + let proof_data = generate_proof_data(shred1, shred2); + assert_eq!( + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap_err(), + SlashingError::InvalidShredVersion + ); + } + } + + #[test] + fn test_retransmitter_signature_payload_proof_invalid() { + // TODO: change visbility of shred::layout::set_retransmitter_signature. + // Hardcode offsets for now; + const DATA_SHRED_OFFSET: usize = 1139; + const CODING_SHRED_OFFSET: usize = 1164; + + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let data_shred = + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true, true); + let coding_shred = + new_rand_coding_shreds(&mut rng, next_shred_index, 10, &shredder, &leader, true)[0] + .clone(); + + let mut data_shred_different_retransmitter_payload = data_shred.clone().into_payload(); + let buffer = data_shred_different_retransmitter_payload + .get_mut(DATA_SHRED_OFFSET..DATA_SHRED_OFFSET + SIZE_OF_SIGNATURE) + .unwrap(); + buffer.copy_from_slice(Signature::new_unique().as_ref()); + let data_shred_different_retransmitter = + SolanaShred::new_from_serialized_shred(data_shred_different_retransmitter_payload) + .unwrap(); + + let mut coding_shred_different_retransmitter_payload = coding_shred.clone().into_payload(); + let buffer = coding_shred_different_retransmitter_payload + .get_mut(CODING_SHRED_OFFSET..CODING_SHRED_OFFSET + SIZE_OF_SIGNATURE) + .unwrap(); + buffer.copy_from_slice(Signature::new_unique().as_ref()); + let coding_shred_different_retransmitter = + SolanaShred::new_from_serialized_shred(coding_shred_different_retransmitter_payload) + .unwrap(); + + let test_cases = vec![ + // Same data shred from different retransmitter + (data_shred, data_shred_different_retransmitter), + // Same coding shred from different retransmitter + (coding_shred, coding_shred_different_retransmitter), + ]; + for (shred1, shred2) in test_cases.iter().flat_map(|(a, b)| [(a, b), (b, a)]) { + let proof_data = generate_proof_data(shred1, shred2); + assert_eq!( + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap_err(), + SlashingError::InvalidPayloadProof + ); + } + } + + #[test] + fn test_overlapping_erasure_meta_proof_valid() { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let coding_shreds = + new_rand_coding_shreds(&mut rng, next_shred_index, 10, &shredder, &leader, true); + let (data_shred_next, coding_shred_next) = new_rand_shreds( + &mut rng, + next_shred_index + 1, + next_shred_index + 33, + 10, + true, + &shredder, + &leader, + true, + ); + + // Fec set is overlapping + let test_cases = vec![ + (coding_shreds[0].clone(), coding_shred_next[0].clone()), + (coding_shreds[0].clone(), data_shred_next[0].clone()), + ( + coding_shreds[2].clone(), + coding_shred_next.last().unwrap().clone(), + ), + ( + coding_shreds[2].clone(), + data_shred_next.last().unwrap().clone(), + ), + ]; + for (shred1, shred2) in test_cases.iter().flat_map(|(a, b)| [(a, b), (b, a)]) { + let proof_data = generate_proof_data(shred1, shred2); + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap(); + } + } + + #[test] + fn test_overlapping_erasure_meta_proof_invalid() { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let shredder = Shredder::new(SLOT, PARENT_SLOT, REFERENCE_TICK, VERSION).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let (data_shred, coding_shred) = new_rand_shreds( + &mut rng, + next_shred_index, + next_shred_index, + 10, + true, + &shredder, + &leader, + true, + ); + let next_shred_index = next_shred_index + data_shred.len() as u32; + let next_code_index = next_shred_index + coding_shred.len() as u32; + let (data_shred_next, coding_shred_next) = new_rand_shreds( + &mut rng, + next_shred_index, + next_code_index, + 10, + true, + &shredder, + &leader, + true, + ); + let test_cases = vec![ + ( + coding_shred[0].clone(), + data_shred_next[0].clone(), + SlashingError::ShredTypeMismatch, + ), + ( + coding_shred[0].clone(), + coding_shred_next[0].clone(), + SlashingError::InvalidErasureMetaConflict, + ), + ( + coding_shred[0].clone(), + data_shred_next.last().unwrap().clone(), + SlashingError::ShredTypeMismatch, + ), + ( + coding_shred[0].clone(), + coding_shred_next.last().unwrap().clone(), + SlashingError::InvalidErasureMetaConflict, + ), + ]; + + for (shred1, shred2, expected) in test_cases + .iter() + .flat_map(|(a, b, c)| [(a, b, c), (b, a, c)]) + { + let proof_data = generate_proof_data(shred1, shred2); + assert_eq!( + proof_data.verify_proof(SLOT, &leader.pubkey()).unwrap_err(), + *expected, + ); + } + } +} diff --git a/slashing/program/src/entrypoint.rs b/slashing/program/src/entrypoint.rs new file mode 100644 index 00000000000..62a02f2a465 --- /dev/null +++ b/slashing/program/src/entrypoint.rs @@ -0,0 +1,14 @@ +//! Program entrypoint + +#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))] + +use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey}; + +solana_program::entrypoint!(process_instruction); +fn process_instruction( + program_id: &Pubkey, + accounts: &[AccountInfo], + instruction_data: &[u8], +) -> ProgramResult { + crate::processor::process_instruction(program_id, accounts, instruction_data) +} diff --git a/slashing/program/src/error.rs b/slashing/program/src/error.rs new file mode 100644 index 00000000000..0c6d2b4ec3b --- /dev/null +++ b/slashing/program/src/error.rs @@ -0,0 +1,83 @@ +//! Error types + +use { + num_derive::FromPrimitive, + solana_program::{decode_error::DecodeError, program_error::ProgramError}, + thiserror::Error, +}; + +/// Errors that may be returned by the program. +#[derive(Clone, Copy, Debug, Eq, Error, FromPrimitive, PartialEq)] +pub enum SlashingError { + /// Violation is too old for statue of limitations + #[error("Exceeds statue of limitations")] + ExceedsStatueOfLimitations, + + /// Invalid shred variant + #[error("Invalid shred variant")] + InvalidShredVariant, + + /// Invalid merkle shred + #[error("Invalid Merkle shred")] + InvalidMerkleShred, + + /// Invalid duplicate block payload proof + #[error("Invalid payload proof")] + InvalidPayloadProof, + + /// Invalid duplicate block erasure meta proof + #[error("Invalid erasure meta conflict")] + InvalidErasureMetaConflict, + + /// Invalid instruction + #[error("Invalid instruction")] + InvalidInstruction, + + /// Invalid duplicate block last index proof + #[error("Invalid last index conflict")] + InvalidLastIndexConflict, + + /// Invalid shred version on duplicate block proof shreds + #[error("Invalid shred version")] + InvalidShredVersion, + + /// Invalid signature on duplicate block proof shreds + #[error("Invalid signature")] + InvalidSignature, + + /// Legacy shreds are not supported + #[error("Legacy shreds are not eligible for slashing")] + LegacyShreds, + + /// Unable to deserialize proof buffer + #[error("Proof buffer deserialization error")] + ProofBufferDeserializationError, + + /// Proof buffer is too small + #[error("Proof buffer too small")] + ProofBufferTooSmall, + + /// Shred deserialization error + #[error("Deserialization error")] + ShredDeserializationError, + + /// Invalid shred type on duplicate block proof shreds + #[error("Shred type mismatch")] + ShredTypeMismatch, + + /// Invalid slot on duplicate block proof shreds + #[error("Slot mismatch")] + SlotMismatch, +} + +impl From for ProgramError { + fn from(e: SlashingError) -> Self { + ProgramError::Custom(e as u32) + } +} + +impl DecodeError for SlashingError { + fn type_of() -> &'static str { + "Slashing Error" + } +} diff --git a/slashing/program/src/instruction.rs b/slashing/program/src/instruction.rs new file mode 100644 index 00000000000..d31eacf9a8e --- /dev/null +++ b/slashing/program/src/instruction.rs @@ -0,0 +1,144 @@ +//! Program instructions + +use { + crate::{error::SlashingError, id}, + bytemuck::{Pod, Zeroable}, + num_enum::{IntoPrimitive, TryFromPrimitive}, + solana_program::{ + clock::Slot, + instruction::{AccountMeta, Instruction}, + program_error::ProgramError, + pubkey::Pubkey, + }, + spl_pod::{ + bytemuck::{pod_from_bytes, pod_get_packed_len}, + primitives::PodU64, + }, +}; + +/// Instructions supported by the program +#[repr(u8)] +#[derive(Clone, Copy, Debug, PartialEq, TryFromPrimitive, IntoPrimitive)] +pub enum SlashingInstruction { + /// Submit a slashable violation proof for `node_pubkey`, which indicates + /// that they submitted a duplicate block to the network + /// + /// + /// Accounts expected by this instruction: + /// 0. `[]` Proof account, must be previously initialized with the proof + /// data. + /// + /// We expect the proof account to be properly sized as to hold a duplicate + /// block proof. See [ProofType] for sizing requirements. + /// + /// Deserializing the proof account from `offset` should result in a + /// [DuplicateBlockProofData] + /// + /// Data expected by this instruction: + /// DuplicateBlockProofInstructionData + DuplicateBlockProof, +} + +/// Data expected by +/// `SlashingInstruction::DuplicateBlockProof` +#[repr(C)] +#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)] +pub struct DuplicateBlockProofInstructionData { + /// Offset into the proof account to begin reading, expressed as `u64` + pub(crate) offset: PodU64, + /// Slot for which the violation occured + pub(crate) slot: PodU64, + /// Identity pubkey of the Node that signed the duplicate block + pub(crate) node_pubkey: Pubkey, +} + +/// Utility function for encoding instruction data +pub(crate) fn encode_instruction( + accounts: Vec, + instruction: SlashingInstruction, + instruction_data: &D, +) -> Instruction { + let mut data = vec![u8::from(instruction)]; + data.extend_from_slice(bytemuck::bytes_of(instruction_data)); + Instruction { + program_id: id(), + accounts, + data, + } +} + +/// Utility function for decoding just the instruction type +pub(crate) fn decode_instruction_type(input: &[u8]) -> Result { + if input.is_empty() { + Err(ProgramError::InvalidInstructionData) + } else { + SlashingInstruction::try_from(input[0]) + .map_err(|_| SlashingError::InvalidInstruction.into()) + } +} + +/// Utility function for decoding instruction data +pub(crate) fn decode_instruction_data(input_with_type: &[u8]) -> Result<&T, ProgramError> { + if input_with_type.len() != pod_get_packed_len::().saturating_add(1) { + Err(ProgramError::InvalidInstructionData) + } else { + pod_from_bytes(&input_with_type[1..]) + } +} + +/// Create a `SlashingInstruction::DuplicateBlockProof` instruction +pub fn duplicate_block_proof( + proof_account: &Pubkey, + offset: u64, + slot: Slot, + node_pubkey: Pubkey, +) -> Instruction { + encode_instruction( + vec![AccountMeta::new_readonly(*proof_account, false)], + SlashingInstruction::DuplicateBlockProof, + &DuplicateBlockProofInstructionData { + offset: PodU64::from(offset), + slot: PodU64::from(slot), + node_pubkey, + }, + ) +} + +#[cfg(test)] +mod tests { + use {super::*, solana_program::program_error::ProgramError}; + + const TEST_BYTES: [u8; 8] = [42; 8]; + + #[test] + fn serialize_duplicate_block_proof() { + let offset = 34; + let slot = 42; + let node_pubkey = Pubkey::new_unique(); + let instruction = duplicate_block_proof(&Pubkey::new_unique(), offset, slot, node_pubkey); + let mut expected = vec![0]; + expected.extend_from_slice(&offset.to_le_bytes()); + expected.extend_from_slice(&slot.to_le_bytes()); + expected.extend_from_slice(&node_pubkey.to_bytes()); + assert_eq!(instruction.data, expected); + + assert_eq!( + SlashingInstruction::DuplicateBlockProof, + decode_instruction_type(&instruction.data).unwrap() + ); + let instruction_data: &DuplicateBlockProofInstructionData = + decode_instruction_data(&instruction.data).unwrap(); + + assert_eq!(instruction_data.offset, offset.into()); + assert_eq!(instruction_data.slot, slot.into()); + assert_eq!(instruction_data.node_pubkey, node_pubkey); + } + + #[test] + fn deserialize_invalid_instruction() { + let mut expected = vec![12]; + expected.extend_from_slice(&TEST_BYTES); + let err: ProgramError = decode_instruction_type(&expected).unwrap_err(); + assert_eq!(err, SlashingError::InvalidInstruction.into()); + } +} diff --git a/slashing/program/src/lib.rs b/slashing/program/src/lib.rs new file mode 100644 index 00000000000..24b7343ab09 --- /dev/null +++ b/slashing/program/src/lib.rs @@ -0,0 +1,16 @@ +//! Slashing program +#![deny(missing_docs)] + +pub mod duplicate_block_proof; +mod entrypoint; +pub mod error; +pub mod instruction; +pub mod processor; +mod shred; +pub mod state; + +// Export current SDK types for downstream users building with a different SDK +// version +pub use solana_program; + +solana_program::declare_id!("S1ashing11111111111111111111111111111111111"); diff --git a/slashing/program/src/processor.rs b/slashing/program/src/processor.rs new file mode 100644 index 00000000000..07efa42ccd9 --- /dev/null +++ b/slashing/program/src/processor.rs @@ -0,0 +1,166 @@ +//! Program state processor + +use { + crate::{ + duplicate_block_proof::DuplicateBlockProofData, + error::SlashingError, + instruction::{ + decode_instruction_data, decode_instruction_type, DuplicateBlockProofInstructionData, + SlashingInstruction, + }, + state::SlashingProofData, + }, + solana_program::{ + account_info::{next_account_info, AccountInfo}, + clock::Slot, + entrypoint::ProgramResult, + msg, + program_error::ProgramError, + pubkey::Pubkey, + sysvar::{clock::Clock, epoch_schedule::EpochSchedule, Sysvar}, + }, +}; + +fn verify_proof_data<'a, T>(slot: Slot, pubkey: &Pubkey, proof_data: &'a [u8]) -> ProgramResult +where + T: SlashingProofData<'a>, +{ + // Statue of limitations is 1 epoch + let clock = Clock::get()?; + let Some(elapsed) = clock.slot.checked_sub(slot) else { + return Err(ProgramError::ArithmeticOverflow); + }; + let epoch_schedule = EpochSchedule::get()?; + if elapsed > epoch_schedule.slots_per_epoch { + return Err(SlashingError::ExceedsStatueOfLimitations.into()); + } + + let proof_data: T = + T::unpack(proof_data).map_err(|_| SlashingError::ShredDeserializationError)?; + + SlashingProofData::verify_proof(proof_data, slot, pubkey)?; + + // TODO: follow up PR will record this violation in context state account. just + // log for now. + msg!( + "{} violation verified in slot {}. This incident will be recorded", + T::PROOF_TYPE.violation_str(), + slot + ); + Ok(()) +} + +/// Instruction processor +pub fn process_instruction( + _program_id: &Pubkey, + accounts: &[AccountInfo], + input: &[u8], +) -> ProgramResult { + let instruction_type = decode_instruction_type(input)?; + let account_info_iter = &mut accounts.iter(); + let proof_data_info = next_account_info(account_info_iter); + + match instruction_type { + SlashingInstruction::DuplicateBlockProof => { + let data = decode_instruction_data::(input)?; + let proof_data = &proof_data_info?.data.borrow()[u64::from(data.offset) as usize..]; + verify_proof_data::( + data.slot.into(), + &data.node_pubkey, + proof_data, + )?; + Ok(()) + } + } +} + +#[cfg(test)] +mod tests { + use { + super::verify_proof_data, + crate::{ + duplicate_block_proof::DuplicateBlockProofData, error::SlashingError, + shred::tests::new_rand_data_shred, + }, + rand::Rng, + solana_ledger::shred::Shredder, + solana_sdk::{ + clock::{Clock, Slot, DEFAULT_SLOTS_PER_EPOCH}, + epoch_schedule::EpochSchedule, + program_error::ProgramError, + signature::Keypair, + signer::Signer, + }, + std::sync::{Arc, RwLock}, + }; + + const SLOT: Slot = 53084024; + lazy_static::lazy_static! { + static ref CLOCK_SLOT: Arc> = Arc::new(RwLock::new(SLOT)); + } + + fn generate_proof_data(leader: Arc) -> Vec { + let mut rng = rand::thread_rng(); + let (slot, parent_slot, reference_tick, version) = (SLOT, SLOT - 1, 0, 0); + let shredder = Shredder::new(slot, parent_slot, reference_tick, version).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let shred1 = + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true, true); + let shred2 = + new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true, true); + let proof = DuplicateBlockProofData { + shred1: shred1.payload().as_slice(), + shred2: shred2.payload().as_slice(), + }; + proof.pack() + } + + #[test] + fn test_statue_of_limitations() { + *CLOCK_SLOT.write().unwrap() = SLOT + 5; + verify_with_clock().unwrap(); + + *CLOCK_SLOT.write().unwrap() = SLOT - 1; + assert_eq!( + verify_with_clock().unwrap_err(), + ProgramError::ArithmeticOverflow + ); + + *CLOCK_SLOT.write().unwrap() = SLOT + DEFAULT_SLOTS_PER_EPOCH + 1; + assert_eq!( + verify_with_clock().unwrap_err(), + SlashingError::ExceedsStatueOfLimitations.into() + ); + } + + fn verify_with_clock() -> Result<(), ProgramError> { + struct SyscallStubs {} + impl solana_sdk::program_stubs::SyscallStubs for SyscallStubs { + fn sol_get_clock_sysvar(&self, var_addr: *mut u8) -> u64 { + unsafe { + let clock = Clock { + slot: *CLOCK_SLOT.read().unwrap(), + ..Clock::default() + }; + *(var_addr as *mut _ as *mut Clock) = clock; + } + solana_program::entrypoint::SUCCESS + } + + fn sol_get_epoch_schedule_sysvar(&self, var_addr: *mut u8) -> u64 { + unsafe { + *(var_addr as *mut _ as *mut EpochSchedule) = EpochSchedule::default(); + } + solana_program::entrypoint::SUCCESS + } + } + + solana_sdk::program_stubs::set_syscall_stubs(Box::new(SyscallStubs {})); + let leader = Arc::new(Keypair::new()); + verify_proof_data::( + SLOT, + &leader.pubkey(), + &generate_proof_data(leader), + ) + } +} diff --git a/slashing/program/src/shred.rs b/slashing/program/src/shred.rs new file mode 100644 index 00000000000..47e4308e086 --- /dev/null +++ b/slashing/program/src/shred.rs @@ -0,0 +1,564 @@ +//! Shred representation +use { + crate::error::SlashingError, + bitflags::bitflags, + bytemuck::Pod, + generic_array::{typenum::U64, GenericArray}, + num_enum::{IntoPrimitive, TryFromPrimitive}, + serde_derive::Deserialize, + solana_program::{ + clock::Slot, + hash::{hashv, Hash}, + }, + spl_pod::primitives::{PodU16, PodU32, PodU64}, +}; + +pub(crate) const SIZE_OF_SIGNATURE: usize = 64; +const SIZE_OF_SHRED_VARIANT: usize = 1; +const SIZE_OF_SLOT: usize = 8; +const SIZE_OF_INDEX: usize = 4; +const SIZE_OF_VERSION: usize = 2; +const SIZE_OF_FEC_SET_INDEX: usize = 4; +const SIZE_OF_PARENT_OFFSET: usize = 2; +const SIZE_OF_NUM_DATA_SHREDS: usize = 2; +const SIZE_OF_NUM_CODING_SHREDS: usize = 2; +const SIZE_OF_POSITION: usize = 2; + +const SIZE_OF_MERKLE_ROOT: usize = 32; +const SIZE_OF_MERKLE_PROOF_ENTRY: usize = 20; + +const OFFSET_OF_SHRED_VARIANT: usize = SIZE_OF_SIGNATURE; +const OFFSET_OF_SLOT: usize = SIZE_OF_SIGNATURE + SIZE_OF_SHRED_VARIANT; +const OFFSET_OF_INDEX: usize = OFFSET_OF_SLOT + SIZE_OF_SLOT; +const OFFSET_OF_VERSION: usize = OFFSET_OF_INDEX + SIZE_OF_INDEX; +const OFFSET_OF_FEC_SET_INDEX: usize = OFFSET_OF_VERSION + SIZE_OF_VERSION; + +const OFFSET_OF_DATA_PARENT_OFFSET: usize = OFFSET_OF_FEC_SET_INDEX + SIZE_OF_FEC_SET_INDEX; +const OFFSET_OF_DATA_SHRED_FLAGS: usize = OFFSET_OF_DATA_PARENT_OFFSET + SIZE_OF_PARENT_OFFSET; + +const OFFSET_OF_CODING_NUM_DATA_SHREDS: usize = OFFSET_OF_FEC_SET_INDEX + SIZE_OF_FEC_SET_INDEX; +const OFFSET_OF_CODING_NUM_CODING_SHREDS: usize = + OFFSET_OF_CODING_NUM_DATA_SHREDS + SIZE_OF_NUM_DATA_SHREDS; +const OFFSET_OF_CODING_POSITION: usize = + OFFSET_OF_CODING_NUM_CODING_SHREDS + SIZE_OF_NUM_CODING_SHREDS; + +type MerkleProofEntry = [u8; 20]; +const MERKLE_HASH_PREFIX_LEAF: &[u8] = b"\x00SOLANA_MERKLE_SHREDS_LEAF"; +const MERKLE_HASH_PREFIX_NODE: &[u8] = b"\x01SOLANA_MERKLE_SHREDS_NODE"; + +#[repr(transparent)] +#[derive(Clone, Copy, Default, Eq, PartialEq, Ord, PartialOrd, Hash, Deserialize)] +pub(crate) struct Signature(GenericArray); + +bitflags! { + #[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Deserialize)] + pub struct ShredFlags:u8 { + const SHRED_TICK_REFERENCE_MASK = 0b0011_1111; + const DATA_COMPLETE_SHRED = 0b0100_0000; + const LAST_SHRED_IN_SLOT = 0b1100_0000; + } +} + +#[repr(u8)] +#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq, IntoPrimitive, TryFromPrimitive)] +pub(crate) enum ShredType { + Data = 0b1010_0101, + Code = 0b0101_1010, +} + +#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] +enum ShredVariant { + LegacyCode, + LegacyData, + MerkleCode { + proof_size: u8, + chained: bool, + resigned: bool, + }, + MerkleData { + proof_size: u8, + chained: bool, + resigned: bool, + }, +} + +#[derive(Clone, Debug, Eq, Hash, PartialEq)] +pub(crate) struct ErasureMeta { + num_data_shreds: usize, + num_coding_shreds: usize, + first_coding_index: u32, +} + +#[derive(Clone, PartialEq, Eq)] +pub(crate) struct Shred<'a> { + shred_type: ShredType, + proof_size: u8, + chained: bool, + resigned: bool, + payload: &'a [u8], +} + +impl<'a> Shred<'a> { + const SIZE_OF_CODING_PAYLOAD: usize = 1228; + const SIZE_OF_DATA_PAYLOAD: usize = + Self::SIZE_OF_CODING_PAYLOAD - Self::SIZE_OF_CODING_HEADERS + SIZE_OF_SIGNATURE; + const SIZE_OF_CODING_HEADERS: usize = 89; + const SIZE_OF_DATA_HEADERS: usize = 88; + + pub(crate) fn new_from_payload(payload: &'a [u8]) -> Result { + match Self::get_shred_variant(payload)? { + ShredVariant::LegacyCode | ShredVariant::LegacyData => Err(SlashingError::LegacyShreds), + ShredVariant::MerkleCode { + proof_size, + chained, + resigned, + } => Ok(Self { + shred_type: ShredType::Code, + proof_size, + chained, + resigned, + payload, + }), + ShredVariant::MerkleData { + proof_size, + chained, + resigned, + } => Ok(Self { + shred_type: ShredType::Data, + proof_size, + chained, + resigned, + payload, + }), + } + } + + fn pod_from_bytes( + &self, + ) -> Result<&T, SlashingError> { + let end_index: usize = OFFSET + .checked_add(SIZE) + .ok_or(SlashingError::ShredDeserializationError)?; + bytemuck::try_from_bytes( + self.payload + .get(OFFSET..end_index) + .ok_or(SlashingError::ShredDeserializationError)?, + ) + .map_err(|_| SlashingError::ShredDeserializationError) + } + + fn get_shred_variant(payload: &'a [u8]) -> Result { + let Some(&shred_variant) = payload.get(OFFSET_OF_SHRED_VARIANT) else { + return Err(SlashingError::ShredDeserializationError); + }; + ShredVariant::try_from(shred_variant).map_err(|_| SlashingError::InvalidShredVariant) + } + + pub(crate) fn slot(&self) -> Result { + self.pod_from_bytes::() + .map(|x| u64::from(*x)) + } + + pub(crate) fn index(&self) -> Result { + self.pod_from_bytes::() + .map(|x| u32::from(*x)) + } + + pub(crate) fn version(&self) -> Result { + self.pod_from_bytes::() + .map(|x| u16::from(*x)) + } + + pub(crate) fn fec_set_index(&self) -> Result { + self.pod_from_bytes::() + .map(|x| u32::from(*x)) + } + + pub(crate) fn shred_type(&self) -> ShredType { + self.shred_type + } + + pub(crate) fn last_in_slot(&self) -> Result { + debug_assert!(self.shred_type == ShredType::Data); + let Some(&flags) = self.payload.get(OFFSET_OF_DATA_SHRED_FLAGS) else { + return Err(SlashingError::ShredDeserializationError); + }; + + let flags: ShredFlags = + bincode::deserialize(&[flags]).map_err(|_| SlashingError::InvalidShredVariant)?; + Ok(flags.contains(ShredFlags::LAST_SHRED_IN_SLOT)) + } + + fn num_data_shreds(&self) -> Result { + debug_assert!(self.shred_type == ShredType::Code); + self.pod_from_bytes::() + .map(|x| u16::from(*x) as usize) + } + + fn num_coding_shreds(&self) -> Result { + debug_assert!(self.shred_type == ShredType::Code); + self.pod_from_bytes::() + .map(|x| u16::from(*x) as usize) + } + + fn position(&self) -> Result { + debug_assert!(self.shred_type == ShredType::Code); + self.pod_from_bytes::() + .map(|x| u16::from(*x) as usize) + } + + pub(crate) fn next_fec_set_index(&self) -> Result { + debug_assert!(self.shred_type == ShredType::Code); + let num_data = u32::try_from(self.num_data_shreds()?) + .map_err(|_| SlashingError::ShredDeserializationError)?; + self.fec_set_index()? + .checked_add(num_data) + .ok_or(SlashingError::ShredDeserializationError) + } + + pub(crate) fn erasure_meta(&self) -> Result { + debug_assert!(self.shred_type == ShredType::Code); + let num_data_shreds = self.num_data_shreds()?; + let num_coding_shreds = self.num_coding_shreds()?; + let first_coding_index = self + .index()? + .checked_sub( + u32::try_from(self.position()?) + .map_err(|_| SlashingError::ShredDeserializationError)?, + ) + .ok_or(SlashingError::ShredDeserializationError)?; + Ok(ErasureMeta { + num_data_shreds, + num_coding_shreds, + first_coding_index, + }) + } + + fn erasure_batch_index(&self) -> Result { + match self.shred_type { + ShredType::Data => self + .index()? + .checked_sub(self.fec_set_index()?) + .and_then(|x| usize::try_from(x).ok()) + .ok_or(SlashingError::ShredDeserializationError), + ShredType::Code => self + .num_data_shreds()? + .checked_add(self.position()?) + .ok_or(SlashingError::ShredDeserializationError), + } + } + + pub(crate) fn merkle_root(&self) -> Result { + let (proof_offset, proof_size) = self.get_proof_offset_and_size()?; + let proof_end = proof_offset + .checked_add(proof_size) + .ok_or(SlashingError::ShredDeserializationError)?; + let index = self.erasure_batch_index()?; + + let proof = self + .payload + .get(proof_offset..proof_end) + .ok_or(SlashingError::InvalidMerkleShred)? + .chunks(SIZE_OF_MERKLE_PROOF_ENTRY) + .map(<&MerkleProofEntry>::try_from) + .map(Result::unwrap); + let node = self + .payload + .get(SIZE_OF_SIGNATURE..proof_offset) + .ok_or(SlashingError::InvalidMerkleShred)?; + let node = hashv(&[MERKLE_HASH_PREFIX_LEAF, node]); + + Self::get_merkle_root(index, node, proof) + } + + fn get_proof_offset_and_size(&self) -> Result<(usize, usize), SlashingError> { + let (header_size, payload_size) = match self.shred_type { + ShredType::Code => (Self::SIZE_OF_CODING_HEADERS, Self::SIZE_OF_CODING_PAYLOAD), + ShredType::Data => (Self::SIZE_OF_DATA_HEADERS, Self::SIZE_OF_DATA_PAYLOAD), + }; + let proof_size = usize::from(self.proof_size) + .checked_mul(SIZE_OF_MERKLE_PROOF_ENTRY) + .ok_or(SlashingError::ShredDeserializationError)?; + let bytes_past_end = header_size + .checked_add(if self.chained { SIZE_OF_MERKLE_ROOT } else { 0 }) + .and_then(|x| x.checked_add(proof_size)) + .and_then(|x| x.checked_add(if self.resigned { SIZE_OF_SIGNATURE } else { 0 })) + .ok_or(SlashingError::ShredDeserializationError)?; + + let capacity = payload_size + .checked_sub(bytes_past_end) + .ok_or(SlashingError::ShredDeserializationError)?; + let proof_offset = header_size + .checked_add(capacity) + .and_then(|x| x.checked_add(if self.chained { SIZE_OF_MERKLE_ROOT } else { 0 })) + .ok_or(SlashingError::ShredDeserializationError)?; + Ok((proof_offset, proof_size)) + } + + // Obtains parent's hash by joining two sibiling nodes in merkle tree. + fn join_nodes, T: AsRef<[u8]>>(node: S, other: T) -> Hash { + let node = &node.as_ref()[..SIZE_OF_MERKLE_PROOF_ENTRY]; + let other = &other.as_ref()[..SIZE_OF_MERKLE_PROOF_ENTRY]; + hashv(&[MERKLE_HASH_PREFIX_NODE, node, other]) + } + + // Recovers root of the merkle tree from a leaf node + // at the given index and the respective proof. + fn get_merkle_root<'b, I>(index: usize, node: Hash, proof: I) -> Result + where + I: IntoIterator, + { + let (index, root) = proof + .into_iter() + .fold((index, node), |(index, node), other| { + let parent = if index % 2 == 0 { + Self::join_nodes(node, other) + } else { + Self::join_nodes(other, node) + }; + (index >> 1, parent) + }); + (index == 0) + .then_some(root) + .ok_or(SlashingError::InvalidMerkleShred) + } + + /// Returns true if the other shred has the same (slot, index, + /// shred-type), but different payload. + /// Retransmitter's signature is ignored when comparing payloads. + pub(crate) fn is_shred_duplicate(&self, other: &Shred) -> bool { + if (self.slot(), self.index(), self.shred_type()) + != (other.slot(), other.index(), other.shred_type()) + { + return false; + } + fn get_payload<'a>(shred: &Shred<'a>) -> &'a [u8] { + let Ok((proof_offset, proof_size)) = shred.get_proof_offset_and_size() else { + return shred.payload; + }; + if !shred.resigned { + return shred.payload; + } + let Some(offset) = proof_offset.checked_add(proof_size) else { + return shred.payload; + }; + shred.payload.get(..offset).unwrap_or(shred.payload) + } + get_payload(self) != get_payload(other) + } + + /// Returns true if the erasure metas of the other shred matches ours. + /// Assumes that other shred has the same fec set index as ours. + pub(crate) fn check_erasure_consistency(&self, other: &Shred) -> Result { + debug_assert!(self.fec_set_index() == other.fec_set_index()); + debug_assert!(self.shred_type == ShredType::Code); + debug_assert!(other.shred_type == ShredType::Code); + Ok(self.erasure_meta()? == other.erasure_meta()?) + } +} + +impl TryFrom for ShredVariant { + type Error = SlashingError; + fn try_from(shred_variant: u8) -> Result { + if shred_variant == u8::from(ShredType::Code) { + Ok(ShredVariant::LegacyCode) + } else if shred_variant == u8::from(ShredType::Data) { + Ok(ShredVariant::LegacyData) + } else { + let proof_size = shred_variant & 0x0F; + match shred_variant & 0xF0 { + 0x40 => Ok(ShredVariant::MerkleCode { + proof_size, + chained: false, + resigned: false, + }), + 0x60 => Ok(ShredVariant::MerkleCode { + proof_size, + chained: true, + resigned: false, + }), + 0x70 => Ok(ShredVariant::MerkleCode { + proof_size, + chained: true, + resigned: true, + }), + 0x80 => Ok(ShredVariant::MerkleData { + proof_size, + chained: false, + resigned: false, + }), + 0x90 => Ok(ShredVariant::MerkleData { + proof_size, + chained: true, + resigned: false, + }), + 0xb0 => Ok(ShredVariant::MerkleData { + proof_size, + chained: true, + resigned: true, + }), + _ => Err(SlashingError::InvalidShredVariant), + } + } + } +} + +#[cfg(test)] +pub(crate) mod tests { + use { + super::Shred, + crate::shred::ShredType, + rand::Rng, + solana_entry::entry::Entry, + solana_ledger::shred::{ + ProcessShredsStats, ReedSolomonCache, Shred as SolanaShred, Shredder, + }, + solana_sdk::{hash::Hash, pubkey::Pubkey, signature::Keypair, system_transaction}, + std::sync::Arc, + }; + + pub(crate) fn new_rand_data_shred( + rng: &mut R, + next_shred_index: u32, + shredder: &Shredder, + keypair: &Keypair, + merkle_variant: bool, + is_last_in_slot: bool, + ) -> SolanaShred { + let (mut data_shreds, _) = new_rand_shreds( + rng, + next_shred_index, + next_shred_index, + 5, + merkle_variant, + shredder, + keypair, + is_last_in_slot, + ); + data_shreds.pop().unwrap() + } + + pub(crate) fn new_rand_coding_shreds( + rng: &mut R, + next_shred_index: u32, + num_entries: usize, + shredder: &Shredder, + keypair: &Keypair, + merkle_variant: bool, + ) -> Vec { + let (_, coding_shreds) = new_rand_shreds( + rng, + next_shred_index, + next_shred_index, + num_entries, + merkle_variant, + shredder, + keypair, + true, + ); + coding_shreds + } + + #[allow(clippy::too_many_arguments)] + pub(crate) fn new_rand_shreds( + rng: &mut R, + next_shred_index: u32, + next_code_index: u32, + num_entries: usize, + merkle_variant: bool, + shredder: &Shredder, + keypair: &Keypair, + is_last_in_slot: bool, + ) -> (Vec, Vec) { + let entries: Vec<_> = std::iter::repeat_with(|| { + let tx = system_transaction::transfer( + &Keypair::new(), // from + &Pubkey::new_unique(), // to + rng.gen(), // lamports + Hash::new_unique(), // recent blockhash + ); + Entry::new( + &Hash::new_unique(), // prev_hash + 1, // num_hashes, + vec![tx], // transactions + ) + }) + .take(num_entries) + .collect(); + shredder.entries_to_shreds( + keypair, + &entries, + is_last_in_slot, + // chained_merkle_root + Some(Hash::new_from_array(rng.gen())), + next_shred_index, + next_code_index, // next_code_index + merkle_variant, + &ReedSolomonCache::default(), + &mut ProcessShredsStats::default(), + ) + } + + #[test] + fn test_solana_shred_parity() { + // Verify that the deserialization functions match solana shred format + for _ in 0..300 { + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let slot = rng.gen_range(1..u64::MAX); + let parent_slot = slot - 1; + let reference_tick = 0; + let version = rng.gen_range(0..u16::MAX); + let shredder = Shredder::new(slot, parent_slot, reference_tick, version).unwrap(); + let next_shred_index = rng.gen_range(0..671); + let next_code_index = rng.gen_range(0..781); + let is_last_in_slot = rng.gen_bool(0.5); + let (data_solana_shreds, coding_solana_shreds) = new_rand_shreds( + &mut rng, + next_shred_index, + next_code_index, + 10, + true, + &shredder, + &leader, + is_last_in_slot, + ); + + for solana_shred in data_solana_shreds + .into_iter() + .chain(coding_solana_shreds.into_iter()) + { + let payload = solana_shred.payload().as_slice(); + let shred = Shred::new_from_payload(payload).unwrap(); + + assert_eq!(shred.slot().unwrap(), solana_shred.slot()); + assert_eq!(shred.index().unwrap(), solana_shred.index()); + assert_eq!(shred.version().unwrap(), solana_shred.version()); + assert_eq!( + u8::from(shred.shred_type()), + u8::from(solana_shred.shred_type()) + ); + if shred.shred_type() == ShredType::Data { + assert_eq!(shred.last_in_slot().unwrap(), solana_shred.last_in_slot()); + } else { + let erasure_meta = shred.erasure_meta().unwrap(); + assert_eq!( + erasure_meta.num_data_shreds, + shred.num_data_shreds().unwrap() + ); + assert_eq!( + erasure_meta.num_coding_shreds, + shred.num_coding_shreds().unwrap() + ); + // We cannot verify first_coding_index until visibility is + // changed in agave + } + assert_eq!( + shred.merkle_root().unwrap(), + solana_shred.merkle_root().unwrap() + ); + assert_eq!(&shred.payload, solana_shred.payload()); + } + } + } +} diff --git a/slashing/program/src/state.rs b/slashing/program/src/state.rs new file mode 100644 index 00000000000..addd3f50449 --- /dev/null +++ b/slashing/program/src/state.rs @@ -0,0 +1,82 @@ +//! Program state +use { + crate::{duplicate_block_proof::DuplicateBlockProofData, error::SlashingError}, + solana_program::{clock::Slot, pubkey::Pubkey}, +}; + +const PACKET_DATA_SIZE: usize = 1232; + +/// Types of slashing proofs +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ProofType { + /// Invalid proof type + InvalidType, + /// Proof consisting of 2 shreds signed by the leader indicating the leader + /// submitted a duplicate block. + DuplicateBlockProof, +} + +impl ProofType { + /// Size of the proof account to create in order to hold the proof data + /// header and contents + pub const fn proof_account_length(&self) -> usize { + match self { + Self::InvalidType => panic!("Cannot determine size of invalid proof type"), + Self::DuplicateBlockProof => { + // Duplicate block proof consists of 2 shreds that can be `PACKET_DATA_SIZE`. + DuplicateBlockProofData::size_of(PACKET_DATA_SIZE) + } + } + } + + /// Display string for this proof type's violation + pub fn violation_str(&self) -> &str { + match self { + Self::InvalidType => "invalid", + Self::DuplicateBlockProof => "duplicate block", + } + } +} + +impl From for u8 { + fn from(value: ProofType) -> Self { + match value { + ProofType::InvalidType => 0, + ProofType::DuplicateBlockProof => 1, + } + } +} + +impl From for ProofType { + fn from(value: u8) -> Self { + match value { + 1 => Self::DuplicateBlockProof, + _ => Self::InvalidType, + } + } +} + +/// Trait that proof accounts must satisfy in order to verify via the slashing +/// program +pub trait SlashingProofData<'a> { + /// The type of proof this data represents + const PROOF_TYPE: ProofType; + + /// Zero copy from raw data buffer + fn unpack(data: &'a [u8]) -> Result + where + Self: Sized; + + /// Verification logic for this type of proof data + fn verify_proof(self, slot: Slot, pubkey: &Pubkey) -> Result<(), SlashingError>; +} + +#[cfg(test)] +mod tests { + use crate::state::PACKET_DATA_SIZE; + + #[test] + fn test_packet_size_parity() { + assert_eq!(PACKET_DATA_SIZE, solana_sdk::packet::PACKET_DATA_SIZE); + } +} diff --git a/slashing/program/tests/duplicate_block_proof.rs b/slashing/program/tests/duplicate_block_proof.rs new file mode 100644 index 00000000000..bab00c51015 --- /dev/null +++ b/slashing/program/tests/duplicate_block_proof.rs @@ -0,0 +1,390 @@ +#![cfg(feature = "test-sbf")] + +use { + rand::Rng, + solana_entry::entry::Entry, + solana_ledger::{ + blockstore_meta::ErasureMeta, + shred::{ProcessShredsStats, ReedSolomonCache, Shred, Shredder}, + }, + solana_program::pubkey::Pubkey, + solana_program_test::*, + solana_sdk::{ + clock::{Clock, Slot}, + decode_error::DecodeError, + hash::Hash, + instruction::InstructionError, + rent::Rent, + signature::{Keypair, Signer}, + system_instruction, system_transaction, + transaction::{Transaction, TransactionError}, + }, + spl_pod::bytemuck::pod_get_packed_len, + spl_record::{instruction as record, state::RecordData}, + spl_slashing::{ + duplicate_block_proof::DuplicateBlockProofData, error::SlashingError, id, instruction, + processor::process_instruction, state::ProofType, + }, + std::sync::Arc, +}; + +const SLOT: Slot = 53084024; + +fn program_test() -> ProgramTest { + let mut program_test = ProgramTest::new("spl_slashing", id(), processor!(process_instruction)); + program_test.add_program( + "spl_record", + spl_record::id(), + processor!(spl_record::processor::process_instruction), + ); + program_test +} + +async fn setup_clock(context: &mut ProgramTestContext) { + let clock: Clock = context.banks_client.get_sysvar().await.unwrap(); + let mut new_clock = clock.clone(); + new_clock.slot = SLOT; + context.set_sysvar(&new_clock); +} + +async fn initialize_duplicate_proof_account( + context: &mut ProgramTestContext, + authority: &Keypair, + account: &Keypair, +) { + let account_length = ProofType::DuplicateBlockProof + .proof_account_length() + .saturating_add(pod_get_packed_len::()); + println!("Creating account of size {account_length}"); + let transaction = Transaction::new_signed_with_payer( + &[ + system_instruction::create_account( + &context.payer.pubkey(), + &account.pubkey(), + 1.max(Rent::default().minimum_balance(account_length)), + account_length as u64, + &spl_record::id(), + ), + record::initialize(&account.pubkey(), &authority.pubkey()), + ], + Some(&context.payer.pubkey()), + &[&context.payer, account], + context.last_blockhash, + ); + context + .banks_client + .process_transaction(transaction) + .await + .unwrap(); +} + +async fn write_proof( + context: &mut ProgramTestContext, + authority: &Keypair, + account: &Keypair, + proof: &[u8], +) { + let mut offset = 0; + let proof_len = proof.len(); + let chunk_size = 800; + println!("Writing a proof of size {proof_len}"); + while offset < proof_len { + let end = std::cmp::min(offset.checked_add(chunk_size).unwrap(), proof_len); + let transaction = Transaction::new_signed_with_payer( + &[record::write( + &account.pubkey(), + &authority.pubkey(), + offset as u64, + &proof[offset..end], + )], + Some(&context.payer.pubkey()), + &[&context.payer, authority], + context.last_blockhash, + ); + context + .banks_client + .process_transaction(transaction) + .await + .unwrap(); + + offset = offset.checked_add(chunk_size).unwrap(); + } +} + +pub fn new_rand_data_shred( + rng: &mut R, + next_shred_index: u32, + shredder: &Shredder, + keypair: &Keypair, + is_last_in_slot: bool, +) -> Shred { + let (mut data_shreds, _) = new_rand_shreds( + rng, + next_shred_index, + next_shred_index, + 5, + shredder, + keypair, + is_last_in_slot, + ); + data_shreds.pop().unwrap() +} + +pub(crate) fn new_rand_coding_shreds( + rng: &mut R, + next_shred_index: u32, + num_entries: usize, + shredder: &Shredder, + keypair: &Keypair, +) -> Vec { + let (_, coding_shreds) = new_rand_shreds( + rng, + next_shred_index, + next_shred_index, + num_entries, + shredder, + keypair, + true, + ); + coding_shreds +} + +pub(crate) fn new_rand_shreds( + rng: &mut R, + next_shred_index: u32, + next_code_index: u32, + num_entries: usize, + shredder: &Shredder, + keypair: &Keypair, + is_last_in_slot: bool, +) -> (Vec, Vec) { + let entries: Vec<_> = std::iter::repeat_with(|| { + let tx = system_transaction::transfer( + &Keypair::new(), // from + &Pubkey::new_unique(), // to + rng.gen(), // lamports + Hash::new_unique(), // recent blockhash + ); + Entry::new( + &Hash::new_unique(), // prev_hash + 1, // num_hashes, + vec![tx], // transactions + ) + }) + .take(num_entries) + .collect(); + shredder.entries_to_shreds( + keypair, + &entries, + is_last_in_slot, + // chained_merkle_root + Some(Hash::new_from_array(rng.gen())), + next_shred_index, + next_code_index, // next_code_index + true, // merkle_variant + &ReedSolomonCache::default(), + &mut ProcessShredsStats::default(), + ) +} + +#[tokio::test] +async fn valid_proof_data() { + let mut context = program_test().start_with_context().await; + setup_clock(&mut context).await; + + let authority = Keypair::new(); + let account = Keypair::new(); + + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let (slot, parent_slot, reference_tick, version) = (SLOT, 53084023, 0, 0); + let shredder = Shredder::new(slot, parent_slot, reference_tick, version).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let shred1 = new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true); + let shred2 = new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true); + + assert_ne!( + shred1.merkle_root().unwrap(), + shred2.merkle_root().unwrap(), + "Expecting merkle root conflict", + ); + + let duplicate_proof = DuplicateBlockProofData { + shred1: shred1.payload().as_slice(), + shred2: shred2.payload().as_slice(), + }; + let data = duplicate_proof.pack(); + + initialize_duplicate_proof_account(&mut context, &authority, &account).await; + write_proof(&mut context, &authority, &account, &data).await; + + let transaction = Transaction::new_signed_with_payer( + &[instruction::duplicate_block_proof( + &account.pubkey(), + RecordData::WRITABLE_START_INDEX as u64, + slot, + leader.pubkey(), + )], + Some(&context.payer.pubkey()), + &[&context.payer], + context.last_blockhash, + ); + context + .banks_client + .process_transaction(transaction) + .await + .unwrap(); +} + +#[tokio::test] +async fn valid_proof_coding() { + let mut context = program_test().start_with_context().await; + setup_clock(&mut context).await; + + let authority = Keypair::new(); + let account = Keypair::new(); + + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let (slot, parent_slot, reference_tick, version) = (SLOT, 53084023, 0, 0); + let shredder = Shredder::new(slot, parent_slot, reference_tick, version).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let shred1 = + new_rand_coding_shreds(&mut rng, next_shred_index, 10, &shredder, &leader)[0].clone(); + let shred2 = + new_rand_coding_shreds(&mut rng, next_shred_index, 10, &shredder, &leader)[1].clone(); + + assert!( + ErasureMeta::check_erasure_consistency(&shred1, &shred2), + "Expected erasure consistency failure", + ); + + let duplicate_proof = DuplicateBlockProofData { + shred1: shred1.payload().as_slice(), + shred2: shred2.payload().as_slice(), + }; + let data = duplicate_proof.pack(); + + initialize_duplicate_proof_account(&mut context, &authority, &account).await; + write_proof(&mut context, &authority, &account, &data).await; + + let transaction = Transaction::new_signed_with_payer( + &[instruction::duplicate_block_proof( + &account.pubkey(), + RecordData::WRITABLE_START_INDEX as u64, + slot, + leader.pubkey(), + )], + Some(&context.payer.pubkey()), + &[&context.payer], + context.last_blockhash, + ); + context + .banks_client + .process_transaction(transaction) + .await + .unwrap(); +} + +#[tokio::test] +async fn invalid_proof_data() { + let mut context = program_test().start_with_context().await; + setup_clock(&mut context).await; + + let authority = Keypair::new(); + let account = Keypair::new(); + + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let (slot, parent_slot, reference_tick, version) = (SLOT, 53084023, 0, 0); + let shredder = Shredder::new(slot, parent_slot, reference_tick, version).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let shred1 = new_rand_data_shred(&mut rng, next_shred_index, &shredder, &leader, true); + let shred2 = shred1.clone(); + + let duplicate_proof = DuplicateBlockProofData { + shred1: shred1.payload().as_slice(), + shred2: shred2.payload().as_slice(), + }; + let data = duplicate_proof.pack(); + + initialize_duplicate_proof_account(&mut context, &authority, &account).await; + write_proof(&mut context, &authority, &account, &data).await; + + let transaction = Transaction::new_signed_with_payer( + &[instruction::duplicate_block_proof( + &account.pubkey(), + RecordData::WRITABLE_START_INDEX as u64, + slot, + leader.pubkey(), + )], + Some(&context.payer.pubkey()), + &[&context.payer], + context.last_blockhash, + ); + let err = context + .banks_client + .process_transaction(transaction) + .await + .unwrap_err() + .unwrap(); + let TransactionError::InstructionError(0, InstructionError::Custom(code)) = err else { + panic!("Invalid error {err:?}"); + }; + let err: SlashingError = SlashingError::decode_custom_error_to_enum(code).unwrap(); + assert_eq!(err, SlashingError::InvalidPayloadProof); +} + +#[tokio::test] +async fn invalid_proof_coding() { + let mut context = program_test().start_with_context().await; + setup_clock(&mut context).await; + + let authority = Keypair::new(); + let account = Keypair::new(); + + let mut rng = rand::thread_rng(); + let leader = Arc::new(Keypair::new()); + let (slot, parent_slot, reference_tick, version) = (SLOT, 53084023, 0, 0); + let shredder = Shredder::new(slot, parent_slot, reference_tick, version).unwrap(); + let next_shred_index = rng.gen_range(0..32_000); + let coding_shreds = new_rand_coding_shreds(&mut rng, next_shred_index, 10, &shredder, &leader); + let shred1 = coding_shreds[0].clone(); + let shred2 = coding_shreds[1].clone(); + + assert!( + ErasureMeta::check_erasure_consistency(&shred1, &shred2), + "Expecting no erasure conflict" + ); + let duplicate_proof = DuplicateBlockProofData { + shred1: shred1.payload().as_slice(), + shred2: shred2.payload().as_slice(), + }; + let data = duplicate_proof.pack(); + + initialize_duplicate_proof_account(&mut context, &authority, &account).await; + write_proof(&mut context, &authority, &account, &data).await; + + let transaction = Transaction::new_signed_with_payer( + &[instruction::duplicate_block_proof( + &account.pubkey(), + RecordData::WRITABLE_START_INDEX as u64, + slot, + leader.pubkey(), + )], + Some(&context.payer.pubkey()), + &[&context.payer], + context.last_blockhash, + ); + let err = context + .banks_client + .process_transaction(transaction) + .await + .unwrap_err() + .unwrap(); + let TransactionError::InstructionError(0, InstructionError::Custom(code)) = err else { + panic!("Invalid error {err:?}"); + }; + let err: SlashingError = SlashingError::decode_custom_error_to_enum(code).unwrap(); + assert_eq!(err, SlashingError::InvalidErasureMetaConflict); +} From a0d1a7aec923f1efb93f9a95bd33565b50c10720 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:53:37 +0100 Subject: [PATCH 31/52] build(deps): bump thiserror from 1.0.68 to 2.0.3 (#7543) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.68 to 2.0.3. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.68...2.0.3) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 142 ++++++++++++++++++------------------ slashing/program/Cargo.toml | 2 +- 2 files changed, 72 insertions(+), 72 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 068e8d32d94..4ab18134531 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,7 +78,7 @@ dependencies = [ "log", "solana-sdk", "solana-transaction-status", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -418,7 +418,7 @@ dependencies = [ "nom", "num-traits", "rusticata-macros", - "thiserror 1.0.68", + "thiserror 1.0.69", "time", ] @@ -992,7 +992,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "190baaad529bcfbde9e1a19022c42781bdb6ff9de25721abdb8fd98c0807730b" dependencies = [ "libc", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -2826,7 +2826,7 @@ dependencies = [ "combine 4.6.7", "jni-sys", "log", - "thiserror 1.0.68", + "thiserror 1.0.69", "walkdir", ] @@ -3124,7 +3124,7 @@ dependencies = [ "ark-bn254", "ark-ff", "num-bigint 0.4.6", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -3687,7 +3687,7 @@ dependencies = [ "percent-encoding 2.3.1", "pin-project", "rand 0.8.5", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -4180,7 +4180,7 @@ dependencies = [ "rustc-hash 2.0.0", "rustls 0.23.18", "socket2", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -4198,7 +4198,7 @@ dependencies = [ "rustls 0.23.18", "rustls-platform-verifier", "slab", - "thiserror 1.0.68", + "thiserror 1.0.69", "tinyvec", "tracing", ] @@ -4491,7 +4491,7 @@ dependencies = [ "reqwest", "serde", "task-local-extensions", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -5252,7 +5252,7 @@ dependencies = [ "spl-token-2022 4.0.0", "spl-token-group-interface 0.3.0", "spl-token-metadata-interface 0.4.0", - "thiserror 1.0.68", + "thiserror 1.0.69", "zstd", ] @@ -5328,7 +5328,7 @@ dependencies = [ "static_assertions", "tar", "tempfile", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -5347,7 +5347,7 @@ dependencies = [ "solana-program", "solana-program-runtime", "solana-sdk", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -5371,7 +5371,7 @@ dependencies = [ "solana-program", "solana-sdk", "tarpc", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", "tokio-serde", ] @@ -5448,7 +5448,7 @@ dependencies = [ "ark-serialize", "bytemuck", "solana-program", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -5485,7 +5485,7 @@ dependencies = [ "solana-timings", "solana-type-overrides", "solana_rbpf", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -5539,7 +5539,7 @@ dependencies = [ "solana-derivation-path", "solana-remote-wallet", "solana-sdk", - "thiserror 1.0.68", + "thiserror 1.0.69", "tiny-bip39", "uriparse", "url 2.5.2", @@ -5558,7 +5558,7 @@ dependencies = [ "solana-remote-wallet", "solana-sdk", "solana-zk-token-sdk", - "thiserror 1.0.68", + "thiserror 1.0.69", "tiny-bip39", "uriparse", "url 2.5.2", @@ -5635,7 +5635,7 @@ dependencies = [ "solana-thin-client", "solana-tpu-client", "solana-udp-client", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", ] @@ -5702,7 +5702,7 @@ dependencies = [ "solana-measure", "solana-metrics", "solana-sdk", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", ] @@ -5787,7 +5787,7 @@ dependencies = [ "sys-info", "sysctl", "tempfile", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", "trees", ] @@ -5835,7 +5835,7 @@ dependencies = [ "bytemuck_derive", "curve25519-dalek 4.1.3", "solana-program", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -5917,7 +5917,7 @@ dependencies = [ "solana-sdk", "solana-version", "spl-memo 5.0.0", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", ] @@ -5979,7 +5979,7 @@ dependencies = [ "solana-runtime", "solana-sdk", "solana-transaction-status", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", ] @@ -6031,7 +6031,7 @@ dependencies = [ "solana-vote", "solana-vote-program", "static_assertions", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -6180,7 +6180,7 @@ dependencies = [ "strum_macros 0.24.3", "tar", "tempfile", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", "tokio-stream", "trees", @@ -6252,7 +6252,7 @@ dependencies = [ "log", "reqwest", "solana-sdk", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -6351,7 +6351,7 @@ dependencies = [ "solana-metrics", "solana-runtime", "solana-sdk", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -6363,7 +6363,7 @@ dependencies = [ "ark-bn254", "light-poseidon", "solana-define-syscall", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -6444,7 +6444,7 @@ dependencies = [ "solana-slot-history", "solana-stable-layout", "solana-transaction-error", - "thiserror 1.0.68", + "thiserror 1.0.69", "wasm-bindgen", ] @@ -6528,7 +6528,7 @@ dependencies = [ "solana-type-overrides", "solana-vote", "solana_rbpf", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -6563,7 +6563,7 @@ dependencies = [ "solana-timings", "solana-vote-program", "solana_rbpf", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", ] @@ -6611,7 +6611,7 @@ dependencies = [ "solana-account-decoder", "solana-rpc-client-api", "solana-sdk", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", "tokio-stream", "tokio-tungstenite", @@ -6641,7 +6641,7 @@ dependencies = [ "solana-rpc-client-api", "solana-sdk", "solana-streamer", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", ] @@ -6672,7 +6672,7 @@ dependencies = [ "semver", "solana-derivation-path", "solana-sdk", - "thiserror 1.0.68", + "thiserror 1.0.69", "uriparse", ] @@ -6742,7 +6742,7 @@ dependencies = [ "spl-token 6.0.0", "spl-token-2022 4.0.0", "stream-cancel", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", "tokio-util 0.7.1", ] @@ -6795,7 +6795,7 @@ dependencies = [ "solana-sdk", "solana-transaction-status-client-types", "solana-version", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -6806,7 +6806,7 @@ checksum = "7f0ab2d1ca3769c5058c689b438d35eb1cb7d2a32fc4b2b7c16fe72fa187927c" dependencies = [ "solana-rpc-client", "solana-sdk", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -6894,7 +6894,7 @@ dependencies = [ "symlink", "tar", "tempfile", - "thiserror 1.0.68", + "thiserror 1.0.69", "zstd", ] @@ -6911,7 +6911,7 @@ dependencies = [ "solana-pubkey", "solana-sdk", "solana-svm-transaction", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -6979,7 +6979,7 @@ dependencies = [ "solana-short-vec", "solana-signature", "solana-transaction-error", - "thiserror 1.0.68", + "thiserror 1.0.69", "wasm-bindgen", ] @@ -7004,7 +7004,7 @@ dependencies = [ "borsh 1.5.3", "libsecp256k1", "solana-define-syscall", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -7162,7 +7162,7 @@ dependencies = [ "solana-sdk", "solana-storage-proto", "solana-transaction-status", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", "tonic", "zstd", @@ -7217,7 +7217,7 @@ dependencies = [ "solana-perf", "solana-sdk", "solana-transaction-metrics-tracker", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", "tokio-util 0.7.1", "x509-parser", @@ -7250,7 +7250,7 @@ dependencies = [ "solana-timings", "solana-type-overrides", "solana-vote", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -7365,7 +7365,7 @@ dependencies = [ "solana-rpc-client", "solana-rpc-client-api", "solana-sdk", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", ] @@ -7422,7 +7422,7 @@ dependencies = [ "spl-token-2022 4.0.0", "spl-token-group-interface 0.3.0", "spl-token-metadata-interface 0.4.0", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -7440,7 +7440,7 @@ dependencies = [ "solana-account-decoder-client-types", "solana-sdk", "solana-signature", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -7479,7 +7479,7 @@ dependencies = [ "solana-sdk", "solana-streamer", "static_assertions", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", ] @@ -7504,7 +7504,7 @@ dependencies = [ "solana-net-utils", "solana-sdk", "solana-streamer", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", ] @@ -7566,7 +7566,7 @@ dependencies = [ "serde", "serde_derive", "solana-sdk", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -7586,7 +7586,7 @@ dependencies = [ "solana-program", "solana-program-runtime", "solana-sdk", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -7654,7 +7654,7 @@ dependencies = [ "solana-program", "solana-sdk", "subtle", - "thiserror 1.0.68", + "thiserror 1.0.69", "wasm-bindgen", "zeroize", ] @@ -7703,7 +7703,7 @@ dependencies = [ "solana-program", "solana-sdk", "subtle", - "thiserror 1.0.68", + "thiserror 1.0.69", "zeroize", ] @@ -7721,7 +7721,7 @@ dependencies = [ "rand 0.8.5", "rustc-demangle", "scroll", - "thiserror 1.0.68", + "thiserror 1.0.69", "winapi 0.3.9", ] @@ -7759,7 +7759,7 @@ dependencies = [ "solana-program", "spl-token 6.0.0", "spl-token-2022 4.0.0", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -7876,7 +7876,7 @@ dependencies = [ "quote", "sha2 0.10.8", "syn 2.0.87", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -7889,7 +7889,7 @@ dependencies = [ "quote", "sha2 0.10.8", "syn 2.0.87", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -8245,7 +8245,7 @@ dependencies = [ "num-traits", "solana-program", "spl-program-error-derive 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -8396,7 +8396,7 @@ dependencies = [ "solana-sdk", "spl-pod 0.5.0", "spl-record", - "thiserror 1.0.68", + "thiserror 2.0.3", ] [[package]] @@ -8504,7 +8504,7 @@ dependencies = [ "num-traits", "num_enum", "solana-program", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -8546,7 +8546,7 @@ dependencies = [ "spl-token-metadata-interface 0.4.0", "spl-transfer-hook-interface 0.7.0", "spl-type-length-value 0.5.0", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -9297,7 +9297,7 @@ dependencies = [ "bitflags 1.3.2", "byteorder", "libc", - "thiserror 1.0.68", + "thiserror 1.0.69", "walkdir", ] @@ -9349,7 +9349,7 @@ dependencies = [ "serde", "static_assertions", "tarpc-plugins", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", "tokio-serde", "tokio-util 0.6.9", @@ -9467,11 +9467,11 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl 1.0.68", + "thiserror-impl 1.0.69", ] [[package]] @@ -9485,9 +9485,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", @@ -9558,7 +9558,7 @@ dependencies = [ "rand 0.7.3", "rustc-hash 1.1.0", "sha2 0.9.9", - "thiserror 1.0.68", + "thiserror 1.0.69", "unicode-normalization", "wasm-bindgen", "zeroize", @@ -9896,7 +9896,7 @@ dependencies = [ "rand 0.8.5", "rustls 0.21.12", "sha1", - "thiserror 1.0.68", + "thiserror 1.0.69", "url 2.5.2", "utf-8", "webpki-roots 0.24.0", @@ -10474,7 +10474,7 @@ dependencies = [ "nom", "oid-registry", "rusticata-macros", - "thiserror 1.0.68", + "thiserror 1.0.69", "time", ] diff --git a/slashing/program/Cargo.toml b/slashing/program/Cargo.toml index a8e47e5b022..a4ce41ccc4f 100644 --- a/slashing/program/Cargo.toml +++ b/slashing/program/Cargo.toml @@ -25,7 +25,7 @@ serde_bytes = "0.11.15" serde_derive = "1.0.210" # must match the serde version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251 serde_with = { version = "3.11.0", default-features = false } -thiserror = "1.0" +thiserror = "2.0" spl-pod = { version = "0.5.0", path = "../../libraries/pod" } [dev-dependencies] From 63c42f5e826cff0ba96a73f1aca82c16dbafc08f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:53:44 +0100 Subject: [PATCH 32/52] build(deps-dev): bump @types/node from 22.10.0 to 22.10.1 (#7544) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.10.0 to 22.10.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- account-compression/sdk/package.json | 2 +- libraries/type-length-value/js/package.json | 2 +- memo/js/package.json | 2 +- name-service/js/package.json | 2 +- pnpm-lock.yaml | 188 +++++++++---------- single-pool/js/packages/classic/package.json | 2 +- single-pool/js/packages/modern/package.json | 2 +- stake-pool/js/package.json | 2 +- token-group/js/package.json | 2 +- token-lending/js/package.json | 2 +- token-metadata/js/package.json | 2 +- token/js/package.json | 2 +- 12 files changed, 105 insertions(+), 105 deletions(-) diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index ea528403214..f89e53bc34f 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -67,7 +67,7 @@ "@solana/eslint-config-solana": "^3.0.3", "@types/bn.js": "^5.1.6", "@types/jest": "^29.5.14", - "@types/node": "^22.10.0", + "@types/node": "^22.10.1", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/libraries/type-length-value/js/package.json b/libraries/type-length-value/js/package.json index e12fabbd65e..d383669f42a 100644 --- a/libraries/type-length-value/js/package.json +++ b/libraries/type-length-value/js/package.json @@ -49,7 +49,7 @@ "devDependencies": { "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.10.0", + "@types/node": "^22.10.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "chai": "^5.1.2", diff --git a/memo/js/package.json b/memo/js/package.json index 138c45b5369..d0bfaaab7ca 100644 --- a/memo/js/package.json +++ b/memo/js/package.json @@ -54,7 +54,7 @@ "@solana/web3.js": "^1.95.5", "@types/chai": "^5.0.1", "@types/jest": "^29.5.14", - "@types/node": "^22.10.0", + "@types/node": "^22.10.1", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/name-service/js/package.json b/name-service/js/package.json index 5e64f79cefc..507ad33d8f5 100644 --- a/name-service/js/package.json +++ b/name-service/js/package.json @@ -45,7 +45,7 @@ "@jest/globals": "^29.7.0", "@types/bn.js": "^5.1.6", "@types/jest": "^29.5.14", - "@types/node": "^22.10.0", + "@types/node": "^22.10.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c800ac130b0..68ebb4483d8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -70,8 +70,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.10.0 - version: 22.10.0 + specifier: ^22.10.1 + version: 22.10.1 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -107,10 +107,10 @@ importers: version: 6.2.0 jest: specifier: ^29.0.1 - version: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2) jest-config: specifier: ^29.0.1 - version: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2) start-server-and-test: specifier: ^2.0.8 version: 2.0.8 @@ -122,7 +122,7 @@ importers: version: 2.0.1 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: specifier: ^0.27.0 version: 0.27.0(typescript@5.7.2) @@ -146,8 +146,8 @@ importers: specifier: ^10.0.10 version: 10.0.10 '@types/node': - specifier: ^22.10.0 - version: 22.10.0 + specifier: ^22.10.1 + version: 22.10.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) @@ -174,7 +174,7 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: specifier: ^0.27.0 version: 0.27.0(typescript@5.7.2) @@ -198,8 +198,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.10.0 - version: 22.10.0 + specifier: ^22.10.1 + version: 22.10.1 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -223,7 +223,7 @@ importers: version: 6.2.0 jest: specifier: ^29.0.0 - version: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2) process: specifier: ^0.11.10 version: 0.11.10 @@ -238,7 +238,7 @@ importers: version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.7.2) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: specifier: ^0.27.0 version: 0.27.0(typescript@5.7.2) @@ -268,8 +268,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.10.0 - version: 22.10.0 + specifier: ^22.10.1 + version: 22.10.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) @@ -290,7 +290,7 @@ importers: version: 2.31.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0) jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2) start-server-and-test: specifier: ^2.0.8 version: 2.0.8 @@ -299,7 +299,7 @@ importers: version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.7.2) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: specifier: ^0.27.0 version: 0.27.0(typescript@5.7.2) @@ -323,8 +323,8 @@ importers: specifier: ^5.0.0 version: 5.0.0 '@types/node': - specifier: ^22.10.0 - version: 22.10.0 + specifier: ^22.10.1 + version: 22.10.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2) @@ -357,8 +357,8 @@ importers: version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) devDependencies: '@types/node': - specifier: ^22.10.0 - version: 22.10.0 + specifier: ^22.10.1 + version: 22.10.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2) @@ -421,8 +421,8 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.10.0 - version: 22.10.0 + specifier: ^22.10.1 + version: 22.10.1 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -440,7 +440,7 @@ importers: version: 8.57.0 jest: specifier: ^29.0.0 - version: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) + version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2) rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -476,8 +476,8 @@ importers: specifier: ^10.0.10 version: 10.0.10 '@types/node': - specifier: ^22.10.0 - version: 22.10.0 + specifier: ^22.10.1 + version: 22.10.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) @@ -504,7 +504,7 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) tslib: specifier: ^2.8.1 version: 2.8.1 @@ -549,8 +549,8 @@ importers: specifier: ^8.56.7 version: 8.56.7 '@types/node': - specifier: ^22.10.0 - version: 22.10.0 + specifier: ^22.10.1 + version: 22.10.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) @@ -568,7 +568,7 @@ importers: version: 4.27.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) tslib: specifier: ^2.8.1 version: 2.8.1 @@ -598,8 +598,8 @@ importers: specifier: ^10.0.10 version: 10.0.10 '@types/node': - specifier: ^22.10.0 - version: 22.10.0 + specifier: ^22.10.1 + version: 22.10.1 '@typescript-eslint/eslint-plugin': specifier: ^8.4.0 version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) @@ -626,7 +626,7 @@ importers: version: 0.3.4 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) tslib: specifier: ^2.8.1 version: 2.8.1 @@ -687,7 +687,7 @@ importers: version: 2.0.8 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -729,8 +729,8 @@ importers: specifier: ^10.0.10 version: 10.0.10 '@types/node': - specifier: ^22.10.0 - version: 22.10.0 + specifier: ^22.10.1 + version: 22.10.1 '@types/node-fetch': specifier: ^2.6.12 version: 2.6.12 @@ -769,7 +769,7 @@ importers: version: 2.0.8 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: specifier: ^0.27.0 version: 0.27.0(typescript@5.7.2) @@ -1547,7 +1547,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.10.0 + '@types/node': 22.10.1 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -1559,7 +1559,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.10.0 + '@types/node': 22.10.1 chalk: 4.1.2 jest-message-util: 30.0.0-alpha.6 jest-util: 30.0.0-alpha.6 @@ -1580,14 +1580,14 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.0 + '@types/node': 22.10.1 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -1624,14 +1624,14 @@ packages: '@jest/test-result': 30.0.0-alpha.6 '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.10.0 + '@types/node': 22.10.1 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 4.0.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 30.0.0-alpha.6 - jest-config: 30.0.0-alpha.6(@types/node@22.10.0) + jest-config: 30.0.0-alpha.6(@types/node@22.10.1) jest-haste-map: 30.0.0-alpha.6 jest-message-util: 30.0.0-alpha.6 jest-regex-util: 30.0.0-alpha.6 @@ -1660,7 +1660,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.0 + '@types/node': 22.10.1 jest-mock: 29.7.0 dev: true @@ -1670,7 +1670,7 @@ packages: dependencies: '@jest/fake-timers': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.10.0 + '@types/node': 22.10.1 jest-mock: 30.0.0-alpha.6 dev: true @@ -1714,7 +1714,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.10.0 + '@types/node': 22.10.1 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -1726,7 +1726,7 @@ packages: dependencies: '@jest/types': 30.0.0-alpha.6 '@sinonjs/fake-timers': 11.3.1 - '@types/node': 22.10.0 + '@types/node': 22.10.1 jest-message-util: 30.0.0-alpha.6 jest-mock: 30.0.0-alpha.6 jest-util: 30.0.0-alpha.6 @@ -1760,7 +1760,7 @@ packages: resolution: {integrity: sha512-eoV3sjS1M5k3YdrFWezqdndfgepwB86gwyXC0BzV2saZdJ42ySUoEDBGKuwta8A6Zh3w8tVHNFxz1BqiFraHCQ==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 jest-regex-util: 30.0.0-alpha.6 dev: true @@ -1779,7 +1779,7 @@ packages: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.20 - '@types/node': 22.10.0 + '@types/node': 22.10.1 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -1816,7 +1816,7 @@ packages: '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.10.0 + '@types/node': 22.10.1 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -1973,7 +1973,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/yargs': 17.0.31 chalk: 4.1.2 dev: true @@ -1986,7 +1986,7 @@ packages: '@jest/schemas': 30.0.0-alpha.6 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/yargs': 17.0.31 chalk: 4.1.2 dev: true @@ -2896,7 +2896,7 @@ packages: /@types/bn.js@5.1.6: resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 dev: true /@types/chai-as-promised@8.0.1: @@ -2914,7 +2914,7 @@ packages: /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 /@types/deep-eql@4.0.2: resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} @@ -2944,7 +2944,7 @@ packages: /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 dev: true /@types/hast@3.0.4: @@ -2991,15 +2991,15 @@ packages: /@types/node-fetch@2.6.12: resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 form-data: 4.0.0 dev: true /@types/node@12.20.55: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - /@types/node@22.10.0: - resolution: {integrity: sha512-XC70cRZVElFHfIUB40FgZOBbgJYFKKMa5nb9lxcwYstFG/Mi+/Y0bGS+rs6Dmhmkpq4pnNiLiuZAbc02YCOnmA==} + /@types/node@22.10.1: + resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} dependencies: undici-types: 6.20.0 @@ -3025,12 +3025,12 @@ packages: /@types/ws@7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 /@types/ws@8.5.10: resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 /@types/yargs-parser@21.0.3: resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -4471,7 +4471,7 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /create-jest@29.7.0(@types/node@22.10.0)(ts-node@10.9.2): + /create-jest@29.7.0(@types/node@22.10.1)(ts-node@10.9.2): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -4480,7 +4480,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -5163,7 +5163,7 @@ packages: '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2)(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.7.2) eslint: 8.57.0 - jest: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) + jest: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2) transitivePeerDependencies: - supports-color - typescript @@ -6648,7 +6648,7 @@ packages: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.0 + '@types/node': 22.10.1 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -6677,7 +6677,7 @@ packages: '@jest/expect': 30.0.0-alpha.6 '@jest/test-result': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.10.0 + '@types/node': 22.10.1 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -6698,7 +6698,7 @@ packages: - supports-color dev: true - /jest-cli@29.7.0(@types/node@22.10.0)(ts-node@10.9.2): + /jest-cli@29.7.0(@types/node@22.10.1)(ts-node@10.9.2): resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -6712,10 +6712,10 @@ packages: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) + create-jest: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -6742,7 +6742,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 import-local: 3.1.0 - jest-config: 30.0.0-alpha.6(@types/node@22.10.0) + jest-config: 30.0.0-alpha.6(@types/node@22.10.1) jest-util: 30.0.0-alpha.6 jest-validate: 30.0.0-alpha.6 yargs: 17.7.2 @@ -6754,7 +6754,7 @@ packages: - ts-node dev: true - /jest-config@29.7.0(@types/node@22.10.0)(ts-node@10.9.2): + /jest-config@29.7.0(@types/node@22.10.1)(ts-node@10.9.2): resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -6769,7 +6769,7 @@ packages: '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.0 + '@types/node': 22.10.1 babel-jest: 29.7.0(@babel/core@7.26.0) chalk: 4.1.2 ci-info: 3.9.0 @@ -6789,13 +6789,13 @@ packages: pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.2(@types/node@22.10.0)(typescript@5.7.2) + ts-node: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) transitivePeerDependencies: - babel-plugin-macros - supports-color dev: true - /jest-config@30.0.0-alpha.6(@types/node@22.10.0): + /jest-config@30.0.0-alpha.6(@types/node@22.10.1): resolution: {integrity: sha512-Tq9rH1mg9+nlIhh3efGwMSogFVKZ9z7c6P33ZlK74iJlnqqIAKYERZL2nNmNC5+5p8uxlTPSFZfBz9O8NGKotw==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} peerDependencies: @@ -6814,7 +6814,7 @@ packages: '@jest/pattern': 30.0.0-alpha.6 '@jest/test-sequencer': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.10.0 + '@types/node': 22.10.1 babel-jest: 30.0.0-alpha.6(@babel/core@7.26.0) chalk: 4.1.2 ci-info: 4.0.0 @@ -6903,7 +6903,7 @@ packages: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.0 + '@types/node': 22.10.1 jest-mock: 29.7.0 jest-util: 29.7.0 dev: true @@ -6915,7 +6915,7 @@ packages: '@jest/environment': 30.0.0-alpha.6 '@jest/fake-timers': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.10.0 + '@types/node': 22.10.1 jest-mock: 30.0.0-alpha.6 jest-util: 30.0.0-alpha.6 dev: true @@ -6936,7 +6936,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.10.0 + '@types/node': 22.10.1 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -6954,7 +6954,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.10.0 + '@types/node': 22.10.1 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -7038,7 +7038,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.10.0 + '@types/node': 22.10.1 jest-util: 29.7.0 dev: true @@ -7047,7 +7047,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.10.0 + '@types/node': 22.10.1 jest-util: 30.0.0-alpha.6 dev: true @@ -7144,7 +7144,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.0 + '@types/node': 22.10.1 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -7173,7 +7173,7 @@ packages: '@jest/test-result': 30.0.0-alpha.6 '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.10.0 + '@types/node': 22.10.1 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -7204,7 +7204,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.0 + '@types/node': 22.10.1 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -7234,7 +7234,7 @@ packages: '@jest/test-result': 30.0.0-alpha.6 '@jest/transform': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.10.0 + '@types/node': 22.10.1 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -7315,7 +7315,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.10.0 + '@types/node': 22.10.1 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -7327,7 +7327,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.10.0 + '@types/node': 22.10.1 chalk: 4.1.2 ci-info: 4.0.0 graceful-fs: 4.2.11 @@ -7364,7 +7364,7 @@ packages: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.0 + '@types/node': 22.10.1 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -7378,7 +7378,7 @@ packages: dependencies: '@jest/test-result': 30.0.0-alpha.6 '@jest/types': 30.0.0-alpha.6 - '@types/node': 22.10.0 + '@types/node': 22.10.1 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -7390,7 +7390,7 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -7400,14 +7400,14 @@ packages: resolution: {integrity: sha512-qlzX7zFT/QdUV/LWsJwZBlaIBaJ+E2VH3d1gArGVP+9hUHGpJkEzCSBK7yuZrkt+M/U0Jre5+maPRmkinEF4DA==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@ungap/structured-clone': 1.2.0 jest-util: 30.0.0-alpha.6 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest@29.7.0(@types/node@22.10.0)(ts-node@10.9.2): + /jest@29.7.0(@types/node@22.10.1)(ts-node@10.9.2): resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -7420,7 +7420,7 @@ packages: '@jest/core': 29.7.0(ts-node@10.9.2) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) + jest-cli: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -9081,7 +9081,7 @@ packages: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.10.0)(ts-node@10.9.2) + jest: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -9091,7 +9091,7 @@ packages: yargs-parser: 21.1.1 dev: true - /ts-node@10.9.2(@types/node@22.10.0)(typescript@5.7.2): + /ts-node@10.9.2(@types/node@22.10.1)(typescript@5.7.2): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: @@ -9110,7 +9110,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.10.0 + '@types/node': 22.10.1 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 diff --git a/single-pool/js/packages/classic/package.json b/single-pool/js/packages/classic/package.json index bbaac9ed9a2..2d56325b1e3 100644 --- a/single-pool/js/packages/classic/package.json +++ b/single-pool/js/packages/classic/package.json @@ -18,7 +18,7 @@ "test": "sed -i '1s/.*/{ \"type\": \"module\",/' package.json && NODE_OPTIONS='--loader=tsx' ava ; ret=$?; sed -i '1s/.*/{/' package.json && exit $ret" }, "devDependencies": { - "@types/node": "^22.10.0", + "@types/node": "^22.10.1", "@ava/typescript": "^5.0.0", "@typescript-eslint/eslint-plugin": "^8.4.0", "ava": "^6.2.0", diff --git a/single-pool/js/packages/modern/package.json b/single-pool/js/packages/modern/package.json index 5454db5fb50..41161469fe2 100644 --- a/single-pool/js/packages/modern/package.json +++ b/single-pool/js/packages/modern/package.json @@ -16,7 +16,7 @@ "lint:fix": "eslint . --fix" }, "devDependencies": { - "@types/node": "^22.10.0", + "@types/node": "^22.10.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "eslint": "^8.57.0", "typescript": "^5.7.2" diff --git a/stake-pool/js/package.json b/stake-pool/js/package.json index 86f3918a969..db27be5322b 100644 --- a/stake-pool/js/package.json +++ b/stake-pool/js/package.json @@ -61,7 +61,7 @@ "@rollup/plugin-typescript": "^12.1.1", "@types/bn.js": "^5.1.6", "@types/jest": "^29.5.14", - "@types/node": "^22.10.0", + "@types/node": "^22.10.1", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", diff --git a/token-group/js/package.json b/token-group/js/package.json index e3a295af519..572c69cd65e 100644 --- a/token-group/js/package.json +++ b/token-group/js/package.json @@ -53,7 +53,7 @@ "@solana/web3.js": "^1.95.5", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.10.0", + "@types/node": "^22.10.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "chai": "^5.1.2", diff --git a/token-lending/js/package.json b/token-lending/js/package.json index 9a6b9da99c7..71bfbdc31b6 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -47,7 +47,7 @@ "@solana/spl-token": "0.4.9", "@solana/web3.js": "^1.95.5", "@types/eslint": "^8.56.7", - "@types/node": "^22.10.0", + "@types/node": "^22.10.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", diff --git a/token-metadata/js/package.json b/token-metadata/js/package.json index 0012fea439b..aab2ecbe85e 100644 --- a/token-metadata/js/package.json +++ b/token-metadata/js/package.json @@ -53,7 +53,7 @@ "@solana/web3.js": "^1.95.5", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.10.0", + "@types/node": "^22.10.1", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", "chai": "^5.1.2", diff --git a/token/js/package.json b/token/js/package.json index a9470d4f8f4..5fc97344302 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -66,7 +66,7 @@ "@types/chai-as-promised": "^8.0.1", "@types/chai": "^5.0.1", "@types/mocha": "^10.0.10", - "@types/node": "^22.10.0", + "@types/node": "^22.10.1", "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^8.4.0", "@typescript-eslint/parser": "^8.4.0", From d4b7fc06233b11efecc082cd2f6ee3eadd5daa04 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:53:51 +0100 Subject: [PATCH 33/52] build(deps-dev): bump typedoc from 0.27.0 to 0.27.1 (#7545) Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.27.0 to 0.27.1. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.27.0...v0.27.1) --- updated-dependencies: - dependency-name: typedoc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- account-compression/sdk/package.json | 2 +- libraries/type-length-value/js/package.json | 2 +- memo/js/package.json | 2 +- name-service/js/package.json | 2 +- pnpm-lock.yaml | 36 ++++++++++----------- token-group/js/package.json | 2 +- token-lending/js/package.json | 2 +- token-metadata/js/package.json | 2 +- token/js/package.json | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index f89e53bc34f..e4dd4f091a7 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -85,7 +85,7 @@ "ts-jest": "^29.2.5", "ts-jest-resolver": "^2.0.1", "ts-node": "^10.9.2", - "typedoc": "^0.27.0", + "typedoc": "^0.27.1", "typescript": "5.7.2" } } diff --git a/libraries/type-length-value/js/package.json b/libraries/type-length-value/js/package.json index d383669f42a..2b314ab3651 100644 --- a/libraries/type-length-value/js/package.json +++ b/libraries/type-length-value/js/package.json @@ -59,7 +59,7 @@ "mocha": "^10.8.2", "shx": "^0.3.4", "ts-node": "^10.9.2", - "typedoc": "^0.27.0", + "typedoc": "^0.27.1", "typescript": "^5.7.2" } } diff --git a/memo/js/package.json b/memo/js/package.json index d0bfaaab7ca..16b1b621e71 100644 --- a/memo/js/package.json +++ b/memo/js/package.json @@ -68,7 +68,7 @@ "start-server-and-test": "^2.0.8", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "typedoc": "^0.27.0", + "typedoc": "^0.27.1", "typescript": "^5.7.2" } } diff --git a/name-service/js/package.json b/name-service/js/package.json index 507ad33d8f5..d178cf3571d 100644 --- a/name-service/js/package.json +++ b/name-service/js/package.json @@ -56,7 +56,7 @@ "start-server-and-test": "^2.0.8", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "typedoc": "^0.27.0", + "typedoc": "^0.27.1", "typescript": "^5.7.2" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 68ebb4483d8..d32a32e8589 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -124,8 +124,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.0 - version: 0.27.0(typescript@5.7.2) + specifier: ^0.27.1 + version: 0.27.1(typescript@5.7.2) typescript: specifier: 5.7.2 version: 5.7.2 @@ -176,8 +176,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.0 - version: 0.27.0(typescript@5.7.2) + specifier: ^0.27.1 + version: 0.27.1(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -240,8 +240,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.0 - version: 0.27.0(typescript@5.7.2) + specifier: ^0.27.1 + version: 0.27.1(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -301,8 +301,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.0 - version: 0.27.0(typescript@5.7.2) + specifier: ^0.27.1 + version: 0.27.1(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -509,8 +509,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.27.0 - version: 0.27.0(typescript@5.7.2) + specifier: ^0.27.1 + version: 0.27.1(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -573,8 +573,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.27.0 - version: 0.27.0(typescript@5.7.2) + specifier: ^0.27.1 + version: 0.27.1(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -631,8 +631,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.27.0 - version: 0.27.0(typescript@5.7.2) + specifier: ^0.27.1 + version: 0.27.1(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -771,8 +771,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.0 - version: 0.27.0(typescript@5.7.2) + specifier: ^0.27.1 + version: 0.27.1(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -9290,8 +9290,8 @@ packages: possible-typed-array-names: 1.0.0 dev: true - /typedoc@0.27.0(typescript@5.7.2): - resolution: {integrity: sha512-7AkTJhFdhsihthaBFHNpj5iFdLyR7FpQqXM+IABJmE1/qTjWypirCLrheToUP3fjpWHN1Drn3K7PWH1t37KvNQ==} + /typedoc@0.27.1(typescript@5.7.2): + resolution: {integrity: sha512-cbFtNFpkCtHAHRvMnCDdtM2+xhO2uiJAcw4ooLmVMuaY9yLJswKvi6wOwPZgTnKKnm/HKpO/Ub6DVk4KRf/vRg==} engines: {node: '>= 18'} hasBin: true peerDependencies: diff --git a/token-group/js/package.json b/token-group/js/package.json index 572c69cd65e..55f2424561e 100644 --- a/token-group/js/package.json +++ b/token-group/js/package.json @@ -64,7 +64,7 @@ "shx": "^0.3.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.27.0", + "typedoc": "^0.27.1", "typescript": "^5.7.2" } } diff --git a/token-lending/js/package.json b/token-lending/js/package.json index 71bfbdc31b6..6043204ea9e 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -55,7 +55,7 @@ "rollup": "^4.27.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.27.0", + "typedoc": "^0.27.1", "typescript": "^5.7.2" } } diff --git a/token-metadata/js/package.json b/token-metadata/js/package.json index aab2ecbe85e..e2c74f47082 100644 --- a/token-metadata/js/package.json +++ b/token-metadata/js/package.json @@ -64,7 +64,7 @@ "shx": "^0.3.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.27.0", + "typedoc": "^0.27.1", "typescript": "^5.7.2" } } diff --git a/token/js/package.json b/token/js/package.json index 5fc97344302..3755235bfeb 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -80,7 +80,7 @@ "shx": "^0.3.4", "start-server-and-test": "^2.0.8", "ts-node": "^10.9.2", - "typedoc": "^0.27.0", + "typedoc": "^0.27.1", "typescript": "^5.7.2" } } From 487b7d5efc289d9c2f90fbc3bab26a7a90c8cecf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:14:57 +0100 Subject: [PATCH 34/52] build(deps-dev): bump typedoc from 0.27.1 to 0.27.2 (#7548) Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.27.1 to 0.27.2. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.27.1...v0.27.2) --- updated-dependencies: - dependency-name: typedoc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- account-compression/sdk/package.json | 2 +- libraries/type-length-value/js/package.json | 2 +- memo/js/package.json | 2 +- name-service/js/package.json | 2 +- pnpm-lock.yaml | 56 ++++++++++----------- token-group/js/package.json | 2 +- token-lending/js/package.json | 2 +- token-metadata/js/package.json | 2 +- token/js/package.json | 2 +- 9 files changed, 36 insertions(+), 36 deletions(-) diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index e4dd4f091a7..dd4513b83e8 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -85,7 +85,7 @@ "ts-jest": "^29.2.5", "ts-jest-resolver": "^2.0.1", "ts-node": "^10.9.2", - "typedoc": "^0.27.1", + "typedoc": "^0.27.2", "typescript": "5.7.2" } } diff --git a/libraries/type-length-value/js/package.json b/libraries/type-length-value/js/package.json index 2b314ab3651..fa733f5f8b7 100644 --- a/libraries/type-length-value/js/package.json +++ b/libraries/type-length-value/js/package.json @@ -59,7 +59,7 @@ "mocha": "^10.8.2", "shx": "^0.3.4", "ts-node": "^10.9.2", - "typedoc": "^0.27.1", + "typedoc": "^0.27.2", "typescript": "^5.7.2" } } diff --git a/memo/js/package.json b/memo/js/package.json index 16b1b621e71..adf78becc0d 100644 --- a/memo/js/package.json +++ b/memo/js/package.json @@ -68,7 +68,7 @@ "start-server-and-test": "^2.0.8", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "typedoc": "^0.27.1", + "typedoc": "^0.27.2", "typescript": "^5.7.2" } } diff --git a/name-service/js/package.json b/name-service/js/package.json index d178cf3571d..6bdc4989bb2 100644 --- a/name-service/js/package.json +++ b/name-service/js/package.json @@ -56,7 +56,7 @@ "start-server-and-test": "^2.0.8", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "typedoc": "^0.27.1", + "typedoc": "^0.27.2", "typescript": "^5.7.2" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d32a32e8589..469f5800213 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -124,8 +124,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.1 - version: 0.27.1(typescript@5.7.2) + specifier: ^0.27.2 + version: 0.27.2(typescript@5.7.2) typescript: specifier: 5.7.2 version: 5.7.2 @@ -176,8 +176,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.1 - version: 0.27.1(typescript@5.7.2) + specifier: ^0.27.2 + version: 0.27.2(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -240,8 +240,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.1 - version: 0.27.1(typescript@5.7.2) + specifier: ^0.27.2 + version: 0.27.2(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -301,8 +301,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.1 - version: 0.27.1(typescript@5.7.2) + specifier: ^0.27.2 + version: 0.27.2(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -509,8 +509,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.27.1 - version: 0.27.1(typescript@5.7.2) + specifier: ^0.27.2 + version: 0.27.2(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -573,8 +573,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.27.1 - version: 0.27.1(typescript@5.7.2) + specifier: ^0.27.2 + version: 0.27.2(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -631,8 +631,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.27.1 - version: 0.27.1(typescript@5.7.2) + specifier: ^0.27.2 + version: 0.27.2(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -771,8 +771,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.1 - version: 0.27.1(typescript@5.7.2) + specifier: ^0.27.2 + version: 0.27.2(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -1458,11 +1458,11 @@ packages: levn: 0.4.1 dev: true - /@gerrit0/mini-shiki@1.23.2: - resolution: {integrity: sha512-6e/41ZAilc2iE4n0bxxMSvzrt1dy2MSa9lSdd2M5lcTDlrzcau+FucIEDrG+xF1dPou/a093tm1t4HPTSI4g1w==} + /@gerrit0/mini-shiki@1.24.1: + resolution: {integrity: sha512-PNP/Gjv3VqU7z7DjRgO3F9Ok5frTKqtpV+LJW1RzMcr2zpRk0ulhEWnbcNGXzPC7BZyWMIHrkfQX2GZRfxrn6Q==} dependencies: - '@shikijs/engine-oniguruma': 1.23.1 - '@shikijs/types': 1.23.1 + '@shikijs/engine-oniguruma': 1.24.0 + '@shikijs/types': 1.24.0 '@shikijs/vscode-textmate': 9.3.0 dev: true @@ -2480,15 +2480,15 @@ packages: resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} dev: true - /@shikijs/engine-oniguruma@1.23.1: - resolution: {integrity: sha512-KQ+lgeJJ5m2ISbUZudLR1qHeH3MnSs2mjFg7bnencgs5jDVPeJ2NVDJ3N5ZHbcTsOIh0qIueyAJnwg7lg7kwXQ==} + /@shikijs/engine-oniguruma@1.24.0: + resolution: {integrity: sha512-Eua0qNOL73Y82lGA4GF5P+G2+VXX9XnuUxkiUuwcxQPH4wom+tE39kZpBFXfUuwNYxHSkrSxpB1p4kyRW0moSg==} dependencies: - '@shikijs/types': 1.23.1 + '@shikijs/types': 1.24.0 '@shikijs/vscode-textmate': 9.3.0 dev: true - /@shikijs/types@1.23.1: - resolution: {integrity: sha512-98A5hGyEhzzAgQh2dAeHKrWW4HfCMeoFER2z16p5eJ+vmPeF6lZ/elEne6/UCU551F/WqkopqRsr1l2Yu6+A0g==} + /@shikijs/types@1.24.0: + resolution: {integrity: sha512-aptbEuq1Pk88DMlCe+FzXNnBZ17LCiLIGWAeCWhoFDzia5Q5Krx3DgnULLiouSdd6+LUM39XwXGppqYE0Ghtug==} dependencies: '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 @@ -9290,14 +9290,14 @@ packages: possible-typed-array-names: 1.0.0 dev: true - /typedoc@0.27.1(typescript@5.7.2): - resolution: {integrity: sha512-cbFtNFpkCtHAHRvMnCDdtM2+xhO2uiJAcw4ooLmVMuaY9yLJswKvi6wOwPZgTnKKnm/HKpO/Ub6DVk4KRf/vRg==} + /typedoc@0.27.2(typescript@5.7.2): + resolution: {integrity: sha512-C2ima5TZJHU3ecnRIz50lKd1BsYck5LhYQIy7MRPmjuSEJreUEAt+uAVcZgY7wZsSORzEI7xW8miZIdxv/cbmw==} engines: {node: '>= 18'} hasBin: true peerDependencies: typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x dependencies: - '@gerrit0/mini-shiki': 1.23.2 + '@gerrit0/mini-shiki': 1.24.1 lunr: 2.3.9 markdown-it: 14.1.0 minimatch: 9.0.5 diff --git a/token-group/js/package.json b/token-group/js/package.json index 55f2424561e..4cd9780e618 100644 --- a/token-group/js/package.json +++ b/token-group/js/package.json @@ -64,7 +64,7 @@ "shx": "^0.3.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.27.1", + "typedoc": "^0.27.2", "typescript": "^5.7.2" } } diff --git a/token-lending/js/package.json b/token-lending/js/package.json index 6043204ea9e..f3416b1579d 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -55,7 +55,7 @@ "rollup": "^4.27.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.27.1", + "typedoc": "^0.27.2", "typescript": "^5.7.2" } } diff --git a/token-metadata/js/package.json b/token-metadata/js/package.json index e2c74f47082..f334f037bc7 100644 --- a/token-metadata/js/package.json +++ b/token-metadata/js/package.json @@ -64,7 +64,7 @@ "shx": "^0.3.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.27.1", + "typedoc": "^0.27.2", "typescript": "^5.7.2" } } diff --git a/token/js/package.json b/token/js/package.json index 3755235bfeb..865b997e995 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -80,7 +80,7 @@ "shx": "^0.3.4", "start-server-and-test": "^2.0.8", "ts-node": "^10.9.2", - "typedoc": "^0.27.1", + "typedoc": "^0.27.2", "typescript": "^5.7.2" } } From a01480dcb2deb83f18053d3a9984d3cc74f43f39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:15:07 +0100 Subject: [PATCH 35/52] build(deps-dev): bump rollup from 4.27.4 to 4.28.0 (#7547) Bumps [rollup](https://github.com/rollup/rollup) from 4.27.4 to 4.28.0. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.27.4...v4.28.0) --- updated-dependencies: - dependency-name: rollup dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 192 +++++++++++++++++----------------- stake-pool/js/package.json | 2 +- token-lending/js/package.json | 2 +- 3 files changed, 98 insertions(+), 98 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 469f5800213..a645921d36d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -395,25 +395,25 @@ importers: devDependencies: '@rollup/plugin-alias': specifier: ^5.1.1 - version: 5.1.1(rollup@4.27.4) + version: 5.1.1(rollup@4.28.0) '@rollup/plugin-commonjs': specifier: ^28.0.1 - version: 28.0.1(rollup@4.27.4) + version: 28.0.1(rollup@4.28.0) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.27.4) + version: 6.1.0(rollup@4.28.0) '@rollup/plugin-multi-entry': specifier: ^6.0.0 - version: 6.0.1(rollup@4.27.4) + version: 6.0.1(rollup@4.28.0) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.27.4) + version: 15.3.0(rollup@4.28.0) '@rollup/plugin-terser': specifier: ^0.4.4 - version: 0.4.4(rollup@4.27.4) + version: 0.4.4(rollup@4.28.0) '@rollup/plugin-typescript': specifier: ^12.1.1 - version: 12.1.1(rollup@4.27.4)(tslib@2.8.1)(typescript@5.7.2) + version: 12.1.1(rollup@4.28.0)(tslib@2.8.1)(typescript@5.7.2) '@types/bn.js': specifier: ^5.1.6 version: 5.1.6 @@ -445,11 +445,11 @@ importers: specifier: ^6.0.1 version: 6.0.1 rollup: - specifier: ^4.27.4 - version: 4.27.4 + specifier: ^4.28.0 + version: 4.28.0 rollup-plugin-dts: specifier: ^6.1.1 - version: 6.1.1(rollup@4.27.4)(typescript@5.7.2) + version: 6.1.1(rollup@4.28.0)(typescript@5.7.2) ts-jest: specifier: ^29.2.5 version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.7.2) @@ -532,13 +532,13 @@ importers: devDependencies: '@rollup/plugin-commonjs': specifier: ^28.0.1 - version: 28.0.1(rollup@4.27.4) + version: 28.0.1(rollup@4.28.0) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.27.4) + version: 15.3.0(rollup@4.28.0) '@rollup/plugin-typescript': specifier: ^12.1.1 - version: 12.1.1(rollup@4.27.4)(tslib@2.8.1)(typescript@5.7.2) + version: 12.1.1(rollup@4.28.0)(tslib@2.8.1)(typescript@5.7.2) '@solana/spl-token': specifier: 0.4.9 version: link:../../token/js @@ -564,8 +564,8 @@ importers: specifier: ^6.2.0 version: 6.2.0 rollup: - specifier: ^4.27.4 - version: 4.27.4 + specifier: ^4.28.0 + version: 4.28.0 ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) @@ -2187,7 +2187,7 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dev: true - /@rollup/plugin-alias@5.1.1(rollup@4.27.4): + /@rollup/plugin-alias@5.1.1(rollup@4.28.0): resolution: {integrity: sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2196,10 +2196,10 @@ packages: rollup: optional: true dependencies: - rollup: 4.27.4 + rollup: 4.28.0 dev: true - /@rollup/plugin-commonjs@28.0.1(rollup@4.27.4): + /@rollup/plugin-commonjs@28.0.1(rollup@4.28.0): resolution: {integrity: sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==} engines: {node: '>=16.0.0 || 14 >= 14.17'} peerDependencies: @@ -2208,17 +2208,17 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.4) + '@rollup/pluginutils': 5.1.0(rollup@4.28.0) commondir: 1.0.1 estree-walker: 2.0.2 fdir: 6.3.0(picomatch@4.0.2) is-reference: 1.2.1 magic-string: 0.30.10 picomatch: 4.0.2 - rollup: 4.27.4 + rollup: 4.28.0 dev: true - /@rollup/plugin-json@6.1.0(rollup@4.27.4): + /@rollup/plugin-json@6.1.0(rollup@4.28.0): resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2227,11 +2227,11 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.4) - rollup: 4.27.4 + '@rollup/pluginutils': 5.1.0(rollup@4.28.0) + rollup: 4.28.0 dev: true - /@rollup/plugin-multi-entry@6.0.1(rollup@4.27.4): + /@rollup/plugin-multi-entry@6.0.1(rollup@4.28.0): resolution: {integrity: sha512-AXm6toPyTSfbYZWghQGbom1Uh7dHXlrGa+HoiYNhQtDUE3Q7LqoUYdVQx9E1579QWS1uOiu+cZRSE4okO7ySgw==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2240,12 +2240,12 @@ packages: rollup: optional: true dependencies: - '@rollup/plugin-virtual': 3.0.2(rollup@4.27.4) + '@rollup/plugin-virtual': 3.0.2(rollup@4.28.0) matched: 5.0.1 - rollup: 4.27.4 + rollup: 4.28.0 dev: true - /@rollup/plugin-node-resolve@15.3.0(rollup@4.27.4): + /@rollup/plugin-node-resolve@15.3.0(rollup@4.28.0): resolution: {integrity: sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2254,15 +2254,15 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.4) + '@rollup/pluginutils': 5.1.0(rollup@4.28.0) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-module: 1.0.0 resolve: 1.22.8 - rollup: 4.27.4 + rollup: 4.28.0 dev: true - /@rollup/plugin-terser@0.4.4(rollup@4.27.4): + /@rollup/plugin-terser@0.4.4(rollup@4.28.0): resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2271,13 +2271,13 @@ packages: rollup: optional: true dependencies: - rollup: 4.27.4 + rollup: 4.28.0 serialize-javascript: 6.0.1 smob: 1.4.1 terser: 5.24.0 dev: true - /@rollup/plugin-typescript@12.1.1(rollup@4.27.4)(tslib@2.8.1)(typescript@5.7.2): + /@rollup/plugin-typescript@12.1.1(rollup@4.28.0)(tslib@2.8.1)(typescript@5.7.2): resolution: {integrity: sha512-t7O653DpfB5MbFrqPe/VcKFFkvRuFNp9qId3xq4Eth5xlyymzxNpye2z8Hrl0RIMuXTSr5GGcFpkdlMeacUiFQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2290,14 +2290,14 @@ packages: tslib: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.27.4) + '@rollup/pluginutils': 5.1.0(rollup@4.28.0) resolve: 1.22.8 - rollup: 4.27.4 + rollup: 4.28.0 tslib: 2.8.1 typescript: 5.7.2 dev: true - /@rollup/plugin-virtual@3.0.2(rollup@4.27.4): + /@rollup/plugin-virtual@3.0.2(rollup@4.28.0): resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2306,7 +2306,7 @@ packages: rollup: optional: true dependencies: - rollup: 4.27.4 + rollup: 4.28.0 dev: true /@rollup/pluginutils@4.2.1: @@ -2317,7 +2317,7 @@ packages: picomatch: 2.3.1 dev: true - /@rollup/pluginutils@5.1.0(rollup@4.27.4): + /@rollup/pluginutils@5.1.0(rollup@4.28.0): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2329,147 +2329,147 @@ packages: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 4.27.4 + rollup: 4.28.0 dev: true - /@rollup/rollup-android-arm-eabi@4.27.4: - resolution: {integrity: sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw==} + /@rollup/rollup-android-arm-eabi@4.28.0: + resolution: {integrity: sha512-wLJuPLT6grGZsy34g4N1yRfYeouklTgPhH1gWXCYspenKYD0s3cR99ZevOGw5BexMNywkbV3UkjADisozBmpPQ==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.27.4: - resolution: {integrity: sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA==} + /@rollup/rollup-android-arm64@4.28.0: + resolution: {integrity: sha512-eiNkznlo0dLmVG/6wf+Ifi/v78G4d4QxRhuUl+s8EWZpDewgk7PX3ZyECUXU0Zq/Ca+8nU8cQpNC4Xgn2gFNDA==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.27.4: - resolution: {integrity: sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q==} + /@rollup/rollup-darwin-arm64@4.28.0: + resolution: {integrity: sha512-lmKx9yHsppblnLQZOGxdO66gT77bvdBtr/0P+TPOseowE7D9AJoBw8ZDULRasXRWf1Z86/gcOdpBrV6VDUY36Q==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.27.4: - resolution: {integrity: sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ==} + /@rollup/rollup-darwin-x64@4.28.0: + resolution: {integrity: sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-freebsd-arm64@4.27.4: - resolution: {integrity: sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw==} + /@rollup/rollup-freebsd-arm64@4.28.0: + resolution: {integrity: sha512-lA1zZB3bFx5oxu9fYud4+g1mt+lYXCoch0M0V/xhqLoGatbzVse0wlSQ1UYOWKpuSu3gyN4qEc0Dxf/DII1bhQ==} cpu: [arm64] os: [freebsd] requiresBuild: true dev: true optional: true - /@rollup/rollup-freebsd-x64@4.27.4: - resolution: {integrity: sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA==} + /@rollup/rollup-freebsd-x64@4.28.0: + resolution: {integrity: sha512-aI2plavbUDjCQB/sRbeUZWX9qp12GfYkYSJOrdYTL/C5D53bsE2/nBPuoiJKoWp5SN78v2Vr8ZPnB+/VbQ2pFA==} cpu: [x64] os: [freebsd] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.27.4: - resolution: {integrity: sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w==} + /@rollup/rollup-linux-arm-gnueabihf@4.28.0: + resolution: {integrity: sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-musleabihf@4.27.4: - resolution: {integrity: sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A==} + /@rollup/rollup-linux-arm-musleabihf@4.28.0: + resolution: {integrity: sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.27.4: - resolution: {integrity: sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg==} + /@rollup/rollup-linux-arm64-gnu@4.28.0: + resolution: {integrity: sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.27.4: - resolution: {integrity: sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA==} + /@rollup/rollup-linux-arm64-musl@4.28.0: + resolution: {integrity: sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.27.4: - resolution: {integrity: sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ==} + /@rollup/rollup-linux-powerpc64le-gnu@4.28.0: + resolution: {integrity: sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ==} cpu: [ppc64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.27.4: - resolution: {integrity: sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw==} + /@rollup/rollup-linux-riscv64-gnu@4.28.0: + resolution: {integrity: sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-s390x-gnu@4.27.4: - resolution: {integrity: sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg==} + /@rollup/rollup-linux-s390x-gnu@4.28.0: + resolution: {integrity: sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw==} cpu: [s390x] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.27.4: - resolution: {integrity: sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q==} + /@rollup/rollup-linux-x64-gnu@4.28.0: + resolution: {integrity: sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.27.4: - resolution: {integrity: sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw==} + /@rollup/rollup-linux-x64-musl@4.28.0: + resolution: {integrity: sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.27.4: - resolution: {integrity: sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A==} + /@rollup/rollup-win32-arm64-msvc@4.28.0: + resolution: {integrity: sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.27.4: - resolution: {integrity: sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ==} + /@rollup/rollup-win32-ia32-msvc@4.28.0: + resolution: {integrity: sha512-kN/Vpip8emMLn/eOza+4JwqDZBL6MPNpkdaEsgUtW1NYN3DZvZqSQrbKzJcTL6hd8YNmFTn7XGWMwccOcJBL0A==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.27.4: - resolution: {integrity: sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug==} + /@rollup/rollup-win32-x64-msvc@4.28.0: + resolution: {integrity: sha512-Bvno2/aZT6usSa7lRDL2+hMjVAGjuqaymF1ApZm31JXzniR/hvr14jpU+/z4X6Gt5BPlzosscyJZGUvguXIqeQ==} cpu: [x64] os: [win32] requiresBuild: true @@ -8439,7 +8439,7 @@ packages: package-json-from-dist: 1.0.0 dev: true - /rollup-plugin-dts@6.1.1(rollup@4.27.4)(typescript@5.7.2): + /rollup-plugin-dts@6.1.1(rollup@4.28.0)(typescript@5.7.2): resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} engines: {node: '>=16'} peerDependencies: @@ -8447,37 +8447,37 @@ packages: typescript: ^4.5 || ^5.0 dependencies: magic-string: 0.30.10 - rollup: 4.27.4 + rollup: 4.28.0 typescript: 5.7.2 optionalDependencies: '@babel/code-frame': 7.26.2 dev: true - /rollup@4.27.4: - resolution: {integrity: sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw==} + /rollup@4.28.0: + resolution: {integrity: sha512-G9GOrmgWHBma4YfCcX8PjH0qhXSdH8B4HDE2o4/jaxj93S4DPCIDoLcXz99eWMji4hB29UFCEd7B2gwGJDR9cQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.27.4 - '@rollup/rollup-android-arm64': 4.27.4 - '@rollup/rollup-darwin-arm64': 4.27.4 - '@rollup/rollup-darwin-x64': 4.27.4 - '@rollup/rollup-freebsd-arm64': 4.27.4 - '@rollup/rollup-freebsd-x64': 4.27.4 - '@rollup/rollup-linux-arm-gnueabihf': 4.27.4 - '@rollup/rollup-linux-arm-musleabihf': 4.27.4 - '@rollup/rollup-linux-arm64-gnu': 4.27.4 - '@rollup/rollup-linux-arm64-musl': 4.27.4 - '@rollup/rollup-linux-powerpc64le-gnu': 4.27.4 - '@rollup/rollup-linux-riscv64-gnu': 4.27.4 - '@rollup/rollup-linux-s390x-gnu': 4.27.4 - '@rollup/rollup-linux-x64-gnu': 4.27.4 - '@rollup/rollup-linux-x64-musl': 4.27.4 - '@rollup/rollup-win32-arm64-msvc': 4.27.4 - '@rollup/rollup-win32-ia32-msvc': 4.27.4 - '@rollup/rollup-win32-x64-msvc': 4.27.4 + '@rollup/rollup-android-arm-eabi': 4.28.0 + '@rollup/rollup-android-arm64': 4.28.0 + '@rollup/rollup-darwin-arm64': 4.28.0 + '@rollup/rollup-darwin-x64': 4.28.0 + '@rollup/rollup-freebsd-arm64': 4.28.0 + '@rollup/rollup-freebsd-x64': 4.28.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.28.0 + '@rollup/rollup-linux-arm-musleabihf': 4.28.0 + '@rollup/rollup-linux-arm64-gnu': 4.28.0 + '@rollup/rollup-linux-arm64-musl': 4.28.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.28.0 + '@rollup/rollup-linux-riscv64-gnu': 4.28.0 + '@rollup/rollup-linux-s390x-gnu': 4.28.0 + '@rollup/rollup-linux-x64-gnu': 4.28.0 + '@rollup/rollup-linux-x64-musl': 4.28.0 + '@rollup/rollup-win32-arm64-msvc': 4.28.0 + '@rollup/rollup-win32-ia32-msvc': 4.28.0 + '@rollup/rollup-win32-x64-msvc': 4.28.0 fsevents: 2.3.3 dev: true diff --git a/stake-pool/js/package.json b/stake-pool/js/package.json index db27be5322b..0428874603e 100644 --- a/stake-pool/js/package.json +++ b/stake-pool/js/package.json @@ -69,7 +69,7 @@ "eslint": "^8.57.0", "jest": "^29.0.0", "rimraf": "^6.0.1", - "rollup": "^4.27.4", + "rollup": "^4.28.0", "rollup-plugin-dts": "^6.1.1", "ts-jest": "^29.2.5", "typescript": "^5.7.2" diff --git a/token-lending/js/package.json b/token-lending/js/package.json index f3416b1579d..278358910cc 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -52,7 +52,7 @@ "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", "gh-pages": "^6.2.0", - "rollup": "^4.27.4", + "rollup": "^4.28.0", "ts-node": "^10.9.2", "tslib": "^2.8.1", "typedoc": "^0.27.2", From d544111b4cc193394b9bb00ac3e1482bb08a5fa0 Mon Sep 17 00:00:00 2001 From: Jon C Date: Mon, 2 Dec 2024 15:50:09 +0100 Subject: [PATCH 36/52] memo: Remove local program / client and point to new repo (#7535) memo: Remove local programs and point to new repo #### Problem The memo program and clients now live at their own repo, but the code still exists in the SPL repo. #### Summary of changes * Update documentation for the memo program's new home * Remove program directory, update Rust dependencies to crates.io version * Remove JS bindings * Remove CI files --- .github/workflows/pull-request-js.yml | 3 - .github/workflows/pull-request-memo.yml | 81 ---------- Anchor.toml | 1 - Cargo.lock | 4 +- Cargo.toml | 1 - README.md | 12 +- SECURITY.md | 2 +- ci/js-test-memo.sh | 14 -- coverage.sh | 1 - docs/src/memo.md | 2 +- memo/README.md | 3 + memo/js/.editorconfig | 9 -- memo/js/.eslintignore | 5 - memo/js/.eslintrc | 32 ---- memo/js/.gitignore | 13 -- memo/js/.nojekyll | 0 memo/js/LICENSE | 203 ----------------------- memo/js/README.md | 51 ------ memo/js/jest.config.ts | 7 - memo/js/package.json | 74 --------- memo/js/src/index.ts | 38 ----- memo/js/test/e2e/transaction.test.ts | 17 -- memo/js/test/unit/index.test.ts | 41 ----- memo/js/tsconfig.all.json | 11 -- memo/js/tsconfig.base.json | 14 -- memo/js/tsconfig.cjs.json | 10 -- memo/js/tsconfig.esm.json | 13 -- memo/js/tsconfig.json | 8 - memo/js/tsconfig.root.json | 6 - memo/js/typedoc.json | 5 - memo/program/Cargo.toml | 30 ---- memo/program/Xargo.toml | 2 - memo/program/program-id.md | 1 - memo/program/src/entrypoint.rs | 17 -- memo/program/src/lib.rs | 58 ------- memo/program/src/processor.rs | 107 ------------ memo/program/tests/functional.rs | 207 ------------------------ package.json | 1 - pnpm-lock.yaml | 77 ++------- pnpm-workspace.yaml | 1 - token/cli/Cargo.toml | 4 +- token/client/Cargo.toml | 4 +- token/program-2022-test/Cargo.toml | 4 +- token/program-2022/Cargo.toml | 2 +- utils/test-client/Cargo.toml | 2 +- 45 files changed, 32 insertions(+), 1166 deletions(-) delete mode 100644 .github/workflows/pull-request-memo.yml delete mode 100755 ci/js-test-memo.sh delete mode 100644 memo/js/.editorconfig delete mode 100644 memo/js/.eslintignore delete mode 100644 memo/js/.eslintrc delete mode 100644 memo/js/.gitignore delete mode 100644 memo/js/.nojekyll delete mode 100644 memo/js/LICENSE delete mode 100644 memo/js/README.md delete mode 100644 memo/js/jest.config.ts delete mode 100644 memo/js/package.json delete mode 100644 memo/js/src/index.ts delete mode 100644 memo/js/test/e2e/transaction.test.ts delete mode 100644 memo/js/test/unit/index.test.ts delete mode 100644 memo/js/tsconfig.all.json delete mode 100644 memo/js/tsconfig.base.json delete mode 100644 memo/js/tsconfig.cjs.json delete mode 100644 memo/js/tsconfig.esm.json delete mode 100644 memo/js/tsconfig.json delete mode 100644 memo/js/tsconfig.root.json delete mode 100644 memo/js/typedoc.json delete mode 100644 memo/program/Cargo.toml delete mode 100644 memo/program/Xargo.toml delete mode 100644 memo/program/program-id.md delete mode 100644 memo/program/src/entrypoint.rs delete mode 100644 memo/program/src/lib.rs delete mode 100644 memo/program/src/processor.rs delete mode 100644 memo/program/tests/functional.rs diff --git a/.github/workflows/pull-request-js.yml b/.github/workflows/pull-request-js.yml index 32f7d156675..f75ef69e438 100644 --- a/.github/workflows/pull-request-js.yml +++ b/.github/workflows/pull-request-js.yml @@ -5,7 +5,6 @@ on: paths: - 'account-compression/sdk/**' - 'libraries/type-length-value/js/**' - - 'memo/js/**' - 'name-service/js/**' - 'single-pool/js/**' - 'stake-pool/js/**' @@ -21,7 +20,6 @@ on: paths: - 'account-compression/sdk/**' - 'libraries/type-length-value/js/**' - - 'memo/js/**' - 'single-pool/js/**' - 'stake-pool/js/**' - 'token/js/**' @@ -43,7 +41,6 @@ jobs: node-version: [16.x, 18.x, 20.x] package: [ - memo, name-service, stake-pool, token, diff --git a/.github/workflows/pull-request-memo.yml b/.github/workflows/pull-request-memo.yml deleted file mode 100644 index 0c97a20b8bc..00000000000 --- a/.github/workflows/pull-request-memo.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Memo Pull Request - -on: - pull_request: - paths: - - 'memo/**' - - 'ci/*-version.sh' - - '!memo/js/**' - push: - branches: [master] - paths: - - 'memo/**' - - 'ci/*-version.sh' - - '!memo/js/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - cargo-test-sbf: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set env vars - run: | - source ci/rust-version.sh - echo "RUST_STABLE=$rust_stable" >> $GITHUB_ENV - source ci/solana-version.sh - echo "SOLANA_VERSION=$solana_version" >> $GITHUB_ENV - - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.RUST_STABLE }} - - - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: cargo-build-${{ hashFiles('**/Cargo.lock') }}-${{ env.RUST_STABLE}} - - - uses: actions/cache@v4 - with: - path: | - ~/.cargo/bin/rustfilt - key: cargo-sbf-bins-${{ runner.os }} - - - uses: actions/cache@v4 - with: - path: ~/.cache/solana - key: solana-${{ env.SOLANA_VERSION }} - - - name: Install dependencies - run: | - ./ci/install-build-deps.sh - ./ci/install-program-deps.sh - echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - - - name: Build and test - run: ./ci/cargo-test-sbf.sh memo - - js-test: - runs-on: ubuntu-latest - env: - NODE_VERSION: 16.x - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - - uses: pnpm/action-setup@v4 - - uses: actions/cache@v4 - with: - path: ~/.npm - key: node-${{ hashFiles('pnpm-lock.yaml') }} - restore-keys: | - node- - - run: ./ci/js-test-memo.sh diff --git a/Anchor.toml b/Anchor.toml index a7999972431..e8bd9dfc048 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -6,7 +6,6 @@ solana_version = "2.1.0" members = [ "governance/program", "governance/chat/program", - "memo/program", "stake-pool/program", "token/program", "token/program-2022", diff --git a/Cargo.lock b/Cargo.lock index 4ab18134531..7333341ad13 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8168,15 +8168,15 @@ dependencies = [ [[package]] name = "spl-memo" version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f09647c0974e33366efeb83b8e2daebb329f0420149e74d3a4bd2c08cf9f7cb" dependencies = [ "solana-account-info", "solana-instruction", "solana-msg", "solana-program-entrypoint", "solana-program-error", - "solana-program-test", "solana-pubkey", - "solana-sdk", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index df80da2c754..5b93b9a2544 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,6 @@ members = [ "libraries/tlv-account-resolution", "libraries/type-length-value", "libraries/type-length-value-derive-test", - "memo/program", "name-service/program", "managed-token/program", "record/program", diff --git a/README.md b/README.md index d98f488f3d6..2a88a26c616 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ the Solana Mainnet Beta. Currently, this includes: | [shared-memory](https://github.com/solana-labs/solana-program-library/tree/master/shared-memory/program) | [1.0.0](https://github.com/solana-labs/solana-program-library/commit/b40e0dd3fd6c0e509dc1e8dd3da0a6d609035bbd) | | [feature-proposal](https://github.com/solana-labs/solana-program-library/tree/master/feature-proposal/program) | [1.0.0](https://github.com/solana-labs/solana-program-library/releases/tag/feature-proposal-v1.0.0) | | [name-service](https://github.com/solana-labs/solana-program-library/tree/master/name-service/program) | [0.3.0](https://github.com/solana-labs/solana-program-library/releases/tag/name-service-v0.3.0) | -| [memo](https://github.com/solana-labs/solana-program-library/tree/master/memo/program) | [3.0.0](https://github.com/solana-labs/solana-program-library/releases/tag/memo-v3.0.0) | +| [memo](https://github.com/solana-program/memo/tree/master/program) | [3.0.0](https://github.com/solana-labs/solana-program-library/releases/tag/memo-v3.0.0) | In addition, one program is planned for deployment to Solana Mainnet Beta: @@ -57,7 +57,6 @@ unaudited programs: * [feature-proposal](https://github.com/solana-labs/solana-program-library/tree/master/feature-proposal/program) * [instruction-padding](https://github.com/solana-labs/solana-program-library/tree/master/instruction-padding/program) * [managed-token](https://github.com/solana-labs/solana-program-library/tree/master/managed-token/program) -* [memo](https://github.com/solana-labs/solana-program-library/tree/master/memo/program) * [name-service](https://github.com/solana-labs/solana-program-library/tree/master/name-service/program) * [record](https://github.com/solana-labs/solana-program-library/tree/master/record/program) * [stateless-asks](https://github.com/solana-labs/solana-program-library/tree/master/stateless-asks/program) @@ -71,6 +70,13 @@ More information about the repository's security policy at The [security-audits repo](https://github.com/solana-labs/security-audits) contains all past and present program audits. +## Migrated Packages + +The Solana Program Library repository is being broken up into separate repos for +each program and set of clients. The following programs have been moved: + +* [Memo](https://github.com/solana-program/memo) + ## Program Packages | Package | Description | Version | Docs | @@ -82,7 +88,6 @@ all past and present program audits. | `spl-account-compression` | Program for managing compressed accounts stored in an off-chain merkle tree | [![Crates.io](https://img.shields.io/crates/v/spl-account-compression)](https://crates.io/crates/spl-account-compression) | [![Docs.rs](https://docs.rs/spl-account-compression/badge.svg)](https://docs.rs/spl-account-compression) | | `spl-feature-proposal` | Program using tokens to vote on enabling Solana network features | [![Crates.io](https://img.shields.io/crates/v/spl-feature-proposal)](https://crates.io/crates/spl-feature-proposal) | [![Docs.rs](https://docs.rs/spl-feature-proposal/badge.svg)](https://docs.rs/spl-feature-proposal) | | `spl-noop` | Program that does nothing, used for logging instruction data | [![Crates.io](https://img.shields.io/crates/v/spl-noop)](https://crates.io/crates/spl-noop) | [![Docs.rs](https://docs.rs/spl-noop/badge.svg)](https://docs.rs/spl-noop) | -| `spl-memo` | Program for logging signed memos on-chain | [![Crates.io](https://img.shields.io/crates/v/spl-memo)](https://crates.io/crates/spl-memo) | [![Docs.rs](https://docs.rs/spl-memo/badge.svg)](https://docs.rs/spl-memo) | | `spl-name-service` | Program for managing ownership of data on-chain | [![Crates.io](https://img.shields.io/crates/v/spl-name-service)](https://crates.io/crates/spl-name-service) | [![Docs.rs](https://docs.rs/spl-name-service/badge.svg)](https://docs.rs/spl-name-service) | | `spl-shared-memory` | Program for sharing data between programs | [![Crates.io](https://img.shields.io/crates/v/spl-shared-memory)](https://crates.io/crates/spl-shared-memory) | [![Docs.rs](https://docs.rs/spl-shared-memory/badge.svg)](https://docs.rs/spl-shared-memory) | | `spl-stake-pool` | Program for pooling stake accounts, managed by another entity | [![Crates.io](https://img.shields.io/crates/v/spl-stake-pool)](https://crates.io/crates/spl-stake-pool) | [![Docs.rs](https://docs.rs/spl-stake-pool/badge.svg)](https://docs.rs/spl-stake-pool) | @@ -110,7 +115,6 @@ all past and present program audits. | `@solana/spl-token` | Bindings for the token, token-2022, and associated-token-account programs | [![npm](https://img.shields.io/npm/v/@solana/spl-token.svg)](https://www.npmjs.com/package/@solana/spl-token) | [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://solana-labs.github.io/solana-program-library/token/js) | | `@solana/spl-governance` | Bindings for the governance program | [![npm](https://img.shields.io/npm/v/@solana/spl-governance.svg)](https://www.npmjs.com/package/@solana/spl-governance) | N/A | | `@solana/spl-account-compression` | Bindings for the account-compression program | [![npm](https://img.shields.io/npm/v/@solana/spl-account-compression.svg)](https://www.npmjs.com/package/@solana/spl-account-compression) | [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://solana-labs.github.io/solana-program-library/account-compression/sdk/docs) | -| `@solana/spl-memo` | Bindings for the memo program | [![npm](https://img.shields.io/npm/v/@solana/spl-memo.svg)](https://www.npmjs.com/package/@solana/spl-memo) | N/A | | `@solana/spl-name-service` | Bindings for the name-service program | [![npm](https://img.shields.io/npm/v/@solana/spl-name-service.svg)](https://www.npmjs.com/package/@solana/spl-name-service) | N/A | | `@solana/spl-stake-pool` | Bindings for the stake-pool program | [![npm](https://img.shields.io/npm/v/@solana/spl-stake-pool.svg)](https://www.npmjs.com/package/@solana/spl-stake-pool) | N/A | | `@solana/spl-token-lending` | Bindings for the token-lending program | [![npm](https://img.shields.io/npm/v/@solana/spl-token-lending.svg)](https://www.npmjs.com/package/@solana/spl-token-lending) | N/A | diff --git a/SECURITY.md b/SECURITY.md index d08589f9d82..91e69bcda73 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -47,7 +47,7 @@ the Solana Mainnet Beta. Currently, this includes: * [associated-token-account](https://github.com/solana-labs/solana-program-library/tree/master/associated-token-account/program) * [feature-proposal](https://github.com/solana-labs/solana-program-library/tree/master/feature-proposal/program) * [governance](https://github.com/solana-labs/solana-program-library/tree/master/governance/program) -* [memo](https://github.com/solana-labs/solana-program-library/tree/master/memo/program) +* [memo](https://github.com/solana-program/memo) * [name-service](https://github.com/solana-labs/solana-program-library/tree/master/name-service/program) * [stake-pool](https://github.com/solana-labs/solana-program-library/tree/master/stake-pool/program) * [token](https://github.com/solana-labs/solana-program-library/tree/master/token/program) diff --git a/ci/js-test-memo.sh b/ci/js-test-memo.sh deleted file mode 100755 index 3496f8d3f65..00000000000 --- a/ci/js-test-memo.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -set -e -cd "$(dirname "$0")/.." -source ./ci/solana-version.sh install - -set -x -pnpm install -pnpm format - -cd memo/js -pnpm lint -pnpm build -pnpm test diff --git a/coverage.sh b/coverage.sh index e2923813d81..cb12b4b493a 100755 --- a/coverage.sh +++ b/coverage.sh @@ -22,7 +22,6 @@ reportName="lcov-${CI_COMMIT:0:9}" if [[ -z $1 ]]; then programs=( libraries/math - memo/program token/program token-lending/program token-swap/program diff --git a/docs/src/memo.md b/docs/src/memo.md index 00748522573..95bbd49d881 100644 --- a/docs/src/memo.md +++ b/docs/src/memo.md @@ -20,7 +20,7 @@ document are available at: ## Source The Memo Program's source is available on -[GitHub](https://github.com/solana-labs/solana-program-library) +[GitHub](https://github.com/solana-program/memo) ## Interface diff --git a/memo/README.md b/memo/README.md index e195553d405..71ece75d71f 100644 --- a/memo/README.md +++ b/memo/README.md @@ -1,3 +1,6 @@ +NOTE: The memo program and clients are now maintained at +[solana-program/memo](https://github.com/solana-program/memo). + # Memo Program A simple program that validates a string of UTF-8 encoded characters and logs it diff --git a/memo/js/.editorconfig b/memo/js/.editorconfig deleted file mode 100644 index 3e10c03d05b..00000000000 --- a/memo/js/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 4 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true \ No newline at end of file diff --git a/memo/js/.eslintignore b/memo/js/.eslintignore deleted file mode 100644 index 6da325effab..00000000000 --- a/memo/js/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -docs -lib -test-ledger - -package-lock.json diff --git a/memo/js/.eslintrc b/memo/js/.eslintrc deleted file mode 100644 index 0a82d0c7b1a..00000000000 --- a/memo/js/.eslintrc +++ /dev/null @@ -1,32 +0,0 @@ -{ - "root": true, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended", - "plugin:require-extensions/recommended" - ], - "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint", - "prettier", - "require-extensions" - ], - "rules": { - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/consistent-type-imports": "error" - }, - "overrides": [ - { - "files": [ - "test/**/*" - ], - "rules": { - "require-extensions/require-extensions": "off" - } - } - ] -} diff --git a/memo/js/.gitignore b/memo/js/.gitignore deleted file mode 100644 index 21f33db819c..00000000000 --- a/memo/js/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -.idea -.vscode -.DS_Store - -node_modules - -pnpm-lock.yaml -yarn.lock - -docs -lib -test-ledger -*.tsbuildinfo diff --git a/memo/js/.nojekyll b/memo/js/.nojekyll deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/memo/js/LICENSE b/memo/js/LICENSE deleted file mode 100644 index 6b0b1270ff0..00000000000 --- a/memo/js/LICENSE +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/memo/js/README.md b/memo/js/README.md deleted file mode 100644 index 2dc078f3ce6..00000000000 --- a/memo/js/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# `@solana/spl-memo` - -A TypeScript library for interacting with the SPL Memo program. - -## Links - -- [TypeScript Docs](https://solana-labs.github.io/solana-program-library/memo/js/) -- [Install](#install) -- [Build from Source](#build-from-source) - -## Install - -```shell -npm install --save @solana/spl-memo @solana/web3.js@1 -``` -_OR_ -```shell -yarn add @solana/spl-memo @solana/web3.js@1 -``` - -## Build from Source - -0. Prerequisites - -* Node 16+ -* NPM 8+ - -1. Clone the project: -```shell -git clone https://github.com/solana-labs/solana-program-library.git -``` - -2. Navigate to the library: -```shell -cd solana-program-library/memo/js -``` - -3. Install the dependencies: -```shell -npm install -``` - -4. Build the library: -```shell -npm run build -``` - -5. Run the tests: -```shell -npm run test -``` diff --git a/memo/js/jest.config.ts b/memo/js/jest.config.ts deleted file mode 100644 index 586fb9fe3d1..00000000000 --- a/memo/js/jest.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { JestConfigWithTsJest } from 'ts-jest'; - -const jestConfig: JestConfigWithTsJest = { - preset: 'ts-jest/presets/default-esm', -}; - -export default jestConfig; diff --git a/memo/js/package.json b/memo/js/package.json deleted file mode 100644 index adf78becc0d..00000000000 --- a/memo/js/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "@solana/spl-memo", - "description": "SPL Memo Program JS API", - "version": "0.2.4", - "author": "Solana Labs Maintainers ", - "repository": "https://github.com/solana-labs/solana-program-library", - "license": "Apache-2.0", - "type": "module", - "sideEffects": false, - "engines": { - "node": ">=16" - }, - "files": [ - "lib", - "src", - "LICENSE", - "README.md" - ], - "publishConfig": { - "access": "public" - }, - "main": "./lib/cjs/index.js", - "module": "./lib/esm/index.js", - "types": "./lib/types/index.d.ts", - "exports": { - "types": "./lib/types/index.d.ts", - "require": "./lib/cjs/index.js", - "import": "./lib/esm/index.js" - }, - "scripts": { - "nuke": "shx rm -rf node_modules package-lock.json || true", - "reinstall": "npm run nuke && npm install", - "clean": "shx rm -rf lib **/*.tsbuildinfo || true", - "build": "tsc --build --verbose tsconfig.all.json", - "postbuild": "shx echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", - "watch": "tsc --build --verbose --watch tsconfig.all.json", - "release": "npm run clean && npm run build", - "lint": "eslint --max-warnings 0 .", - "lint:fix": "eslint --fix .", - "test": "npm run test:unit && npm run test:e2e", - "test:unit": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest test/unit", - "test:e2e": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" start-server-and-test 'solana-test-validator -r -q' http://127.0.0.1:8899/health 'jest test/e2e'", - "deploy": "npm run deploy:docs", - "docs": "shx rm -rf docs && typedoc && shx cp .nojekyll docs/", - "deploy:docs": "npm run docs && gh-pages --dest memo/js --dist docs --dotfiles" - }, - "peerDependencies": { - "@solana/web3.js": "^1.95.5" - }, - "dependencies": { - "buffer": "^6.0.3" - }, - "devDependencies": { - "@solana/web3.js": "^1.95.5", - "@types/chai": "^5.0.1", - "@types/jest": "^29.5.14", - "@types/node": "^22.10.1", - "@types/node-fetch": "^2.6.12", - "@typescript-eslint/eslint-plugin": "^8.4.0", - "@typescript-eslint/parser": "^8.4.0", - "chai": "^5.1.2", - "eslint": "^8.57.0", - "eslint-plugin-require-extensions": "^0.1.1", - "gh-pages": "^6.2.0", - "jest": "^29.0.0", - "process": "^0.11.10", - "shx": "^0.3.4", - "start-server-and-test": "^2.0.8", - "ts-jest": "^29.2.5", - "ts-node": "^10.9.2", - "typedoc": "^0.27.2", - "typescript": "^5.7.2" - } -} diff --git a/memo/js/src/index.ts b/memo/js/src/index.ts deleted file mode 100644 index 67f2c12aa43..00000000000 --- a/memo/js/src/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Buffer } from 'buffer'; -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; - -export const MEMO_PROGRAM_ID: PublicKey = new PublicKey('MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr'); - -/** - * Creates and returns an instruction which validates a string of UTF-8 - * encoded characters and verifies that any accounts provided are signers of - * the transaction. The program also logs the memo, as well as any verified - * signer addresses, to the transaction log, so that anyone can easily observe - * memos and know they were approved by zero or more addresses by inspecting - * the transaction log from a trusted provider. - * - * Public keys passed in via the signerPubkeys will identify Signers which - * must subsequently sign the Transaction including the returned - * TransactionInstruction in order for the transaction to be valid. - * - * @param memo The UTF-8 encoded memo string to validate - * @param signerPubkeys An array of public keys which must sign the - * Transaction including the returned TransactionInstruction in order - * for the transaction to be valid and the memo verification to - * succeed. null is allowed if there are no signers for the memo - * verification. - **/ -export function createMemoInstruction(memo: string, signerPubkeys?: Array): TransactionInstruction { - const keys = - signerPubkeys == null - ? [] - : signerPubkeys.map(function (key) { - return { pubkey: key, isSigner: true, isWritable: false }; - }); - - return new TransactionInstruction({ - keys: keys, - programId: MEMO_PROGRAM_ID, - data: Buffer.from(memo, 'utf8'), - }); -} diff --git a/memo/js/test/e2e/transaction.test.ts b/memo/js/test/e2e/transaction.test.ts deleted file mode 100644 index 0d7cd62871c..00000000000 --- a/memo/js/test/e2e/transaction.test.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { createMemoInstruction } from '../../src/index'; -import { Connection, Keypair, Transaction, LAMPORTS_PER_SOL, sendAndConfirmTransaction } from '@solana/web3.js'; - -test('transaction: live', async () => { - const url = 'http://127.0.0.1:8899'; - const connection = new Connection(url, 'confirmed'); - await connection.getVersion(); - const signer = new Keypair(); // also fee-payer - - const airdropSignature = await connection.requestAirdrop(signer.publicKey, LAMPORTS_PER_SOL / 10); - await connection.confirmTransaction(airdropSignature, 'confirmed'); - - const memoTx = new Transaction().add(createMemoInstruction('this is a test memo', [signer.publicKey])); - await sendAndConfirmTransaction(connection, memoTx, [signer], { - preflightCommitment: 'confirmed', - }); -}); diff --git a/memo/js/test/unit/index.test.ts b/memo/js/test/unit/index.test.ts deleted file mode 100644 index 94f3309056a..00000000000 --- a/memo/js/test/unit/index.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { createMemoInstruction, MEMO_PROGRAM_ID } from '../../src/index'; -import { expect } from 'chai'; -import { Keypair } from '@solana/web3.js'; - -test('instruction: no signers', () => { - const ix = createMemoInstruction('this is a test memo', []); - expect(ix.programId).to.eql(MEMO_PROGRAM_ID); - expect(ix.keys).to.have.length(0); - expect(ix.data).to.have.length(19); - - const ix2 = createMemoInstruction('this is a test'); - expect(ix2.programId).to.eql(MEMO_PROGRAM_ID); - expect(ix2.keys).to.have.length(0); - expect(ix2.data).to.have.length(14); -}); - -test('instruction: one signer', () => { - const signer = new Keypair(); - const ix = createMemoInstruction('this is a test memo', [signer.publicKey]); - expect(ix.programId).to.eql(MEMO_PROGRAM_ID); - expect(ix.keys).to.have.length(1); - expect(ix.data).to.have.length(19); -}); - -test('instruction: many signers', () => { - const signer0 = new Keypair(); - const signer1 = new Keypair(); - const signer2 = new Keypair(); - const signer3 = new Keypair(); - const signer4 = new Keypair(); - const ix = createMemoInstruction('this is a test memo', [ - signer0.publicKey, - signer1.publicKey, - signer2.publicKey, - signer3.publicKey, - signer4.publicKey, - ]); - expect(ix.programId).to.eql(MEMO_PROGRAM_ID); - expect(ix.keys).to.have.length(5); - expect(ix.data).to.have.length(19); -}); diff --git a/memo/js/tsconfig.all.json b/memo/js/tsconfig.all.json deleted file mode 100644 index 985513259e2..00000000000 --- a/memo/js/tsconfig.all.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.root.json", - "references": [ - { - "path": "./tsconfig.cjs.json" - }, - { - "path": "./tsconfig.esm.json" - } - ] -} diff --git a/memo/js/tsconfig.base.json b/memo/js/tsconfig.base.json deleted file mode 100644 index 90620c4e485..00000000000 --- a/memo/js/tsconfig.base.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include": [], - "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "Node", - "esModuleInterop": true, - "isolatedModules": true, - "noEmitOnError": true, - "resolveJsonModule": true, - "strict": true, - "stripInternal": true - } -} diff --git a/memo/js/tsconfig.cjs.json b/memo/js/tsconfig.cjs.json deleted file mode 100644 index 2db9b71569e..00000000000 --- a/memo/js/tsconfig.cjs.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "include": ["src"], - "compilerOptions": { - "outDir": "lib/cjs", - "target": "ES2016", - "module": "CommonJS", - "sourceMap": true - } -} diff --git a/memo/js/tsconfig.esm.json b/memo/js/tsconfig.esm.json deleted file mode 100644 index 25e7e25e751..00000000000 --- a/memo/js/tsconfig.esm.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "include": ["src"], - "compilerOptions": { - "outDir": "lib/esm", - "declarationDir": "lib/types", - "target": "ES2020", - "module": "ES2020", - "sourceMap": true, - "declaration": true, - "declarationMap": true - } -} diff --git a/memo/js/tsconfig.json b/memo/js/tsconfig.json deleted file mode 100644 index 2f9b239bfca..00000000000 --- a/memo/js/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig.all.json", - "include": ["src", "test"], - "compilerOptions": { - "noEmit": true, - "skipLibCheck": true - } -} diff --git a/memo/js/tsconfig.root.json b/memo/js/tsconfig.root.json deleted file mode 100644 index fadf294ab43..00000000000 --- a/memo/js/tsconfig.root.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "composite": true - } -} diff --git a/memo/js/typedoc.json b/memo/js/typedoc.json deleted file mode 100644 index c39fc53aee1..00000000000 --- a/memo/js/typedoc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "entryPoints": ["src/index.ts"], - "out": "docs", - "readme": "README.md" -} diff --git a/memo/program/Cargo.toml b/memo/program/Cargo.toml deleted file mode 100644 index 7631d51b9a1..00000000000 --- a/memo/program/Cargo.toml +++ /dev/null @@ -1,30 +0,0 @@ -[package] -name = "spl-memo" -version = "6.0.0" -description = "Solana Program Library Memo" -authors = ["Solana Labs Maintainers "] -repository = "https://github.com/solana-labs/solana-program-library" -license = "Apache-2.0" -edition = "2021" - -[features] -no-entrypoint = [] -test-sbf = [] - -[dependencies] -solana-account-info = "2.1.0" -solana-instruction = "2.1.0" -solana-msg = "2.1.0" -solana-program-entrypoint = "2.1.0" -solana-program-error = "2.1.0" -solana-pubkey = "2.1.0" - -[dev-dependencies] -solana-program-test = "2.1.0" -solana-sdk = "2.1.0" - -[lib] -crate-type = ["cdylib", "lib"] - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] diff --git a/memo/program/Xargo.toml b/memo/program/Xargo.toml deleted file mode 100644 index 1744f098ae1..00000000000 --- a/memo/program/Xargo.toml +++ /dev/null @@ -1,2 +0,0 @@ -[target.bpfel-unknown-unknown.dependencies.std] -features = [] \ No newline at end of file diff --git a/memo/program/program-id.md b/memo/program/program-id.md deleted file mode 100644 index 284ff6d8137..00000000000 --- a/memo/program/program-id.md +++ /dev/null @@ -1 +0,0 @@ -MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr diff --git a/memo/program/src/entrypoint.rs b/memo/program/src/entrypoint.rs deleted file mode 100644 index 09ae9409615..00000000000 --- a/memo/program/src/entrypoint.rs +++ /dev/null @@ -1,17 +0,0 @@ -//! Program entrypoint - -#![cfg(not(feature = "no-entrypoint"))] - -use { - solana_account_info::AccountInfo, solana_program_entrypoint::ProgramResult, - solana_pubkey::Pubkey, -}; - -solana_program_entrypoint::entrypoint!(process_instruction); -fn process_instruction( - program_id: &Pubkey, - accounts: &[AccountInfo], - instruction_data: &[u8], -) -> ProgramResult { - crate::processor::process_instruction(program_id, accounts, instruction_data) -} diff --git a/memo/program/src/lib.rs b/memo/program/src/lib.rs deleted file mode 100644 index 898167a75e9..00000000000 --- a/memo/program/src/lib.rs +++ /dev/null @@ -1,58 +0,0 @@ -#![deny(missing_docs)] - -//! A program that accepts a string of encoded characters and verifies that it -//! parses, while verifying and logging signers. Currently handles UTF-8 -//! characters. - -mod entrypoint; -pub mod processor; - -// Export current sdk types for downstream users building with a different sdk -// version -pub use { - solana_account_info, solana_instruction, solana_msg, solana_program_entrypoint, - solana_program_error, solana_pubkey, -}; -use { - solana_instruction::{AccountMeta, Instruction}, - solana_pubkey::Pubkey, -}; - -/// Legacy symbols from Memo v1 -pub mod v1 { - solana_pubkey::declare_id!("Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo"); -} - -solana_pubkey::declare_id!("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"); - -/// Build a memo instruction, possibly signed -/// -/// Accounts expected by this instruction: -/// -/// 0. ..0+N. `[signer]` Expected signers; if zero provided, instruction will -/// be processed as a normal, unsigned spl-memo -pub fn build_memo(memo: &[u8], signer_pubkeys: &[&Pubkey]) -> Instruction { - Instruction { - program_id: id(), - accounts: signer_pubkeys - .iter() - .map(|&pubkey| AccountMeta::new_readonly(*pubkey, true)) - .collect(), - data: memo.to_vec(), - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_build_memo() { - let signer_pubkey = Pubkey::new_unique(); - let memo = "🐆".as_bytes(); - let instruction = build_memo(memo, &[&signer_pubkey]); - assert_eq!(memo, instruction.data); - assert_eq!(instruction.accounts.len(), 1); - assert_eq!(instruction.accounts[0].pubkey, signer_pubkey); - } -} diff --git a/memo/program/src/processor.rs b/memo/program/src/processor.rs deleted file mode 100644 index 618290ad9e6..00000000000 --- a/memo/program/src/processor.rs +++ /dev/null @@ -1,107 +0,0 @@ -//! Program state processor - -use { - solana_account_info::AccountInfo, solana_msg::msg, solana_program_entrypoint::ProgramResult, - solana_program_error::ProgramError, solana_pubkey::Pubkey, std::str::from_utf8, -}; - -/// Instruction processor -pub fn process_instruction( - _program_id: &Pubkey, - accounts: &[AccountInfo], - input: &[u8], -) -> ProgramResult { - let account_info_iter = &mut accounts.iter(); - let mut missing_required_signature = false; - for account_info in account_info_iter { - if let Some(address) = account_info.signer_key() { - msg!("Signed by {:?}", address); - } else { - missing_required_signature = true; - } - } - if missing_required_signature { - return Err(ProgramError::MissingRequiredSignature); - } - - let memo = from_utf8(input).map_err(|err| { - msg!("Invalid UTF-8, from byte {}", err.valid_up_to()); - ProgramError::InvalidInstructionData - })?; - msg!("Memo (len {}): {:?}", memo.len(), memo); - - Ok(()) -} - -#[cfg(test)] -mod tests { - use { - super::*, solana_account_info::IntoAccountInfo, solana_program_error::ProgramError, - solana_pubkey::Pubkey, solana_sdk::account::Account, - }; - - #[test] - fn test_utf8_memo() { - let program_id = Pubkey::new_from_array([0; 32]); - - let string = b"letters and such"; - assert_eq!(Ok(()), process_instruction(&program_id, &[], string)); - - let emoji = "🐆".as_bytes(); - let bytes = [0xF0, 0x9F, 0x90, 0x86]; - assert_eq!(emoji, bytes); - assert_eq!(Ok(()), process_instruction(&program_id, &[], emoji)); - - let mut bad_utf8 = bytes; - bad_utf8[3] = 0xFF; // Invalid UTF-8 byte - assert_eq!( - Err(ProgramError::InvalidInstructionData), - process_instruction(&program_id, &[], &bad_utf8) - ); - } - - #[test] - fn test_signers() { - let program_id = Pubkey::new_from_array([0; 32]); - let memo = "🐆".as_bytes(); - - let pubkey0 = Pubkey::new_unique(); - let pubkey1 = Pubkey::new_unique(); - let pubkey2 = Pubkey::new_unique(); - let mut account0 = Account::default(); - let mut account1 = Account::default(); - let mut account2 = Account::default(); - - let signed_account_infos = vec![ - (&pubkey0, true, &mut account0).into_account_info(), - (&pubkey1, true, &mut account1).into_account_info(), - (&pubkey2, true, &mut account2).into_account_info(), - ]; - assert_eq!( - Ok(()), - process_instruction(&program_id, &signed_account_infos, memo) - ); - - assert_eq!(Ok(()), process_instruction(&program_id, &[], memo)); - - let unsigned_account_infos = vec![ - (&pubkey0, false, &mut account0).into_account_info(), - (&pubkey1, false, &mut account1).into_account_info(), - (&pubkey2, false, &mut account2).into_account_info(), - ]; - assert_eq!( - Err(ProgramError::MissingRequiredSignature), - process_instruction(&program_id, &unsigned_account_infos, memo) - ); - - let partially_signed_account_infos = vec![ - (&pubkey0, true, &mut account0).into_account_info(), - (&pubkey1, false, &mut account1).into_account_info(), - (&pubkey2, true, &mut account2).into_account_info(), - ]; - assert_eq!( - Err(ProgramError::MissingRequiredSignature), - process_instruction(&program_id, &partially_signed_account_infos, memo) - ); - } -} diff --git a/memo/program/tests/functional.rs b/memo/program/tests/functional.rs deleted file mode 100644 index c8a05e1b1ed..00000000000 --- a/memo/program/tests/functional.rs +++ /dev/null @@ -1,207 +0,0 @@ -#![cfg(feature = "test-sbf")] - -use { - solana_instruction::{error::InstructionError, AccountMeta, Instruction}, - solana_program_test::*, - solana_pubkey::Pubkey, - solana_sdk::{ - signature::{Keypair, Signer}, - transaction::{Transaction, TransactionError}, - }, - spl_memo::*, -}; - -fn program_test() -> ProgramTest { - ProgramTest::new("spl_memo", id(), processor!(processor::process_instruction)) -} - -#[tokio::test] -async fn test_memo_signing() { - let memo = "🐆".as_bytes(); - let (banks_client, payer, recent_blockhash) = program_test().start().await; - - let keypairs = vec![Keypair::new(), Keypair::new(), Keypair::new()]; - let pubkeys: Vec = keypairs.iter().map(|keypair| keypair.pubkey()).collect(); - - // Test complete signing - let signer_key_refs: Vec<&Pubkey> = pubkeys.iter().collect(); - let mut transaction = - Transaction::new_with_payer(&[build_memo(memo, &signer_key_refs)], Some(&payer.pubkey())); - let mut signers = vec![&payer]; - for keypair in keypairs.iter() { - signers.push(keypair); - } - transaction.sign(&signers, recent_blockhash); - banks_client.process_transaction(transaction).await.unwrap(); - - // Test unsigned memo - let mut transaction = - Transaction::new_with_payer(&[build_memo(memo, &[])], Some(&payer.pubkey())); - transaction.sign(&[&payer], recent_blockhash); - banks_client.process_transaction(transaction).await.unwrap(); - - // Demonstrate success on signature provided, regardless of specific memo - // AccountMeta - let mut transaction = Transaction::new_with_payer( - &[Instruction { - program_id: id(), - accounts: vec![ - AccountMeta::new_readonly(keypairs[0].pubkey(), true), - AccountMeta::new_readonly(keypairs[1].pubkey(), true), - AccountMeta::new_readonly(payer.pubkey(), false), - ], - data: memo.to_vec(), - }], - Some(&payer.pubkey()), - ); - transaction.sign(&[&payer, &keypairs[0], &keypairs[1]], recent_blockhash); - banks_client.process_transaction(transaction).await.unwrap(); - - // Test missing signer(s) - let mut transaction = Transaction::new_with_payer( - &[Instruction { - program_id: id(), - accounts: vec![ - AccountMeta::new_readonly(keypairs[0].pubkey(), true), - AccountMeta::new_readonly(keypairs[1].pubkey(), false), - AccountMeta::new_readonly(keypairs[2].pubkey(), true), - ], - data: memo.to_vec(), - }], - Some(&payer.pubkey()), - ); - transaction.sign(&[&payer, &keypairs[0], &keypairs[2]], recent_blockhash); - assert_eq!( - banks_client - .process_transaction(transaction) - .await - .unwrap_err() - .unwrap(), - TransactionError::InstructionError(0, InstructionError::MissingRequiredSignature) - ); - - let mut transaction = Transaction::new_with_payer( - &[Instruction { - program_id: id(), - accounts: vec![ - AccountMeta::new_readonly(keypairs[0].pubkey(), false), - AccountMeta::new_readonly(keypairs[1].pubkey(), false), - AccountMeta::new_readonly(keypairs[2].pubkey(), false), - ], - data: memo.to_vec(), - }], - Some(&payer.pubkey()), - ); - transaction.sign(&[&payer], recent_blockhash); - assert_eq!( - banks_client - .process_transaction(transaction) - .await - .unwrap_err() - .unwrap(), - TransactionError::InstructionError(0, InstructionError::MissingRequiredSignature) - ); - - // Test invalid utf-8; demonstrate log - let invalid_utf8 = [0xF0, 0x9F, 0x90, 0x86, 0xF0, 0x9F, 0xFF, 0x86]; - let mut transaction = - Transaction::new_with_payer(&[build_memo(&invalid_utf8, &[])], Some(&payer.pubkey())); - transaction.sign(&[&payer], recent_blockhash); - assert_eq!( - banks_client - .process_transaction(transaction) - .await - .unwrap_err() - .unwrap(), - TransactionError::InstructionError(0, InstructionError::InvalidInstructionData) - ); -} - -#[tokio::test] -#[ignore] -async fn test_memo_compute_limits() { - let (banks_client, payer, recent_blockhash) = program_test().start().await; - - // Test memo length - let mut memo = vec![]; - for _ in 0..1000 { - let mut vec = vec![0x53, 0x4F, 0x4C]; - memo.append(&mut vec); - } - - let mut transaction = - Transaction::new_with_payer(&[build_memo(&memo[..450], &[])], Some(&payer.pubkey())); - transaction.sign(&[&payer], recent_blockhash); - banks_client.process_transaction(transaction).await.unwrap(); - - let mut transaction = - Transaction::new_with_payer(&[build_memo(&memo[..600], &[])], Some(&payer.pubkey())); - transaction.sign(&[&payer], recent_blockhash); - let err = banks_client - .process_transaction(transaction) - .await - .unwrap_err() - .unwrap(); - let failed_to_complete = - TransactionError::InstructionError(0, InstructionError::ProgramFailedToComplete); - let computational_budget_exceeded = - TransactionError::InstructionError(0, InstructionError::ComputationalBudgetExceeded); - assert!(err == failed_to_complete || err == computational_budget_exceeded); - - let mut memo = vec![]; - for _ in 0..100 { - let mut vec = vec![0xE2, 0x97, 0x8E]; - memo.append(&mut vec); - } - - let mut transaction = - Transaction::new_with_payer(&[build_memo(&memo[..60], &[])], Some(&payer.pubkey())); - transaction.sign(&[&payer], recent_blockhash); - banks_client.process_transaction(transaction).await.unwrap(); - - let mut transaction = - Transaction::new_with_payer(&[build_memo(&memo[..63], &[])], Some(&payer.pubkey())); - transaction.sign(&[&payer], recent_blockhash); - let err = banks_client - .process_transaction(transaction) - .await - .unwrap_err() - .unwrap(); - assert!(err == failed_to_complete || err == computational_budget_exceeded); - - // Test num signers with 32-byte memo - let memo = Pubkey::new_unique().to_bytes(); - let mut keypairs = vec![]; - for _ in 0..20 { - keypairs.push(Keypair::new()); - } - let pubkeys: Vec = keypairs.iter().map(|keypair| keypair.pubkey()).collect(); - let signer_key_refs: Vec<&Pubkey> = pubkeys.iter().collect(); - - let mut signers = vec![&payer]; - for keypair in keypairs[..12].iter() { - signers.push(keypair); - } - let mut transaction = Transaction::new_with_payer( - &[build_memo(&memo, &signer_key_refs[..12])], - Some(&payer.pubkey()), - ); - transaction.sign(&signers, recent_blockhash); - banks_client.process_transaction(transaction).await.unwrap(); - - let mut signers = vec![&payer]; - for keypair in keypairs[..15].iter() { - signers.push(keypair); - } - let mut transaction = Transaction::new_with_payer( - &[build_memo(&memo, &signer_key_refs[..15])], - Some(&payer.pubkey()), - ); - transaction.sign(&signers, recent_blockhash); - let err = banks_client - .process_transaction(transaction) - .await - .unwrap_err() - .unwrap(); - assert!(err == failed_to_complete || err == computational_budget_exceeded); -} diff --git a/package.json b/package.json index f6bade3eca5..b59273af3bb 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,6 @@ "workspaces": [ "account-compression/sdk", "libraries/type-length-value/js", - "memo/js", "single-pool/js", "stake-pool/js", "token/js", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a645921d36d..e5c86974341 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -182,70 +182,6 @@ importers: specifier: ^5.7.2 version: 5.7.2 - memo/js: - dependencies: - buffer: - specifier: ^6.0.3 - version: 6.0.3 - devDependencies: - '@solana/web3.js': - specifier: ^1.95.5 - version: 1.95.5 - '@types/chai': - specifier: ^5.0.1 - version: 5.0.1 - '@types/jest': - specifier: ^29.5.14 - version: 29.5.14 - '@types/node': - specifier: ^22.10.1 - version: 22.10.1 - '@types/node-fetch': - specifier: ^2.6.12 - version: 2.6.12 - '@typescript-eslint/eslint-plugin': - specifier: ^8.4.0 - version: 8.4.0(@typescript-eslint/parser@8.4.0)(eslint@8.57.0)(typescript@5.7.2) - '@typescript-eslint/parser': - specifier: ^8.4.0 - version: 8.4.0(eslint@8.57.0)(typescript@5.7.2) - chai: - specifier: ^5.1.2 - version: 5.1.2 - eslint: - specifier: ^8.57.0 - version: 8.57.0 - eslint-plugin-require-extensions: - specifier: ^0.1.1 - version: 0.1.3(eslint@8.57.0) - gh-pages: - specifier: ^6.2.0 - version: 6.2.0 - jest: - specifier: ^29.0.0 - version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2) - process: - specifier: ^0.11.10 - version: 0.11.10 - shx: - specifier: ^0.3.4 - version: 0.3.4 - start-server-and-test: - specifier: ^2.0.8 - version: 2.0.8 - ts-jest: - specifier: ^29.2.5 - version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.7.2) - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) - typedoc: - specifier: ^0.27.2 - version: 0.27.2(typescript@5.7.2) - typescript: - specifier: ^5.7.2 - version: 5.7.2 - name-service/js: dependencies: '@solana/web3.js': @@ -715,7 +651,7 @@ importers: version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) '@solana/spl-memo': specifier: 0.2.4 - version: link:../../memo/js + version: 0.2.4(@solana/web3.js@1.95.5) '@solana/web3.js': specifier: ^1.95.5 version: 1.95.5 @@ -2778,6 +2714,17 @@ packages: - fastestsmallesttextencoderdecoder dev: false + /@solana/spl-memo@0.2.4(@solana/web3.js@1.95.5): + resolution: {integrity: sha512-x6MpxcUXpzRkBaqPHda/nWHqv3JOh+BsvptX4CUk5lcAB6ksr2VXLuxaAzWlLtIzU6VSU7cg2N7xGlkt28B+UQ==} + engines: {node: '>=16'} + deprecated: CommonJS exports were broken in this release + peerDependencies: + '@solana/web3.js': ^1.91.6 + dependencies: + '@solana/web3.js': 1.95.5 + buffer: 6.0.3 + dev: true + /@solana/transaction-messages@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2): resolution: {integrity: sha512-Uc6Fw1EJLBrmgS1lH2ZfLAAKFvprWPQQzOVwZS78Pv8Whsk7tweYTK6S0Upv0nHr50rGpnORJfmdBrXE6OfNGg==} engines: {node: '>=20.18.0'} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index e1424560139..3e3548b6355 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,7 +1,6 @@ packages: - "account-compression/sdk" - "libraries/type-length-value/js" - - "memo/js" - "name-service/js" - "single-pool/js/packages/*" - "stake-pool/js" diff --git a/token/cli/Cargo.toml b/token/cli/Cargo.toml index 1893630d004..8ab362ee423 100644 --- a/token/cli/Cargo.toml +++ b/token/cli/Cargo.toml @@ -39,9 +39,7 @@ spl-token-client = { version = "0.13.0", path = "../client" } spl-token-confidential-transfer-proof-generation = { version = "0.2.0", path = "../confidential-transfer/proof-generation" } spl-token-metadata-interface = { version = "0.6.0", path = "../../token-metadata/interface" } spl-token-group-interface = { version = "0.5.0", path = "../../token-group/interface" } -spl-memo = { version = "6.0", path = "../../memo/program", features = [ - "no-entrypoint", -] } +spl-memo = { version = "6.0", features = ["no-entrypoint"] } strum = "0.26" strum_macros = "0.26" tokio = "1.41" diff --git a/token/client/Cargo.toml b/token/client/Cargo.toml index 4622d6b5d39..c7d3d94a2b5 100644 --- a/token/client/Cargo.toml +++ b/token/client/Cargo.toml @@ -21,9 +21,7 @@ solana-rpc-client-api = "2.1.0" solana-sdk = "2.1.0" spl-associated-token-account-client = { version = "2.0.0", path = "../../associated-token-account/client" } spl-elgamal-registry = { version = "0.1.0", path = "../confidential-transfer/elgamal-registry"} -spl-memo = { version = "6.0", path = "../../memo/program", features = [ - "no-entrypoint", -] } +spl-memo = { version = "6.0", features = ["no-entrypoint"] } spl-record = { version = "0.3.0", path = "../../record/program", features = ["no-entrypoint"] } spl-token = { version = "7.0", path = "../program", features = [ "no-entrypoint", diff --git a/token/program-2022-test/Cargo.toml b/token/program-2022-test/Cargo.toml index 3edc32f8c41..99c4e1842d6 100644 --- a/token/program-2022-test/Cargo.toml +++ b/token/program-2022-test/Cargo.toml @@ -25,9 +25,7 @@ solana-program-test = "2.1.0" solana-sdk = "2.1.0" spl-associated-token-account = { version = "6.0.0", path = "../../associated-token-account/program" } spl-elgamal-registry = { version = "0.1.0", path = "../confidential-transfer/elgamal-registry" } -spl-memo = { version = "6.0.0", path = "../../memo/program", features = [ - "no-entrypoint", -] } +spl-memo = { version = "6.0.0", features = ["no-entrypoint"] } spl-pod = { version = "0.5.0", path = "../../libraries/pod" } spl-record = { version = "0.3.0", path = "../../record/program", features = [ "no-entrypoint", diff --git a/token/program-2022/Cargo.toml b/token/program-2022/Cargo.toml index b71dca2df25..3b29dbcb7fd 100644 --- a/token/program-2022/Cargo.toml +++ b/token/program-2022/Cargo.toml @@ -26,7 +26,7 @@ solana-program = "2.1.0" solana-security-txt = "1.1.1" solana-zk-sdk = "2.1.0" spl-elgamal-registry = { version = "0.1.0", path = "../confidential-transfer/elgamal-registry", features = ["no-entrypoint"] } -spl-memo = { version = "6.0", path = "../../memo/program", features = [ "no-entrypoint" ] } +spl-memo = { version = "6.0", features = ["no-entrypoint"] } spl-token = { version = "7.0", path = "../program", features = ["no-entrypoint"] } spl-token-confidential-transfer-ciphertext-arithmetic = { version = "0.2.0", path = "../confidential-transfer/ciphertext-arithmetic" } spl-token-confidential-transfer-proof-extraction = { version = "0.2.0", path = "../confidential-transfer/proof-extraction" } diff --git a/utils/test-client/Cargo.toml b/utils/test-client/Cargo.toml index ff57a85ffa4..ffc54b1163c 100644 --- a/utils/test-client/Cargo.toml +++ b/utils/test-client/Cargo.toml @@ -9,6 +9,6 @@ edition = "2021" [dependencies] solana-sdk = "2.1.0" -spl-memo = { path = "../../memo/program", features = [ "no-entrypoint" ] } +spl-memo = { version = "6.0.0", features = [ "no-entrypoint" ] } spl-token = { path = "../../token/program", features = [ "no-entrypoint" ] } spl-token-swap = { path = "../../token-swap/program", features = [ "no-entrypoint" ] } From 086b45d699f33660102ee00f0d3af4f8ac27f234 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:17:27 +0100 Subject: [PATCH 37/52] build(deps-dev): bump @solana/spl-memo from 0.2.4 to 0.2.5 (#7551) Bumps [@solana/spl-memo](https://github.com/solana-labs/solana-program-library) from 0.2.4 to 0.2.5. - [Release notes](https://github.com/solana-labs/solana-program-library/releases) - [Commits](https://github.com/solana-labs/solana-program-library/compare/pod-v0.2.4...spl-pod-v0.2.5) --- updated-dependencies: - dependency-name: "@solana/spl-memo" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 9 ++++----- token/js/package.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e5c86974341..6086e2f3c07 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -650,8 +650,8 @@ importers: specifier: 2.0.0 version: 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2) '@solana/spl-memo': - specifier: 0.2.4 - version: 0.2.4(@solana/web3.js@1.95.5) + specifier: 0.2.5 + version: 0.2.5(@solana/web3.js@1.95.5) '@solana/web3.js': specifier: ^1.95.5 version: 1.95.5 @@ -2714,10 +2714,9 @@ packages: - fastestsmallesttextencoderdecoder dev: false - /@solana/spl-memo@0.2.4(@solana/web3.js@1.95.5): - resolution: {integrity: sha512-x6MpxcUXpzRkBaqPHda/nWHqv3JOh+BsvptX4CUk5lcAB6ksr2VXLuxaAzWlLtIzU6VSU7cg2N7xGlkt28B+UQ==} + /@solana/spl-memo@0.2.5(@solana/web3.js@1.95.5): + resolution: {integrity: sha512-0Zx5t3gAdcHlRTt2O3RgGlni1x7vV7Xq7j4z9q8kKOMgU03PyoTbFQ/BSYCcICHzkaqD7ZxAiaJ6dlXolg01oA==} engines: {node: '>=16'} - deprecated: CommonJS exports were broken in this release peerDependencies: '@solana/web3.js': ^1.91.6 dependencies: diff --git a/token/js/package.json b/token/js/package.json index 865b997e995..bab808a7f76 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -61,7 +61,7 @@ }, "devDependencies": { "@solana/codecs-strings": "2.0.0", - "@solana/spl-memo": "0.2.4", + "@solana/spl-memo": "0.2.5", "@solana/web3.js": "^1.95.5", "@types/chai-as-promised": "^8.0.1", "@types/chai": "^5.0.1", From d1e018f731a6a90a3a6023113d911ca7bf566879 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:17:38 +0100 Subject: [PATCH 38/52] build(deps-dev): bump mocha from 10.8.2 to 11.0.1 (#7553) Bumps [mocha](https://github.com/mochajs/mocha) from 10.8.2 to 11.0.1. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v10.8.2...v11.0.1) --- updated-dependencies: - dependency-name: mocha dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libraries/type-length-value/js/package.json | 2 +- pnpm-lock.yaml | 58 ++++++--------------- token-group/js/package.json | 2 +- token-metadata/js/package.json | 2 +- token-swap/js/package.json | 2 +- token/js/package.json | 2 +- 6 files changed, 22 insertions(+), 46 deletions(-) diff --git a/libraries/type-length-value/js/package.json b/libraries/type-length-value/js/package.json index fa733f5f8b7..7dd43b27d99 100644 --- a/libraries/type-length-value/js/package.json +++ b/libraries/type-length-value/js/package.json @@ -56,7 +56,7 @@ "eslint": "^8.57.0", "eslint-plugin-require-extensions": "^0.1.1", "gh-pages": "^6.2.0", - "mocha": "^10.8.2", + "mocha": "^11.0.1", "shx": "^0.3.4", "ts-node": "^10.9.2", "typedoc": "^0.27.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6086e2f3c07..1d78f345e73 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -167,8 +167,8 @@ importers: specifier: ^6.2.0 version: 6.2.0 mocha: - specifier: ^10.8.2 - version: 10.8.2 + specifier: ^11.0.1 + version: 11.0.1 shx: specifier: ^0.3.4 version: 0.3.4 @@ -433,8 +433,8 @@ importers: specifier: ^6.2.0 version: 6.2.0 mocha: - specifier: ^10.8.2 - version: 10.8.2 + specifier: ^11.0.1 + version: 11.0.1 shx: specifier: ^0.3.4 version: 0.3.4 @@ -555,8 +555,8 @@ importers: specifier: ^6.2.0 version: 6.2.0 mocha: - specifier: ^10.8.2 - version: 10.8.2 + specifier: ^11.0.1 + version: 11.0.1 shx: specifier: ^0.3.4 version: 0.3.4 @@ -616,8 +616,8 @@ importers: specifier: ^0.1.1 version: 0.1.3(eslint@8.57.0) mocha: - specifier: ^10.8.2 - version: 10.8.2 + specifier: ^11.0.1 + version: 11.0.1 start-server-and-test: specifier: ^2.0.8 version: 2.0.8 @@ -692,8 +692,8 @@ importers: specifier: ^6.2.0 version: 6.2.0 mocha: - specifier: ^10.8.2 - version: 10.8.2 + specifier: ^11.0.1 + version: 11.0.1 process: specifier: ^0.11.10 version: 0.11.10 @@ -4094,13 +4094,6 @@ packages: balanced-match: 1.0.2 dev: true - /braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.1.1 - dev: true - /braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -4861,11 +4854,6 @@ packages: '@esbuild/win32-x64': 0.23.0 dev: true - /escalade@3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} - engines: {node: '>=6'} - dev: true - /escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -5970,18 +5958,6 @@ packages: path-is-absolute: 1.0.1 dev: true - /glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} - deprecated: Glob versions prior to v9 are no longer supported - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.6 - once: 1.4.0 - dev: true - /globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -7693,7 +7669,7 @@ packages: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} dependencies: - braces: 3.0.2 + braces: 3.0.3 picomatch: 2.3.1 dev: true @@ -7794,9 +7770,9 @@ packages: hasBin: true dev: true - /mocha@10.8.2: - resolution: {integrity: sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==} - engines: {node: '>= 14.0.0'} + /mocha@11.0.1: + resolution: {integrity: sha512-+3GkODfsDG71KSCQhc4IekSW+ItCK/kiez1Z28ksWvYhKXV/syxMlerR/sC7whDp7IyreZ4YxceMLdTs5hQE8A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true dependencies: ansi-colors: 4.1.3 @@ -7806,7 +7782,7 @@ packages: diff: 5.2.0 escape-string-regexp: 4.0.0 find-up: 5.0.0 - glob: 8.1.0 + glob: 10.4.5 he: 1.2.0 js-yaml: 4.1.0 log-symbols: 4.1.0 @@ -9547,7 +9523,7 @@ packages: engines: {node: '>=10'} dependencies: cliui: 7.0.4 - escalade: 3.1.1 + escalade: 3.2.0 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 @@ -9560,7 +9536,7 @@ packages: engines: {node: '>=12'} dependencies: cliui: 8.0.1 - escalade: 3.1.1 + escalade: 3.2.0 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 diff --git a/token-group/js/package.json b/token-group/js/package.json index 4cd9780e618..82f0a3da18f 100644 --- a/token-group/js/package.json +++ b/token-group/js/package.json @@ -60,7 +60,7 @@ "eslint": "^8.57.0", "eslint-plugin-require-extensions": "^0.1.1", "gh-pages": "^6.2.0", - "mocha": "^10.8.2", + "mocha": "^11.0.1", "shx": "^0.3.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", diff --git a/token-metadata/js/package.json b/token-metadata/js/package.json index f334f037bc7..1170a91fdcd 100644 --- a/token-metadata/js/package.json +++ b/token-metadata/js/package.json @@ -60,7 +60,7 @@ "eslint": "^8.57.0", "eslint-plugin-require-extensions": "^0.1.1", "gh-pages": "^6.2.0", - "mocha": "^10.8.2", + "mocha": "^11.0.1", "shx": "^0.3.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", diff --git a/token-swap/js/package.json b/token-swap/js/package.json index f58ca9f3ef7..912d149a5f9 100644 --- a/token-swap/js/package.json +++ b/token-swap/js/package.json @@ -60,7 +60,7 @@ "eslint": "^8.57.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-require-extensions": "^0.1.1", - "mocha": "^10.8.2", + "mocha": "^11.0.1", "start-server-and-test": "^2.0.8", "ts-node": "^10.9.2", "typescript": "^5.7.2" diff --git a/token/js/package.json b/token/js/package.json index bab808a7f76..74399cc9f9a 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -75,7 +75,7 @@ "eslint": "^8.57.0", "eslint-plugin-require-extensions": "^0.1.1", "gh-pages": "^6.2.0", - "mocha": "^10.8.2", + "mocha": "^11.0.1", "process": "^0.11.10", "shx": "^0.3.4", "start-server-and-test": "^2.0.8", From 3547d76a49f2f70de5f5ce110e35bf97201526a2 Mon Sep 17 00:00:00 2001 From: Wei Lin <35906798+wei1769@users.noreply.github.com> Date: Wed, 4 Dec 2024 09:44:47 +0900 Subject: [PATCH 39/52] add allowOwnerOffCurve parameter to createAssociatedTokenAccountIdempotent (#7554) feat: add allowOwnerOffCurve parameter to createAssociatedTokenAccountIdempotent function --- .../actions/createAssociatedTokenAccountIdempotent.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/token/js/src/actions/createAssociatedTokenAccountIdempotent.ts b/token/js/src/actions/createAssociatedTokenAccountIdempotent.ts index b0913de3db5..0f38c43a2d1 100644 --- a/token/js/src/actions/createAssociatedTokenAccountIdempotent.ts +++ b/token/js/src/actions/createAssociatedTokenAccountIdempotent.ts @@ -15,6 +15,7 @@ import { getAssociatedTokenAddressSync } from '../state/mint.js'; * @param confirmOptions Options for confirming the transaction * @param programId SPL Token program account * @param associatedTokenProgramId SPL Associated Token program account + * @param allowOwnerOffCurve Allow the owner account to be a PDA (Program Derived Address) * * @return Address of the new or existing associated token account */ @@ -26,8 +27,15 @@ export async function createAssociatedTokenAccountIdempotent( confirmOptions?: ConfirmOptions, programId = TOKEN_PROGRAM_ID, associatedTokenProgramId = ASSOCIATED_TOKEN_PROGRAM_ID, + allowOwnerOffCurve = false, ): Promise { - const associatedToken = getAssociatedTokenAddressSync(mint, owner, false, programId, associatedTokenProgramId); + const associatedToken = getAssociatedTokenAddressSync( + mint, + owner, + allowOwnerOffCurve, + programId, + associatedTokenProgramId, + ); const transaction = new Transaction().add( createAssociatedTokenAccountIdempotentInstruction( From e3b9c941ebc77c8969a92e9d67a5f43b515ba6b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 11:37:47 +0100 Subject: [PATCH 40/52] build(deps): bump tokio from 1.41.1 to 1.42.0 (#7556) Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.41.1 to 1.42.0. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.41.1...tokio-1.42.0) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 4 ++-- libraries/concurrent-merkle-tree/Cargo.toml | 2 +- single-pool/cli/Cargo.toml | 2 +- token/cli/Cargo.toml | 2 +- token/transfer-hook/interface/Cargo.toml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7333341ad13..f35b2d68731 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9581,9 +9581,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.41.1" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" dependencies = [ "backtrace", "bytes", diff --git a/libraries/concurrent-merkle-tree/Cargo.toml b/libraries/concurrent-merkle-tree/Cargo.toml index fa2042f0ae9..a5a316f6614 100644 --- a/libraries/concurrent-merkle-tree/Cargo.toml +++ b/libraries/concurrent-merkle-tree/Cargo.toml @@ -20,7 +20,7 @@ thiserror = "2.0.3" rand_distr = "0.4.3" rand = "0.8" spl-merkle-tree-reference = { version = "0.1.0", path = "../merkle-tree-reference" } -tokio = { version = "1.41", features = ["full"] } +tokio = { version = "1.42", features = ["full"] } [lib] crate-type = ["cdylib", "lib"] diff --git a/single-pool/cli/Cargo.toml b/single-pool/cli/Cargo.toml index 8930301580d..133d255f048 100644 --- a/single-pool/cli/Cargo.toml +++ b/single-pool/cli/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0" edition = "2021" [dependencies] -tokio = "1.41" +tokio = "1.42" clap = { version = "3.2.23", features = ["derive"] } console = "0.15.8" borsh = "1.5.3" diff --git a/token/cli/Cargo.toml b/token/cli/Cargo.toml index 8ab362ee423..8f4aa49baa0 100644 --- a/token/cli/Cargo.toml +++ b/token/cli/Cargo.toml @@ -42,7 +42,7 @@ spl-token-group-interface = { version = "0.5.0", path = "../../token-group/inter spl-memo = { version = "6.0", features = ["no-entrypoint"] } strum = "0.26" strum_macros = "0.26" -tokio = "1.41" +tokio = "1.42" [dev-dependencies] solana-test-validator = "2.1.0" diff --git a/token/transfer-hook/interface/Cargo.toml b/token/transfer-hook/interface/Cargo.toml index 8774db01509..601189d01f2 100644 --- a/token/transfer-hook/interface/Cargo.toml +++ b/token/transfer-hook/interface/Cargo.toml @@ -31,7 +31,7 @@ crate-type = ["cdylib", "lib"] [dev-dependencies] solana-program = "2.1.0" -tokio = { version = "1.41.1", features = ["full"] } +tokio = { version = "1.42.0", features = ["full"] } [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] From 72a4368d64f638a3556e0846141757e4f4cbe139 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 11:37:59 +0100 Subject: [PATCH 41/52] build(deps): bump thiserror from 2.0.3 to 2.0.4 (#7555) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 2.0.3 to 2.0.4. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/2.0.3...2.0.4) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 80 +++++++++---------- libraries/concurrent-merkle-tree/Cargo.toml | 2 +- libraries/merkle-tree-reference/Cargo.toml | 2 +- managed-token/program/Cargo.toml | 2 +- name-service/program/Cargo.toml | 2 +- .../proof-extraction/Cargo.toml | 2 +- .../proof-generation/Cargo.toml | 2 +- .../proof-tests/Cargo.toml | 2 +- 8 files changed, 47 insertions(+), 47 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f35b2d68731..fc15a1d3644 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -667,7 +667,7 @@ dependencies = [ "borsh 1.5.3", "solana-program", "spl-token 7.0.0", - "thiserror 2.0.3", + "thiserror 2.0.4", "uint", ] @@ -7773,7 +7773,7 @@ dependencies = [ "spl-associated-token-account-client", "spl-token 7.0.0", "spl-token-2022 6.0.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -7809,7 +7809,7 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token 7.0.0", - "thiserror 2.0.3", + "thiserror 2.0.4", "uint", ] @@ -7822,7 +7822,7 @@ dependencies = [ "rand_distr", "solana-program", "spl-merkle-tree-reference", - "thiserror 2.0.3", + "thiserror 2.0.4", "tokio", ] @@ -8005,7 +8005,7 @@ dependencies = [ "spl-governance-test-sdk", "spl-governance-tools", "spl-token 7.0.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8037,7 +8037,7 @@ dependencies = [ "spl-governance-test-sdk", "spl-governance-tools", "spl-token 7.0.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8062,7 +8062,7 @@ dependencies = [ "spl-governance-test-sdk", "spl-governance-tools", "spl-token 7.0.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8081,7 +8081,7 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token 7.0.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8097,7 +8097,7 @@ dependencies = [ "serde_derive", "solana-program", "spl-token 7.0.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8129,7 +8129,7 @@ dependencies = [ "spl-associated-token-account 6.0.0", "spl-associated-token-account-client", "spl-token 7.0.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8153,7 +8153,7 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-math", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8184,7 +8184,7 @@ name = "spl-merkle-tree-reference" version = "0.1.0" dependencies = [ "solana-program", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8197,7 +8197,7 @@ dependencies = [ "solana-program", "solana-program-test", "solana-sdk", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8232,7 +8232,7 @@ dependencies = [ "solana-program-option", "solana-pubkey", "solana-zk-sdk", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8259,7 +8259,7 @@ dependencies = [ "solana-program", "solana-sdk", "spl-program-error-derive 0.4.1", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8302,7 +8302,7 @@ dependencies = [ "solana-pubkey", "solana-rent", "solana-sdk", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8336,7 +8336,7 @@ dependencies = [ "spl-associated-token-account-client", "spl-token 7.0.0", "test-case", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8396,7 +8396,7 @@ dependencies = [ "solana-sdk", "spl-pod 0.5.0", "spl-record", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8423,7 +8423,7 @@ dependencies = [ "spl-token 7.0.0", "spl-token-2022 6.0.0", "test-case", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8489,7 +8489,7 @@ dependencies = [ "spl-pod 0.5.0", "spl-program-error 0.6.0", "spl-type-length-value 0.7.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8522,7 +8522,7 @@ dependencies = [ "solana-program", "solana-program-test", "solana-sdk", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8582,7 +8582,7 @@ dependencies = [ "spl-token-metadata-interface 0.6.0", "spl-transfer-hook-interface 0.9.0", "spl-type-length-value 0.7.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8680,7 +8680,7 @@ dependencies = [ "spl-token-group-interface 0.5.0", "spl-token-metadata-interface 0.6.0", "spl-transfer-hook-interface 0.9.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8722,7 +8722,7 @@ dependencies = [ "solana-program", "solana-zk-sdk", "spl-pod 0.5.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8731,7 +8731,7 @@ version = "0.2.0" dependencies = [ "curve25519-dalek 4.1.3", "solana-zk-sdk", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8742,7 +8742,7 @@ dependencies = [ "solana-zk-sdk", "spl-token-confidential-transfer-proof-extraction", "spl-token-confidential-transfer-proof-generation", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8790,7 +8790,7 @@ dependencies = [ "spl-discriminator 0.4.0", "spl-pod 0.5.0", "spl-type-length-value 0.7.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8807,7 +8807,7 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token 7.0.0", - "thiserror 2.0.3", + "thiserror 2.0.4", "uint", ] @@ -8874,7 +8874,7 @@ dependencies = [ "spl-discriminator 0.4.0", "spl-pod 0.5.0", "spl-type-length-value 0.7.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8894,7 +8894,7 @@ dependencies = [ "spl-token 7.0.0", "spl-token-2022 6.0.0", "test-case", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8923,7 +8923,7 @@ dependencies = [ "spl-token-2022 6.0.0", "spl-token-client", "test-case", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -8958,7 +8958,7 @@ dependencies = [ "spl-associated-token-account 6.0.0", "spl-token 7.0.0", "spl-token-2022 6.0.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -9090,7 +9090,7 @@ dependencies = [ "spl-program-error 0.6.0", "spl-tlv-account-resolution 0.9.0", "spl-type-length-value 0.7.0", - "thiserror 2.0.3", + "thiserror 2.0.4", "tokio", ] @@ -9121,7 +9121,7 @@ dependencies = [ "spl-discriminator 0.4.0", "spl-pod 0.5.0", "spl-type-length-value-derive", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -9153,7 +9153,7 @@ dependencies = [ "solana-sdk", "spl-associated-token-account-client", "spl-token 7.0.0", - "thiserror 2.0.3", + "thiserror 2.0.4", ] [[package]] @@ -9476,11 +9476,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490" dependencies = [ - "thiserror-impl 2.0.3", + "thiserror-impl 2.0.4", ] [[package]] @@ -9496,9 +9496,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061" dependencies = [ "proc-macro2", "quote", diff --git a/libraries/concurrent-merkle-tree/Cargo.toml b/libraries/concurrent-merkle-tree/Cargo.toml index a5a316f6614..737f7904184 100644 --- a/libraries/concurrent-merkle-tree/Cargo.toml +++ b/libraries/concurrent-merkle-tree/Cargo.toml @@ -14,7 +14,7 @@ sol-log = ["log"] [dependencies] solana-program = ">=1.18.11,<=2" bytemuck = "1.20" -thiserror = "2.0.3" +thiserror = "2.0.4" [dev-dependencies] rand_distr = "0.4.3" diff --git a/libraries/merkle-tree-reference/Cargo.toml b/libraries/merkle-tree-reference/Cargo.toml index b5e3048de87..5dd90e52221 100644 --- a/libraries/merkle-tree-reference/Cargo.toml +++ b/libraries/merkle-tree-reference/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" [dependencies] solana-program = ">=1.18.11,<=2" -thiserror = "2.0.3" +thiserror = "2.0.4" [lib] crate-type = ["cdylib", "lib"] diff --git a/managed-token/program/Cargo.toml b/managed-token/program/Cargo.toml index e7e8c822873..419374619ff 100644 --- a/managed-token/program/Cargo.toml +++ b/managed-token/program/Cargo.toml @@ -32,7 +32,7 @@ spl-associated-token-account-client = { version = "2.0.0", path = "../../associa spl-token = { version = "7.0", path = "../../token/program", features = [ "no-entrypoint", ] } -thiserror = "^2.0.3" +thiserror = "^2.0.4" [dev-dependencies] solana-program-test = "2.1.0" diff --git a/name-service/program/Cargo.toml b/name-service/program/Cargo.toml index 385b0a59109..37fd9e6e6ce 100644 --- a/name-service/program/Cargo.toml +++ b/name-service/program/Cargo.toml @@ -21,7 +21,7 @@ solana-program = "2.1.0" num-traits = "0.2" borsh = "1.5.3" num-derive = "0.4.2" -thiserror = "2.0.3" +thiserror = "2.0.4" [dev-dependencies] solana-program-test = "2.1.0" diff --git a/token/confidential-transfer/proof-extraction/Cargo.toml b/token/confidential-transfer/proof-extraction/Cargo.toml index 5ce7efdd57e..284d74737a5 100644 --- a/token/confidential-transfer/proof-extraction/Cargo.toml +++ b/token/confidential-transfer/proof-extraction/Cargo.toml @@ -13,7 +13,7 @@ solana-curve25519 = "2.1.0" solana-program = "2.1.0" solana-zk-sdk = "2.1.0" spl-pod = { version = "0.5.0", path = "../../../libraries/pod" } -thiserror = "2.0.3" +thiserror = "2.0.4" [lib] crate-type = ["cdylib", "lib"] diff --git a/token/confidential-transfer/proof-generation/Cargo.toml b/token/confidential-transfer/proof-generation/Cargo.toml index 2887c235051..da019d4d16a 100644 --- a/token/confidential-transfer/proof-generation/Cargo.toml +++ b/token/confidential-transfer/proof-generation/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" [dependencies] curve25519-dalek = "4.1.3" solana-zk-sdk = "2.1.0" -thiserror = "2.0.3" +thiserror = "2.0.4" [dev-dependencies] diff --git a/token/confidential-transfer/proof-tests/Cargo.toml b/token/confidential-transfer/proof-tests/Cargo.toml index f51a67c84d4..dca19451b94 100644 --- a/token/confidential-transfer/proof-tests/Cargo.toml +++ b/token/confidential-transfer/proof-tests/Cargo.toml @@ -10,6 +10,6 @@ edition = "2021" [dev-dependencies] curve25519-dalek = "4.1.3" solana-zk-sdk = "2.1.0" -thiserror = "2.0.3" +thiserror = "2.0.4" spl-token-confidential-transfer-proof-extraction = { version = "0.2.0", path = "../proof-extraction" } spl-token-confidential-transfer-proof-generation = { version = "0.2.0", path = "../proof-generation" } From b4805332aa931d7256cb4b4740983d3341fea83d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 12:05:13 +0100 Subject: [PATCH 42/52] build(deps-dev): bump typedoc from 0.27.2 to 0.27.3 (#7558) Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.27.2 to 0.27.3. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.27.2...v0.27.3) --- updated-dependencies: - dependency-name: typedoc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- account-compression/sdk/package.json | 2 +- libraries/type-length-value/js/package.json | 2 +- name-service/js/package.json | 2 +- pnpm-lock.yaml | 32 ++++++++++----------- token-group/js/package.json | 2 +- token-lending/js/package.json | 2 +- token-metadata/js/package.json | 2 +- token/js/package.json | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index dd4513b83e8..d42367c906f 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -85,7 +85,7 @@ "ts-jest": "^29.2.5", "ts-jest-resolver": "^2.0.1", "ts-node": "^10.9.2", - "typedoc": "^0.27.2", + "typedoc": "^0.27.3", "typescript": "5.7.2" } } diff --git a/libraries/type-length-value/js/package.json b/libraries/type-length-value/js/package.json index 7dd43b27d99..d8416b337e2 100644 --- a/libraries/type-length-value/js/package.json +++ b/libraries/type-length-value/js/package.json @@ -59,7 +59,7 @@ "mocha": "^11.0.1", "shx": "^0.3.4", "ts-node": "^10.9.2", - "typedoc": "^0.27.2", + "typedoc": "^0.27.3", "typescript": "^5.7.2" } } diff --git a/name-service/js/package.json b/name-service/js/package.json index 6bdc4989bb2..3629eacf0ff 100644 --- a/name-service/js/package.json +++ b/name-service/js/package.json @@ -56,7 +56,7 @@ "start-server-and-test": "^2.0.8", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "typedoc": "^0.27.2", + "typedoc": "^0.27.3", "typescript": "^5.7.2" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1d78f345e73..9f18c03d34e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -124,8 +124,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.2 - version: 0.27.2(typescript@5.7.2) + specifier: ^0.27.3 + version: 0.27.3(typescript@5.7.2) typescript: specifier: 5.7.2 version: 5.7.2 @@ -176,8 +176,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.2 - version: 0.27.2(typescript@5.7.2) + specifier: ^0.27.3 + version: 0.27.3(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -237,8 +237,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.2 - version: 0.27.2(typescript@5.7.2) + specifier: ^0.27.3 + version: 0.27.3(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -445,8 +445,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.27.2 - version: 0.27.2(typescript@5.7.2) + specifier: ^0.27.3 + version: 0.27.3(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -509,8 +509,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.27.2 - version: 0.27.2(typescript@5.7.2) + specifier: ^0.27.3 + version: 0.27.3(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -567,8 +567,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.27.2 - version: 0.27.2(typescript@5.7.2) + specifier: ^0.27.3 + version: 0.27.3(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -707,8 +707,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.2 - version: 0.27.2(typescript@5.7.2) + specifier: ^0.27.3 + version: 0.27.3(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -9212,8 +9212,8 @@ packages: possible-typed-array-names: 1.0.0 dev: true - /typedoc@0.27.2(typescript@5.7.2): - resolution: {integrity: sha512-C2ima5TZJHU3ecnRIz50lKd1BsYck5LhYQIy7MRPmjuSEJreUEAt+uAVcZgY7wZsSORzEI7xW8miZIdxv/cbmw==} + /typedoc@0.27.3(typescript@5.7.2): + resolution: {integrity: sha512-oWT7zDS5oIaxYL5yOikBX4cL99CpNAZn6mI24JZQxsYuIHbtguSSwJ7zThuzNNwSE0wqhlfTSd99HgqKu2aQXQ==} engines: {node: '>= 18'} hasBin: true peerDependencies: diff --git a/token-group/js/package.json b/token-group/js/package.json index 82f0a3da18f..9ad6737693d 100644 --- a/token-group/js/package.json +++ b/token-group/js/package.json @@ -64,7 +64,7 @@ "shx": "^0.3.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.27.2", + "typedoc": "^0.27.3", "typescript": "^5.7.2" } } diff --git a/token-lending/js/package.json b/token-lending/js/package.json index 278358910cc..24d3de76b62 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -55,7 +55,7 @@ "rollup": "^4.28.0", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.27.2", + "typedoc": "^0.27.3", "typescript": "^5.7.2" } } diff --git a/token-metadata/js/package.json b/token-metadata/js/package.json index 1170a91fdcd..1128bfc33f9 100644 --- a/token-metadata/js/package.json +++ b/token-metadata/js/package.json @@ -64,7 +64,7 @@ "shx": "^0.3.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.27.2", + "typedoc": "^0.27.3", "typescript": "^5.7.2" } } diff --git a/token/js/package.json b/token/js/package.json index 74399cc9f9a..13dfe1a9a5f 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -80,7 +80,7 @@ "shx": "^0.3.4", "start-server-and-test": "^2.0.8", "ts-node": "^10.9.2", - "typedoc": "^0.27.2", + "typedoc": "^0.27.3", "typescript": "^5.7.2" } } From 91f6479a989a2422fcc14e309048d92a65fa9215 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 12:18:08 +0100 Subject: [PATCH 43/52] build(deps-dev): bump prettier from 3.4.1 to 3.4.2 (#7559) Bumps [prettier](https://github.com/prettier/prettier) from 3.4.1 to 3.4.2. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.4.1...3.4.2) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index b59273af3bb..6cd43672c56 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "eslint-config-prettier": "^9.1.0", "eslint-config-turbo": "^2.3.3", "eslint-plugin-prettier": "^5.2.1", - "prettier": "^3.4.1", + "prettier": "^3.4.2", "turbo": "^2.3.3" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9f18c03d34e..53d08f634d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 4.0.0(@eslint/js@9.13.0)(@types/eslint__js@8.42.3)(eslint-plugin-jest@28.9.0)(eslint-plugin-react-hooks@5.0.0)(eslint-plugin-simple-import-sort@12.1.1)(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.3.0)(eslint@9.13.0)(globals@15.11.0)(jest@30.0.0-alpha.6)(typescript-eslint@8.12.2)(typescript@5.7.2) '@solana/prettier-config-solana': specifier: ^0.0.5 - version: 0.0.5(prettier@3.4.1) + version: 0.0.5(prettier@3.4.2) eslint-config-prettier: specifier: ^9.1.0 version: 9.1.0(eslint@9.13.0) @@ -22,10 +22,10 @@ importers: version: 2.3.3(eslint@9.13.0) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.4.1) + version: 5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.4.2) prettier: - specifier: ^3.4.1 - version: 3.4.1 + specifier: ^3.4.2 + version: 3.4.2 turbo: specifier: ^2.3.3 version: 2.3.3 @@ -2690,12 +2690,12 @@ packages: - fastestsmallesttextencoderdecoder dev: false - /@solana/prettier-config-solana@0.0.5(prettier@3.4.1): + /@solana/prettier-config-solana@0.0.5(prettier@3.4.2): resolution: {integrity: sha512-igtLH1QaX5xzSLlqteexRIg9X1QKA03xKYQc2qY1TrMDDhxKXoRZOStQPWdita2FVJzxTGz/tdMGC1vS0biRcg==} peerDependencies: prettier: ^3.2.0 dependencies: - prettier: 3.4.1 + prettier: 3.4.2 dev: true /@solana/rpc-types@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2): @@ -5136,7 +5136,7 @@ packages: rambda: 7.5.0 dev: true - /eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.4.1): + /eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.4.2): resolution: {integrity: sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -5152,7 +5152,7 @@ packages: dependencies: eslint: 9.13.0 eslint-config-prettier: 9.1.0(eslint@9.13.0) - prettier: 3.4.1 + prettier: 3.4.2 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 dev: true @@ -8170,8 +8170,8 @@ packages: hasBin: true dev: true - /prettier@3.4.1: - resolution: {integrity: sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==} + /prettier@3.4.2: + resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} engines: {node: '>=14'} hasBin: true dev: true From 5ef1bd6fd23ddf2152e73f572504055c1fa2e005 Mon Sep 17 00:00:00 2001 From: Jon C Date: Wed, 4 Dec 2024 15:01:43 +0100 Subject: [PATCH 44/52] deps: Update hashbrown to 0.15.1 (#7560) #### Problem Hashbrown has a security advisory on v0.15.0: https://rustsec.org/advisories/RUSTSEC-2024-0402 #### Summary of changes Bump to 0.15.1 --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fc15a1d3644..d26ef366778 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2375,9 +2375,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" [[package]] name = "headers" @@ -2744,7 +2744,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "rayon", "serde", ] From 96a15750994c12101dd545c6d341029d34012e49 Mon Sep 17 00:00:00 2001 From: Ilan Gitter <8359193+gitteri@users.noreply.github.com> Date: Wed, 4 Dec 2024 12:48:43 -0700 Subject: [PATCH 45/52] token-js: add JS helpers for interest bearing tokens' UIAmounts (#7541) * add JS helpers for interest bearing tokens' UIAmounts * reorder imports * update comments to provide formulas * working with sys clock * remove sinon * use number instead of decimal.js and remove deps * update pnpm * use upstream pnpm-lock * remove unnecessary math * prettier fix * restore timestamps as bigints * address comments * Update token/js/src/actions/amountToUiAmount.ts Co-authored-by: Jon C * fix eslint import issues --------- Co-authored-by: Jon C --- token/js/src/actions/amountToUiAmount.ts | 247 +++++++++++++++- token/js/test/unit/interestBearing.test.ts | 327 +++++++++++++++++++++ 2 files changed, 571 insertions(+), 3 deletions(-) create mode 100644 token/js/test/unit/interestBearing.test.ts diff --git a/token/js/src/actions/amountToUiAmount.ts b/token/js/src/actions/amountToUiAmount.ts index 667454ab8a8..d6a7a204ff5 100644 --- a/token/js/src/actions/amountToUiAmount.ts +++ b/token/js/src/actions/amountToUiAmount.ts @@ -1,7 +1,9 @@ -import type { Connection, PublicKey, Signer, TransactionError } from '@solana/web3.js'; -import { Transaction } from '@solana/web3.js'; -import { TOKEN_PROGRAM_ID } from '../constants.js'; +import type { Connection, Signer, TransactionError } from '@solana/web3.js'; +import { PublicKey, Transaction } from '@solana/web3.js'; +import { TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID } from '../constants.js'; import { createAmountToUiAmountInstruction } from '../instructions/amountToUiAmount.js'; +import { unpackMint } from '../state/mint.js'; +import { getInterestBearingMintConfigState } from '../extensions/interestBearingMint/state.js'; /** * Amount as a string using mint-prescribed decimals @@ -28,3 +30,242 @@ export async function amountToUiAmount( } return err; } + +/** + * Calculates the exponent for the interest rate formula. + * @param t1 - The start time in seconds. + * @param t2 - The end time in seconds. + * @param r - The interest rate in basis points. + * @returns The calculated exponent. + */ +function calculateExponentForTimesAndRate(t1: number, t2: number, r: number) { + const ONE_IN_BASIS_POINTS = 10000; + const SECONDS_PER_YEAR = 60 * 60 * 24 * 365.24; + const timespan = t2 - t1; + const numerator = r * timespan; + const exponent = numerator / (SECONDS_PER_YEAR * ONE_IN_BASIS_POINTS); + return Math.exp(exponent); +} + +/** + * Retrieves the current timestamp from the Solana clock sysvar. + * @param connection - The Solana connection object. + * @returns A promise that resolves to the current timestamp in seconds. + * @throws An error if the sysvar clock cannot be fetched or parsed. + */ +async function getSysvarClockTimestamp(connection: Connection): Promise { + const info = await connection.getParsedAccountInfo(new PublicKey('SysvarC1ock11111111111111111111111111111111')); + if (!info) { + throw new Error('Failed to fetch sysvar clock'); + } + if (typeof info.value === 'object' && info.value && 'data' in info.value && 'parsed' in info.value.data) { + return info.value.data.parsed.info.unixTimestamp; + } + throw new Error('Failed to parse sysvar clock'); +} + +/** + * Convert amount to UiAmount for a mint with interest bearing extension without simulating a transaction + * This implements the same logic as the CPI instruction available in /token/program-2022/src/extension/interest_bearing_mint/mod.rs + * In general to calculate compounding interest over a period of time, the formula is: + * A = P * e^(r * t) where + * A = final amount after interest + * P = principal amount (initial investment) + * r = annual interest rate (as a decimal, e.g., 5% = 0.05) + * t = time in years + * e = mathematical constant (~2.718) + * + * In this case, we are calculating the total scale factor for the interest bearing extension which is the product of two exponential functions: + * totalScale = e^(r1 * t1) * e^(r2 * t2) + * where r1 and r2 are the interest rates before and after the last update, and t1 and t2 are the times in years between + * the initialization timestamp and the last update timestamp, and between the last update timestamp and the current timestamp. + * + * @param amount Amount of tokens to be converted + * @param decimals Number of decimals of the mint + * @param currentTimestamp Current timestamp in seconds + * @param lastUpdateTimestamp Last time the interest rate was updated in seconds + * @param initializationTimestamp Time the interest bearing extension was initialized in seconds + * @param preUpdateAverageRate Interest rate in basis points (1 basis point = 0.01%) before last update + * @param currentRate Current interest rate in basis points + * + * @return Amount scaled by accrued interest as a string with appropriate decimal places + */ +export function amountToUiAmountWithoutSimulation( + amount: bigint, + decimals: number, + currentTimestamp: number, // in seconds + lastUpdateTimestamp: number, + initializationTimestamp: number, + preUpdateAverageRate: number, + currentRate: number, +): string { + // Calculate pre-update exponent + // e^(preUpdateAverageRate * (lastUpdateTimestamp - initializationTimestamp) / (SECONDS_PER_YEAR * ONE_IN_BASIS_POINTS)) + const preUpdateExp = calculateExponentForTimesAndRate( + initializationTimestamp, + lastUpdateTimestamp, + preUpdateAverageRate, + ); + + // Calculate post-update exponent + // e^(currentRate * (currentTimestamp - lastUpdateTimestamp) / (SECONDS_PER_YEAR * ONE_IN_BASIS_POINTS)) + const postUpdateExp = calculateExponentForTimesAndRate(lastUpdateTimestamp, currentTimestamp, currentRate); + + // Calculate total scale + const totalScale = preUpdateExp * postUpdateExp; + // Scale the amount by the total interest factor + const scaledAmount = Number(amount) * totalScale; + + // Calculate the decimal factor (e.g. 100 for 2 decimals) + const decimalFactor = Math.pow(10, decimals); + + // Convert to UI amount by: + // 1. Truncating to remove any remaining decimals + // 2. Dividing by decimal factor to get final UI amount + // 3. Converting to string + return (Math.trunc(scaledAmount) / decimalFactor).toString(); +} + +/** + * Convert amount to UiAmount for a mint without simulating a transaction + * This implements the same logic as `process_amount_to_ui_amount` in /token/program-2022/src/processor.rs + * and `process_amount_to_ui_amount` in /token/program/src/processor.rs + * + * @param connection Connection to use + * @param mint Mint to use for calculations + * @param amount Amount of tokens to be converted to Ui Amount + * + * @return Ui Amount generated + */ +export async function amountToUiAmountForMintWithoutSimulation( + connection: Connection, + mint: PublicKey, + amount: bigint, +): Promise { + const accountInfo = await connection.getAccountInfo(mint); + const programId = accountInfo?.owner; + if (programId !== TOKEN_PROGRAM_ID && programId !== TOKEN_2022_PROGRAM_ID) { + throw new Error('Invalid program ID'); + } + + const mintInfo = unpackMint(mint, accountInfo, programId); + + const interestBearingMintConfigState = getInterestBearingMintConfigState(mintInfo); + if (!interestBearingMintConfigState) { + const amountNumber = Number(amount); + const decimalsFactor = Math.pow(10, mintInfo.decimals); + return (amountNumber / decimalsFactor).toString(); + } + + const timestamp = await getSysvarClockTimestamp(connection); + + return amountToUiAmountWithoutSimulation( + amount, + mintInfo.decimals, + timestamp, + Number(interestBearingMintConfigState.lastUpdateTimestamp), + Number(interestBearingMintConfigState.initializationTimestamp), + interestBearingMintConfigState.preUpdateAverageRate, + interestBearingMintConfigState.currentRate, + ); +} + +/** + * Convert an amount with interest back to the original amount without interest + * This implements the same logic as the CPI instruction available in /token/program-2022/src/extension/interest_bearing_mint/mod.rs + * + * @param uiAmount UI Amount (principal plus continuously compounding interest) to be converted back to original principal + * @param decimals Number of decimals for the mint + * @param currentTimestamp Current timestamp in seconds + * @param lastUpdateTimestamp Last time the interest rate was updated in seconds + * @param initializationTimestamp Time the interest bearing extension was initialized in seconds + * @param preUpdateAverageRate Interest rate in basis points (hundredths of a percent) before the last update + * @param currentRate Current interest rate in basis points + * + * In general to calculate the principal from the UI amount, the formula is: + * P = A / (e^(r * t)) where + * P = principal + * A = UI amount + * r = annual interest rate (as a decimal, e.g., 5% = 0.05) + * t = time in years + * + * In this case, we are calculating the principal by dividing the UI amount by the total scale factor which is the product of two exponential functions: + * totalScale = e^(r1 * t1) * e^(r2 * t2) + * where r1 is the pre-update average rate, r2 is the current rate, t1 is the time in years between the initialization timestamp and the last update timestamp, + * and t2 is the time in years between the last update timestamp and the current timestamp. + * then to calculate the principal, we divide the UI amount by the total scale factor: + * P = A / totalScale + * + * @return Original amount (principal) without interest + */ +export function uiAmountToAmountWithoutSimulation( + uiAmount: string, + decimals: number, + currentTimestamp: number, // in seconds + lastUpdateTimestamp: number, + initializationTimestamp: number, + preUpdateAverageRate: number, + currentRate: number, +): bigint { + const uiAmountNumber = parseFloat(uiAmount); + const decimalsFactor = Math.pow(10, decimals); + const uiAmountScaled = uiAmountNumber * decimalsFactor; + + // Calculate pre-update exponent + const preUpdateExp = calculateExponentForTimesAndRate( + initializationTimestamp, + lastUpdateTimestamp, + preUpdateAverageRate, + ); + + // Calculate post-update exponent + const postUpdateExp = calculateExponentForTimesAndRate(lastUpdateTimestamp, currentTimestamp, currentRate); + + // Calculate total scale + const totalScale = preUpdateExp * postUpdateExp; + + // Calculate original principal by dividing the UI amount (principal + interest) by the total scale + const originalPrincipal = uiAmountScaled / totalScale; + return BigInt(Math.trunc(originalPrincipal)); +} + +/** + * Convert a UI amount back to the raw amount + * + * @param connection Connection to use + * @param mint Mint to use for calculations + * @param uiAmount UI Amount to be converted back to raw amount + * + * + * @return Raw amount + */ +export async function uiAmountToAmountForMintWithoutSimulation( + connection: Connection, + mint: PublicKey, + uiAmount: string, +): Promise { + const accountInfo = await connection.getAccountInfo(mint); + const programId = accountInfo?.owner; + if (programId !== TOKEN_PROGRAM_ID && programId !== TOKEN_2022_PROGRAM_ID) { + throw new Error('Invalid program ID'); + } + + const mintInfo = unpackMint(mint, accountInfo, programId); + const interestBearingMintConfigState = getInterestBearingMintConfigState(mintInfo); + if (!interestBearingMintConfigState) { + const uiAmountScaled = parseFloat(uiAmount) * Math.pow(10, mintInfo.decimals); + return BigInt(Math.trunc(uiAmountScaled)); + } + + const timestamp = await getSysvarClockTimestamp(connection); + + return uiAmountToAmountWithoutSimulation( + uiAmount, + mintInfo.decimals, + timestamp, + Number(interestBearingMintConfigState.lastUpdateTimestamp), + Number(interestBearingMintConfigState.initializationTimestamp), + interestBearingMintConfigState.preUpdateAverageRate, + interestBearingMintConfigState.currentRate, + ); +} diff --git a/token/js/test/unit/interestBearing.test.ts b/token/js/test/unit/interestBearing.test.ts new file mode 100644 index 00000000000..c3bce68970d --- /dev/null +++ b/token/js/test/unit/interestBearing.test.ts @@ -0,0 +1,327 @@ +import { expect } from 'chai'; +import type { Connection } from '@solana/web3.js'; +import { PublicKey } from '@solana/web3.js'; +import { + amountToUiAmountForMintWithoutSimulation, + uiAmountToAmountForMintWithoutSimulation, +} from '../../src/actions/amountToUiAmount'; +import { AccountLayout, InterestBearingMintConfigStateLayout, TOKEN_2022_PROGRAM_ID } from '../../src'; +import { MintLayout } from '../../src/state/mint'; +import { ExtensionType } from '../../src/extensions/extensionType'; +import { AccountType } from '../../src/extensions/accountType'; + +const ONE_YEAR_IN_SECONDS = 31556736; + +// Mock connection class +class MockConnection { + private mockAccountInfo: any; + private mockClock: { + epoch: number; + epochStartTimestamp: number; + leaderScheduleEpoch: number; + slot: number; + unixTimestamp: number; + }; + + constructor() { + this.mockAccountInfo = null; + this.mockClock = { + epoch: 0, + epochStartTimestamp: 0, + leaderScheduleEpoch: 0, + slot: 0, + unixTimestamp: ONE_YEAR_IN_SECONDS, + }; + } + + getAccountInfo = async (address: PublicKey) => { + return this.getParsedAccountInfo(address); + }; + + // used to get the clock timestamp + getParsedAccountInfo = async (address: PublicKey) => { + if (address.toString() === 'SysvarC1ock11111111111111111111111111111111') { + return { + value: { + data: { + parsed: { + info: this.mockClock, + }, + }, + }, + }; + } + return this.mockAccountInfo; + }; + + setClockTimestamp(timestamp: number) { + this.mockClock = { + ...this.mockClock, + unixTimestamp: timestamp, + }; + } + + resetClock() { + this.mockClock = { + ...this.mockClock, + unixTimestamp: ONE_YEAR_IN_SECONDS, + }; + } + + setAccountInfo(info: any) { + this.mockAccountInfo = info; + } +} + +function createMockMintData( + decimals = 2, + hasInterestBearingConfig = false, + config: { preUpdateAverageRate?: number; currentRate?: number } = {}, +) { + const mintData = Buffer.alloc(MintLayout.span); + MintLayout.encode( + { + mintAuthorityOption: 1, + mintAuthority: new PublicKey(new Uint8Array(32).fill(1)), + supply: BigInt(1000000), + decimals: decimals, + isInitialized: true, + freezeAuthorityOption: 1, + freezeAuthority: new PublicKey(new Uint8Array(32).fill(1)), + }, + mintData, + ); + + const baseData = Buffer.alloc(AccountLayout.span + 1); + mintData.copy(baseData, 0); + baseData[AccountLayout.span] = AccountType.Mint; + + if (!hasInterestBearingConfig) { + return baseData; + } + + // write extension data using the InterestBearingMintConfigStateLayout + const extensionData = Buffer.alloc(InterestBearingMintConfigStateLayout.span); + const rateAuthority = new Uint8Array(32).fill(1); // rate authority + Buffer.from(rateAuthority).copy(extensionData, 0); + extensionData.writeBigUInt64LE(BigInt(0), 32); // initialization timestamp + extensionData.writeInt16LE(config.preUpdateAverageRate || 500, 40); // pre-update average rate + extensionData.writeBigUInt64LE(BigInt(ONE_YEAR_IN_SECONDS), 42); // last update timestamp + extensionData.writeInt16LE(config.currentRate || 500, 50); // current rate + + const TYPE_SIZE = 2; + const LENGTH_SIZE = 2; + const tlvBuffer = Buffer.alloc(TYPE_SIZE + LENGTH_SIZE + extensionData.length); + tlvBuffer.writeUInt16LE(ExtensionType.InterestBearingConfig, 0); + tlvBuffer.writeUInt16LE(extensionData.length, TYPE_SIZE); + extensionData.copy(tlvBuffer, TYPE_SIZE + LENGTH_SIZE); + + const fullData = Buffer.alloc(baseData.length + tlvBuffer.length); + baseData.copy(fullData, 0); + tlvBuffer.copy(fullData, baseData.length); + + return fullData; +} + +describe('amountToUiAmountForMintWithoutSimulation', () => { + let connection: MockConnection; + const mint = new PublicKey('So11111111111111111111111111111111111111112'); + + beforeEach(() => { + connection = new MockConnection() as unknown as MockConnection; + }); + + afterEach(() => { + connection.resetClock(); + }); + + it('should return the correct UiAmount when interest bearing config is not present', async () => { + const testCases = [ + { decimals: 0, amount: BigInt(100), expected: '100' }, + { decimals: 2, amount: BigInt(100), expected: '1' }, + { decimals: 9, amount: BigInt(1000000000), expected: '1' }, + { decimals: 10, amount: BigInt(1), expected: '1e-10' }, + { decimals: 10, amount: BigInt(1000000000), expected: '0.1' }, + ]; + + for (const { decimals, amount, expected } of testCases) { + connection.setAccountInfo({ + owner: TOKEN_2022_PROGRAM_ID, + lamports: 1000000, + data: createMockMintData(decimals, false), + }); + + const result = await amountToUiAmountForMintWithoutSimulation( + connection as unknown as Connection, + mint, + amount, + ); + expect(result).to.equal(expected); + } + }); + + // continuous compounding interest of 5% for 1 year for 1 token = 1.0512710963760240397 + it('should return the correct UiAmount for constant 5% rate', async () => { + const testCases = [ + { decimals: 0, amount: BigInt(1), expected: '1' }, + { decimals: 1, amount: BigInt(1), expected: '0.1' }, + { decimals: 10, amount: BigInt(1), expected: '1e-10' }, + { decimals: 10, amount: BigInt(10000000000), expected: '1.0512710963' }, + ]; + + for (const { decimals, amount, expected } of testCases) { + connection.setAccountInfo({ + owner: TOKEN_2022_PROGRAM_ID, + lamports: 1000000, + data: createMockMintData(decimals, true), + }); + + const result = await amountToUiAmountForMintWithoutSimulation( + connection as unknown as Connection, + mint, + amount, + ); + expect(result).to.equal(expected); + } + }); + + it('should return the correct UiAmount for constant -5% rate', async () => { + connection.setAccountInfo({ + owner: TOKEN_2022_PROGRAM_ID, + lamports: 1000000, + data: createMockMintData(10, true, { preUpdateAverageRate: -500, currentRate: -500 }), + }); + + const result = await amountToUiAmountForMintWithoutSimulation( + connection as unknown as Connection, + mint, + BigInt(10000000000), + ); + expect(result).to.equal('0.9512294245'); + }); + + it('should return the correct UiAmount for netting out rates', async () => { + connection.setClockTimestamp(ONE_YEAR_IN_SECONDS * 2); + connection.setAccountInfo({ + owner: TOKEN_2022_PROGRAM_ID, + lamports: 1000000, + data: createMockMintData(10, true, { preUpdateAverageRate: -500, currentRate: 500 }), + }); + + const result = await amountToUiAmountForMintWithoutSimulation( + connection as unknown as Connection, + mint, + BigInt(10000000000), + ); + expect(result).to.equal('1'); + }); + + it('should handle huge values correctly', async () => { + connection.setClockTimestamp(ONE_YEAR_IN_SECONDS * 2); + connection.setAccountInfo({ + owner: TOKEN_2022_PROGRAM_ID, + lamports: 1000000, + data: createMockMintData(6, true), + }); + + const result = await amountToUiAmountForMintWithoutSimulation( + connection as unknown as Connection, + mint, + BigInt('18446744073709551615'), + ); + expect(result).to.equal('20386805083448.098'); + }); +}); + +describe('amountToUiAmountForMintWithoutSimulation', () => { + let connection: MockConnection; + const mint = new PublicKey('So11111111111111111111111111111111111111112'); + + beforeEach(() => { + connection = new MockConnection() as unknown as MockConnection; + }); + + afterEach(() => { + connection.resetClock(); + }); + it('should return the correct amount for constant 5% rate', async () => { + connection.setAccountInfo({ + owner: TOKEN_2022_PROGRAM_ID, + lamports: 1000000, + data: createMockMintData(0, true), + }); + + const result = await uiAmountToAmountForMintWithoutSimulation( + connection as unknown as Connection, + mint, + '1.0512710963760241', + ); + expect(result).to.equal(1n); + }); + + it('should handle decimal places correctly', async () => { + const testCases = [ + { decimals: 1, uiAmount: '0.10512710963760241', expected: 1n }, + { decimals: 10, uiAmount: '0.00000000010512710963760242', expected: 1n }, + { decimals: 10, uiAmount: '1.0512710963760241', expected: 10000000000n }, + ]; + + for (const { decimals, uiAmount, expected } of testCases) { + connection.setAccountInfo({ + owner: TOKEN_2022_PROGRAM_ID, + lamports: 1000000, + data: createMockMintData(decimals, true), + }); + + const result = await uiAmountToAmountForMintWithoutSimulation( + connection as unknown as Connection, + mint, + uiAmount, + ); + expect(result).to.equal(expected); + } + }); + + it('should return the correct amount for constant -5% rate', async () => { + connection.setAccountInfo({ + owner: TOKEN_2022_PROGRAM_ID, + lamports: 1000000, + data: createMockMintData(10, true, { preUpdateAverageRate: -500, currentRate: -500 }), + }); + + const result = await uiAmountToAmountForMintWithoutSimulation( + connection as unknown as Connection, + mint, + '0.951229424500714', + ); + expect(result).to.equal(9999999999n); // calculation truncates to avoid floating point precision issues in transfers + }); + + it('should return the correct amount for netting out rates', async () => { + connection.setClockTimestamp(ONE_YEAR_IN_SECONDS * 2); + connection.setAccountInfo({ + owner: TOKEN_2022_PROGRAM_ID, + lamports: 1000000, + data: createMockMintData(10, true, { preUpdateAverageRate: -500, currentRate: 500 }), + }); + + const result = await uiAmountToAmountForMintWithoutSimulation(connection as unknown as Connection, mint, '1'); + expect(result).to.equal(10000000000n); + }); + + it('should handle huge values correctly', async () => { + connection.setClockTimestamp(ONE_YEAR_IN_SECONDS * 2); + connection.setAccountInfo({ + owner: TOKEN_2022_PROGRAM_ID, + lamports: 1000000, + data: createMockMintData(0, true), + }); + + const result = await uiAmountToAmountForMintWithoutSimulation( + connection as unknown as Connection, + mint, + '20386805083448100000', + ); + expect(result).to.equal(18446744073709551616n); + }); +}); From 9854b11349a2bc2034a2173d88c00fb49bd4b4cb Mon Sep 17 00:00:00 2001 From: Jonas Hahn Date: Thu, 5 Dec 2024 11:52:55 +0100 Subject: [PATCH 46/52] Update transfer-fee parameters to new version (#7561) --- docs/src/token-2022/extensions.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/token-2022/extensions.mdx b/docs/src/token-2022/extensions.mdx index 7e69a375aa7..12965fee813 100644 --- a/docs/src/token-2022/extensions.mdx +++ b/docs/src/token-2022/extensions.mdx @@ -165,7 +165,7 @@ tokens. ```console -$ spl-token --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb create-token --transfer-fee 50 5000 +$ spl-token --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb create-token --transfer-fee-basis-points 50 --transfer-fee-maximum-fee 5000 Creating token Dg3i18BN7vzsbAZDnDv3H8nQQjSaPUTqhwX41J7NZb5H under program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb Address: Dg3i18BN7vzsbAZDnDv3H8nQQjSaPUTqhwX41J7NZb5H From a3e484f68d17c3e14766283e42d6f6d5aeff1ef2 Mon Sep 17 00:00:00 2001 From: Jon C Date: Fri, 6 Dec 2024 13:19:41 +0100 Subject: [PATCH 47/52] token-2022: Take decimals into account for UI amount (#7540) #### Problem The interest-bearing and scaled UI amount extensions don't take into account the mint decimals when printing the number, and they don't properly trim afterwards. This can be confusing. #### Summary of changes Update the UI amount conversion to take into account the decimals of precision, and then actually trim. Note that a lot of calculations become more precise because of this change! --- .../extension/interest_bearing_mint/mod.rs | 33 +++++++++++-------- .../src/extension/scaled_ui_amount/mod.rs | 8 +++-- token/program-2022/src/lib.rs | 13 +++++--- 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/token/program-2022/src/extension/interest_bearing_mint/mod.rs b/token/program-2022/src/extension/interest_bearing_mint/mod.rs index bd2dc86c595..29fb5e250df 100644 --- a/token/program-2022/src/extension/interest_bearing_mint/mod.rs +++ b/token/program-2022/src/extension/interest_bearing_mint/mod.rs @@ -1,7 +1,10 @@ #[cfg(feature = "serde-traits")] use serde::{Deserialize, Serialize}; use { - crate::extension::{Extension, ExtensionType}, + crate::{ + extension::{Extension, ExtensionType}, + trim_ui_amount_string, + }, bytemuck::{Pod, Zeroable}, solana_program::program_error::ProgramError, spl_pod::{ @@ -81,7 +84,7 @@ impl InterestBearingConfig { } /// Convert a raw amount to its UI representation using the given decimals - /// field Excess zeroes or unneeded decimal point are trimmed. + /// field. Excess zeroes or unneeded decimal point are trimmed. pub fn amount_to_ui_amount( &self, amount: u64, @@ -90,7 +93,8 @@ impl InterestBearingConfig { ) -> Option { let scaled_amount_with_interest = (amount as f64) * self.total_scale(decimals, unix_timestamp)?; - Some(scaled_amount_with_interest.to_string()) + let ui_amount = format!("{scaled_amount_with_interest:.*}", decimals as usize); + Some(trim_ui_amount_string(ui_amount, decimals)) } /// Try to convert a UI representation of a token amount to its raw amount @@ -167,6 +171,7 @@ mod tests { #[test] fn specific_amount_to_ui_amount() { + const ONE: u64 = 1_000_000_000_000_000_000; // constant 5% let config = InterestBearingConfig { rate_authority: OptionalNonZeroPubkey::default(), @@ -177,25 +182,25 @@ mod tests { }; // 1 year at 5% gives a total of exp(0.05) = 1.0512710963760241 let ui_amount = config - .amount_to_ui_amount(1, 0, INT_SECONDS_PER_YEAR) + .amount_to_ui_amount(ONE, 18, INT_SECONDS_PER_YEAR) .unwrap(); - assert_eq!(ui_amount, "1.0512710963760241"); + assert_eq!(ui_amount, "1.051271096376024117"); // with 1 decimal place let ui_amount = config - .amount_to_ui_amount(1, 1, INT_SECONDS_PER_YEAR) + .amount_to_ui_amount(ONE, 19, INT_SECONDS_PER_YEAR) .unwrap(); - assert_eq!(ui_amount, "0.10512710963760241"); + assert_eq!(ui_amount, "0.1051271096376024117"); // with 10 decimal places let ui_amount = config - .amount_to_ui_amount(1, 10, INT_SECONDS_PER_YEAR) + .amount_to_ui_amount(ONE, 28, INT_SECONDS_PER_YEAR) .unwrap(); - assert_eq!(ui_amount, "0.00000000010512710963760242"); // different digit at the end! + assert_eq!(ui_amount, "0.0000000001051271096376024175"); // different digits at the end! // huge amount with 10 decimal places let ui_amount = config .amount_to_ui_amount(10_000_000_000, 10, INT_SECONDS_PER_YEAR) .unwrap(); - assert_eq!(ui_amount, "1.0512710963760241"); + assert_eq!(ui_amount, "1.0512710964"); // negative let config = InterestBearingConfig { @@ -207,9 +212,9 @@ mod tests { }; // 1 year at -5% gives a total of exp(-0.05) = 0.951229424500714 let ui_amount = config - .amount_to_ui_amount(1, 0, INT_SECONDS_PER_YEAR) + .amount_to_ui_amount(ONE, 18, INT_SECONDS_PER_YEAR) .unwrap(); - assert_eq!(ui_amount, "0.951229424500714"); + assert_eq!(ui_amount, "0.951229424500713905"); // net out let config = InterestBearingConfig { @@ -236,12 +241,12 @@ mod tests { let ui_amount = config .amount_to_ui_amount(u64::MAX, 0, INT_SECONDS_PER_YEAR * 2) .unwrap(); - assert_eq!(ui_amount, "20386805083448100000"); + assert_eq!(ui_amount, "20386805083448098816"); let ui_amount = config .amount_to_ui_amount(u64::MAX, 0, INT_SECONDS_PER_YEAR * 10_000) .unwrap(); // there's an underflow risk, but it works! - assert_eq!(ui_amount, "258917064265813830000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); + assert_eq!(ui_amount, "258917064265813826192025834755112557504850551118283225815045099303279643822914042296793377611277551888244755303462190670431480816358154467489350925148558569427069926786360814068189956495940285398273555561779717914539956777398245259214848"); } #[test] diff --git a/token/program-2022/src/extension/scaled_ui_amount/mod.rs b/token/program-2022/src/extension/scaled_ui_amount/mod.rs index 839caf585c5..80b635f207e 100644 --- a/token/program-2022/src/extension/scaled_ui_amount/mod.rs +++ b/token/program-2022/src/extension/scaled_ui_amount/mod.rs @@ -1,7 +1,10 @@ #[cfg(feature = "serde-traits")] use serde::{Deserialize, Serialize}; use { - crate::extension::{Extension, ExtensionType}, + crate::{ + extension::{Extension, ExtensionType}, + trim_ui_amount_string, + }, bytemuck::{Pod, Zeroable}, solana_program::program_error::ProgramError, spl_pod::{optional_keys::OptionalNonZeroPubkey, primitives::PodI64}, @@ -72,7 +75,8 @@ impl ScaledUiAmountConfig { unix_timestamp: i64, ) -> Option { let scaled_amount = (amount as f64) * self.total_multiplier(decimals, unix_timestamp); - Some(scaled_amount.to_string()) + let ui_amount = format!("{scaled_amount:.*}", decimals as usize); + Some(trim_ui_amount_string(ui_amount, decimals)) } /// Try to convert a UI representation of a token amount to its raw amount diff --git a/token/program-2022/src/lib.rs b/token/program-2022/src/lib.rs index 4d9969cc3ff..93d2e058b6f 100644 --- a/token/program-2022/src/lib.rs +++ b/token/program-2022/src/lib.rs @@ -62,12 +62,17 @@ pub fn amount_to_ui_amount_string(amount: u64, decimals: u8) -> String { /// Convert a raw amount to its UI representation using the given decimals field /// Excess zeroes or unneeded decimal point are trimmed. pub fn amount_to_ui_amount_string_trimmed(amount: u64, decimals: u8) -> String { - let mut s = amount_to_ui_amount_string(amount, decimals); + let s = amount_to_ui_amount_string(amount, decimals); + trim_ui_amount_string(s, decimals) +} + +/// Trims a string number by removing excess zeroes or unneeded decimal point +fn trim_ui_amount_string(mut ui_amount: String, decimals: u8) -> String { if decimals > 0 { - let zeros_trimmed = s.trim_end_matches('0'); - s = zeros_trimmed.trim_end_matches('.').to_string(); + let zeros_trimmed = ui_amount.trim_end_matches('0'); + ui_amount = zeros_trimmed.trim_end_matches('.').to_string(); } - s + ui_amount } /// Try to convert a UI representation of a token amount to its raw amount using From 77821a315feddcb5f407ff16079447b454b99335 Mon Sep 17 00:00:00 2001 From: goodactive <167312449+goodactive@users.noreply.github.com> Date: Sat, 7 Dec 2024 02:49:48 +0800 Subject: [PATCH 48/52] chore: fix some comments (#7564) Signed-off-by: goodactive --- binary-option/client/binary_option.py | 2 +- token-lending/program/src/state/reserve.rs | 2 +- token/confidential-transfer/proof-extraction/src/burn.rs | 2 +- token/confidential-transfer/proof-extraction/src/mint.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/binary-option/client/binary_option.py b/binary-option/client/binary_option.py index 08972560f00..da78cc00545 100644 --- a/binary-option/client/binary_option.py +++ b/binary-option/client/binary_option.py @@ -140,7 +140,7 @@ def __init__(self, cfg): def initialize(self, api_endpoint, escrow_mint, decimals=2, skip_confirmation=True): msg = "" - # Initialize Clinet + # Initialize Client client = Client(api_endpoint) msg += "Initialized client" # Create account objects diff --git a/token-lending/program/src/state/reserve.rs b/token-lending/program/src/state/reserve.rs index e271f3b76f2..26b14b8f91c 100644 --- a/token-lending/program/src/state/reserve.rs +++ b/token-lending/program/src/state/reserve.rs @@ -755,7 +755,7 @@ impl ReserveFees { } } -/// Calculate fees exlusive or inclusive of an amount +/// Calculate fees exclusive or inclusive of an amount pub enum FeeCalculation { /// Fee added to amount: fee = rate * amount Exclusive, diff --git a/token/confidential-transfer/proof-extraction/src/burn.rs b/token/confidential-transfer/proof-extraction/src/burn.rs index 1bfc706e369..dbfa6d1e81a 100644 --- a/token/confidential-transfer/proof-extraction/src/burn.rs +++ b/token/confidential-transfer/proof-extraction/src/burn.rs @@ -32,7 +32,7 @@ impl BurnProofContext { range_proof_context: &BatchedRangeProofContext, ) -> Result { // The equality proof context consists of the source ElGamal public key, the new - // source available balance ciphertext, and the new source avaialble + // source available balance ciphertext, and the new source available // balance commitment. The public key should be checked with ciphertext // validity proof context for consistency and the commitment should be // checked with range proof for consistency. The public key and diff --git a/token/confidential-transfer/proof-extraction/src/mint.rs b/token/confidential-transfer/proof-extraction/src/mint.rs index cffe8616dc6..97f67f91ae7 100644 --- a/token/confidential-transfer/proof-extraction/src/mint.rs +++ b/token/confidential-transfer/proof-extraction/src/mint.rs @@ -57,7 +57,7 @@ impl MintProofContext { // The range proof context consists of the Pedersen commitments and bit-lengths // for which the range proof is proved. The commitments must consist of - // two commitments pertaining to the the + // two commitments pertaining to the // low bits of the mint amount, and high bits of the mint // amount. These commitments must be checked for bit lengths `16` and // and `32`. From 378f89bd4c997d24461e58e03f04c561522bc58d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:24:57 +0100 Subject: [PATCH 49/52] build(deps): bump thiserror from 2.0.4 to 2.0.6 (#7566) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 2.0.4 to 2.0.6. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/2.0.4...2.0.6) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 80 +++++++++---------- libraries/concurrent-merkle-tree/Cargo.toml | 2 +- libraries/merkle-tree-reference/Cargo.toml | 2 +- managed-token/program/Cargo.toml | 2 +- name-service/program/Cargo.toml | 2 +- .../proof-extraction/Cargo.toml | 2 +- .../proof-generation/Cargo.toml | 2 +- .../proof-tests/Cargo.toml | 2 +- 8 files changed, 47 insertions(+), 47 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d26ef366778..9f0a0b5091b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -667,7 +667,7 @@ dependencies = [ "borsh 1.5.3", "solana-program", "spl-token 7.0.0", - "thiserror 2.0.4", + "thiserror 2.0.6", "uint", ] @@ -7773,7 +7773,7 @@ dependencies = [ "spl-associated-token-account-client", "spl-token 7.0.0", "spl-token-2022 6.0.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -7809,7 +7809,7 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token 7.0.0", - "thiserror 2.0.4", + "thiserror 2.0.6", "uint", ] @@ -7822,7 +7822,7 @@ dependencies = [ "rand_distr", "solana-program", "spl-merkle-tree-reference", - "thiserror 2.0.4", + "thiserror 2.0.6", "tokio", ] @@ -8005,7 +8005,7 @@ dependencies = [ "spl-governance-test-sdk", "spl-governance-tools", "spl-token 7.0.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8037,7 +8037,7 @@ dependencies = [ "spl-governance-test-sdk", "spl-governance-tools", "spl-token 7.0.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8062,7 +8062,7 @@ dependencies = [ "spl-governance-test-sdk", "spl-governance-tools", "spl-token 7.0.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8081,7 +8081,7 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token 7.0.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8097,7 +8097,7 @@ dependencies = [ "serde_derive", "solana-program", "spl-token 7.0.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8129,7 +8129,7 @@ dependencies = [ "spl-associated-token-account 6.0.0", "spl-associated-token-account-client", "spl-token 7.0.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8153,7 +8153,7 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-math", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8184,7 +8184,7 @@ name = "spl-merkle-tree-reference" version = "0.1.0" dependencies = [ "solana-program", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8197,7 +8197,7 @@ dependencies = [ "solana-program", "solana-program-test", "solana-sdk", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8232,7 +8232,7 @@ dependencies = [ "solana-program-option", "solana-pubkey", "solana-zk-sdk", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8259,7 +8259,7 @@ dependencies = [ "solana-program", "solana-sdk", "spl-program-error-derive 0.4.1", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8302,7 +8302,7 @@ dependencies = [ "solana-pubkey", "solana-rent", "solana-sdk", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8336,7 +8336,7 @@ dependencies = [ "spl-associated-token-account-client", "spl-token 7.0.0", "test-case", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8396,7 +8396,7 @@ dependencies = [ "solana-sdk", "spl-pod 0.5.0", "spl-record", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8423,7 +8423,7 @@ dependencies = [ "spl-token 7.0.0", "spl-token-2022 6.0.0", "test-case", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8489,7 +8489,7 @@ dependencies = [ "spl-pod 0.5.0", "spl-program-error 0.6.0", "spl-type-length-value 0.7.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8522,7 +8522,7 @@ dependencies = [ "solana-program", "solana-program-test", "solana-sdk", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8582,7 +8582,7 @@ dependencies = [ "spl-token-metadata-interface 0.6.0", "spl-transfer-hook-interface 0.9.0", "spl-type-length-value 0.7.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8680,7 +8680,7 @@ dependencies = [ "spl-token-group-interface 0.5.0", "spl-token-metadata-interface 0.6.0", "spl-transfer-hook-interface 0.9.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8722,7 +8722,7 @@ dependencies = [ "solana-program", "solana-zk-sdk", "spl-pod 0.5.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8731,7 +8731,7 @@ version = "0.2.0" dependencies = [ "curve25519-dalek 4.1.3", "solana-zk-sdk", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8742,7 +8742,7 @@ dependencies = [ "solana-zk-sdk", "spl-token-confidential-transfer-proof-extraction", "spl-token-confidential-transfer-proof-generation", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8790,7 +8790,7 @@ dependencies = [ "spl-discriminator 0.4.0", "spl-pod 0.5.0", "spl-type-length-value 0.7.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8807,7 +8807,7 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token 7.0.0", - "thiserror 2.0.4", + "thiserror 2.0.6", "uint", ] @@ -8874,7 +8874,7 @@ dependencies = [ "spl-discriminator 0.4.0", "spl-pod 0.5.0", "spl-type-length-value 0.7.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8894,7 +8894,7 @@ dependencies = [ "spl-token 7.0.0", "spl-token-2022 6.0.0", "test-case", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8923,7 +8923,7 @@ dependencies = [ "spl-token-2022 6.0.0", "spl-token-client", "test-case", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -8958,7 +8958,7 @@ dependencies = [ "spl-associated-token-account 6.0.0", "spl-token 7.0.0", "spl-token-2022 6.0.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -9090,7 +9090,7 @@ dependencies = [ "spl-program-error 0.6.0", "spl-tlv-account-resolution 0.9.0", "spl-type-length-value 0.7.0", - "thiserror 2.0.4", + "thiserror 2.0.6", "tokio", ] @@ -9121,7 +9121,7 @@ dependencies = [ "spl-discriminator 0.4.0", "spl-pod 0.5.0", "spl-type-length-value-derive", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -9153,7 +9153,7 @@ dependencies = [ "solana-sdk", "spl-associated-token-account-client", "spl-token 7.0.0", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -9476,11 +9476,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.4" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490" +checksum = "8fec2a1820ebd077e2b90c4df007bebf344cd394098a13c563957d0afc83ea47" dependencies = [ - "thiserror-impl 2.0.4", + "thiserror-impl 2.0.6", ] [[package]] @@ -9496,9 +9496,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.4" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061" +checksum = "d65750cab40f4ff1929fb1ba509e9914eb756131cef4210da8d5d700d26f6312" dependencies = [ "proc-macro2", "quote", diff --git a/libraries/concurrent-merkle-tree/Cargo.toml b/libraries/concurrent-merkle-tree/Cargo.toml index 737f7904184..28883a3990e 100644 --- a/libraries/concurrent-merkle-tree/Cargo.toml +++ b/libraries/concurrent-merkle-tree/Cargo.toml @@ -14,7 +14,7 @@ sol-log = ["log"] [dependencies] solana-program = ">=1.18.11,<=2" bytemuck = "1.20" -thiserror = "2.0.4" +thiserror = "2.0.6" [dev-dependencies] rand_distr = "0.4.3" diff --git a/libraries/merkle-tree-reference/Cargo.toml b/libraries/merkle-tree-reference/Cargo.toml index 5dd90e52221..39a28871fd9 100644 --- a/libraries/merkle-tree-reference/Cargo.toml +++ b/libraries/merkle-tree-reference/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" [dependencies] solana-program = ">=1.18.11,<=2" -thiserror = "2.0.4" +thiserror = "2.0.6" [lib] crate-type = ["cdylib", "lib"] diff --git a/managed-token/program/Cargo.toml b/managed-token/program/Cargo.toml index 419374619ff..78298c6f4f8 100644 --- a/managed-token/program/Cargo.toml +++ b/managed-token/program/Cargo.toml @@ -32,7 +32,7 @@ spl-associated-token-account-client = { version = "2.0.0", path = "../../associa spl-token = { version = "7.0", path = "../../token/program", features = [ "no-entrypoint", ] } -thiserror = "^2.0.4" +thiserror = "^2.0.6" [dev-dependencies] solana-program-test = "2.1.0" diff --git a/name-service/program/Cargo.toml b/name-service/program/Cargo.toml index 37fd9e6e6ce..e93a5684b45 100644 --- a/name-service/program/Cargo.toml +++ b/name-service/program/Cargo.toml @@ -21,7 +21,7 @@ solana-program = "2.1.0" num-traits = "0.2" borsh = "1.5.3" num-derive = "0.4.2" -thiserror = "2.0.4" +thiserror = "2.0.6" [dev-dependencies] solana-program-test = "2.1.0" diff --git a/token/confidential-transfer/proof-extraction/Cargo.toml b/token/confidential-transfer/proof-extraction/Cargo.toml index 284d74737a5..174c6ffcd32 100644 --- a/token/confidential-transfer/proof-extraction/Cargo.toml +++ b/token/confidential-transfer/proof-extraction/Cargo.toml @@ -13,7 +13,7 @@ solana-curve25519 = "2.1.0" solana-program = "2.1.0" solana-zk-sdk = "2.1.0" spl-pod = { version = "0.5.0", path = "../../../libraries/pod" } -thiserror = "2.0.4" +thiserror = "2.0.6" [lib] crate-type = ["cdylib", "lib"] diff --git a/token/confidential-transfer/proof-generation/Cargo.toml b/token/confidential-transfer/proof-generation/Cargo.toml index da019d4d16a..07f2a4400c0 100644 --- a/token/confidential-transfer/proof-generation/Cargo.toml +++ b/token/confidential-transfer/proof-generation/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" [dependencies] curve25519-dalek = "4.1.3" solana-zk-sdk = "2.1.0" -thiserror = "2.0.4" +thiserror = "2.0.6" [dev-dependencies] diff --git a/token/confidential-transfer/proof-tests/Cargo.toml b/token/confidential-transfer/proof-tests/Cargo.toml index dca19451b94..88cdbf9407b 100644 --- a/token/confidential-transfer/proof-tests/Cargo.toml +++ b/token/confidential-transfer/proof-tests/Cargo.toml @@ -10,6 +10,6 @@ edition = "2021" [dev-dependencies] curve25519-dalek = "4.1.3" solana-zk-sdk = "2.1.0" -thiserror = "2.0.4" +thiserror = "2.0.6" spl-token-confidential-transfer-proof-extraction = { version = "0.2.0", path = "../proof-extraction" } spl-token-confidential-transfer-proof-generation = { version = "0.2.0", path = "../proof-generation" } From 84e1d9f2b6c0da69b30d61d8ca18238dbd03b821 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:51:16 +0100 Subject: [PATCH 50/52] build(deps-dev): bump typedoc from 0.27.3 to 0.27.4 (#7567) Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.27.3 to 0.27.4. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.27.3...v0.27.4) --- updated-dependencies: - dependency-name: typedoc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- account-compression/sdk/package.json | 2 +- libraries/type-length-value/js/package.json | 2 +- name-service/js/package.json | 2 +- pnpm-lock.yaml | 32 ++++++++++----------- token-group/js/package.json | 2 +- token-lending/js/package.json | 2 +- token-metadata/js/package.json | 2 +- token/js/package.json | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/account-compression/sdk/package.json b/account-compression/sdk/package.json index d42367c906f..bca69467621 100644 --- a/account-compression/sdk/package.json +++ b/account-compression/sdk/package.json @@ -85,7 +85,7 @@ "ts-jest": "^29.2.5", "ts-jest-resolver": "^2.0.1", "ts-node": "^10.9.2", - "typedoc": "^0.27.3", + "typedoc": "^0.27.4", "typescript": "5.7.2" } } diff --git a/libraries/type-length-value/js/package.json b/libraries/type-length-value/js/package.json index d8416b337e2..767b1766c53 100644 --- a/libraries/type-length-value/js/package.json +++ b/libraries/type-length-value/js/package.json @@ -59,7 +59,7 @@ "mocha": "^11.0.1", "shx": "^0.3.4", "ts-node": "^10.9.2", - "typedoc": "^0.27.3", + "typedoc": "^0.27.4", "typescript": "^5.7.2" } } diff --git a/name-service/js/package.json b/name-service/js/package.json index 3629eacf0ff..2b92ae75ab8 100644 --- a/name-service/js/package.json +++ b/name-service/js/package.json @@ -56,7 +56,7 @@ "start-server-and-test": "^2.0.8", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "typedoc": "^0.27.3", + "typedoc": "^0.27.4", "typescript": "^5.7.2" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 53d08f634d2..c6bf2999803 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -124,8 +124,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.3 - version: 0.27.3(typescript@5.7.2) + specifier: ^0.27.4 + version: 0.27.4(typescript@5.7.2) typescript: specifier: 5.7.2 version: 5.7.2 @@ -176,8 +176,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.3 - version: 0.27.3(typescript@5.7.2) + specifier: ^0.27.4 + version: 0.27.4(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -237,8 +237,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.3 - version: 0.27.3(typescript@5.7.2) + specifier: ^0.27.4 + version: 0.27.4(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -445,8 +445,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.27.3 - version: 0.27.3(typescript@5.7.2) + specifier: ^0.27.4 + version: 0.27.4(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -509,8 +509,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.27.3 - version: 0.27.3(typescript@5.7.2) + specifier: ^0.27.4 + version: 0.27.4(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -567,8 +567,8 @@ importers: specifier: ^2.8.1 version: 2.8.1 typedoc: - specifier: ^0.27.3 - version: 0.27.3(typescript@5.7.2) + specifier: ^0.27.4 + version: 0.27.4(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -707,8 +707,8 @@ importers: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) typedoc: - specifier: ^0.27.3 - version: 0.27.3(typescript@5.7.2) + specifier: ^0.27.4 + version: 0.27.4(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -9212,8 +9212,8 @@ packages: possible-typed-array-names: 1.0.0 dev: true - /typedoc@0.27.3(typescript@5.7.2): - resolution: {integrity: sha512-oWT7zDS5oIaxYL5yOikBX4cL99CpNAZn6mI24JZQxsYuIHbtguSSwJ7zThuzNNwSE0wqhlfTSd99HgqKu2aQXQ==} + /typedoc@0.27.4(typescript@5.7.2): + resolution: {integrity: sha512-wXPQs1AYC2Crk+1XFpNuutLIkNWleokZf1UNf/X8w9KsMnirkvT+LzxTXDvfF6ug3TSLf3Xu5ZXRKGfoXPX7IA==} engines: {node: '>= 18'} hasBin: true peerDependencies: diff --git a/token-group/js/package.json b/token-group/js/package.json index 9ad6737693d..cd99596eceb 100644 --- a/token-group/js/package.json +++ b/token-group/js/package.json @@ -64,7 +64,7 @@ "shx": "^0.3.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.27.3", + "typedoc": "^0.27.4", "typescript": "^5.7.2" } } diff --git a/token-lending/js/package.json b/token-lending/js/package.json index 24d3de76b62..2bddf9fb90c 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -55,7 +55,7 @@ "rollup": "^4.28.0", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.27.3", + "typedoc": "^0.27.4", "typescript": "^5.7.2" } } diff --git a/token-metadata/js/package.json b/token-metadata/js/package.json index 1128bfc33f9..519a136c7ad 100644 --- a/token-metadata/js/package.json +++ b/token-metadata/js/package.json @@ -64,7 +64,7 @@ "shx": "^0.3.4", "ts-node": "^10.9.2", "tslib": "^2.8.1", - "typedoc": "^0.27.3", + "typedoc": "^0.27.4", "typescript": "^5.7.2" } } diff --git a/token/js/package.json b/token/js/package.json index 13dfe1a9a5f..4e7fd9f09ba 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -80,7 +80,7 @@ "shx": "^0.3.4", "start-server-and-test": "^2.0.8", "ts-node": "^10.9.2", - "typedoc": "^0.27.3", + "typedoc": "^0.27.4", "typescript": "^5.7.2" } } From f634a9b34ece38349262e525b255b73e09ec3bb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:51:25 +0100 Subject: [PATCH 51/52] build(deps-dev): bump rollup from 4.28.0 to 4.28.1 (#7568) Bumps [rollup](https://github.com/rollup/rollup) from 4.28.0 to 4.28.1. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.28.0...v4.28.1) --- updated-dependencies: - dependency-name: rollup dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 201 ++++++++++++++++++---------------- stake-pool/js/package.json | 2 +- token-lending/js/package.json | 2 +- 3 files changed, 107 insertions(+), 98 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c6bf2999803..a4d7a31f2da 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -331,25 +331,25 @@ importers: devDependencies: '@rollup/plugin-alias': specifier: ^5.1.1 - version: 5.1.1(rollup@4.28.0) + version: 5.1.1(rollup@4.28.1) '@rollup/plugin-commonjs': specifier: ^28.0.1 - version: 28.0.1(rollup@4.28.0) + version: 28.0.1(rollup@4.28.1) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.28.0) + version: 6.1.0(rollup@4.28.1) '@rollup/plugin-multi-entry': specifier: ^6.0.0 - version: 6.0.1(rollup@4.28.0) + version: 6.0.1(rollup@4.28.1) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.28.0) + version: 15.3.0(rollup@4.28.1) '@rollup/plugin-terser': specifier: ^0.4.4 - version: 0.4.4(rollup@4.28.0) + version: 0.4.4(rollup@4.28.1) '@rollup/plugin-typescript': specifier: ^12.1.1 - version: 12.1.1(rollup@4.28.0)(tslib@2.8.1)(typescript@5.7.2) + version: 12.1.1(rollup@4.28.1)(tslib@2.8.1)(typescript@5.7.2) '@types/bn.js': specifier: ^5.1.6 version: 5.1.6 @@ -381,11 +381,11 @@ importers: specifier: ^6.0.1 version: 6.0.1 rollup: - specifier: ^4.28.0 - version: 4.28.0 + specifier: ^4.28.1 + version: 4.28.1 rollup-plugin-dts: specifier: ^6.1.1 - version: 6.1.1(rollup@4.28.0)(typescript@5.7.2) + version: 6.1.1(rollup@4.28.1)(typescript@5.7.2) ts-jest: specifier: ^29.2.5 version: 29.2.5(@babel/core@7.26.0)(jest@29.7.0)(typescript@5.7.2) @@ -468,13 +468,13 @@ importers: devDependencies: '@rollup/plugin-commonjs': specifier: ^28.0.1 - version: 28.0.1(rollup@4.28.0) + version: 28.0.1(rollup@4.28.1) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.28.0) + version: 15.3.0(rollup@4.28.1) '@rollup/plugin-typescript': specifier: ^12.1.1 - version: 12.1.1(rollup@4.28.0)(tslib@2.8.1)(typescript@5.7.2) + version: 12.1.1(rollup@4.28.1)(tslib@2.8.1)(typescript@5.7.2) '@solana/spl-token': specifier: 0.4.9 version: link:../../token/js @@ -500,8 +500,8 @@ importers: specifier: ^6.2.0 version: 6.2.0 rollup: - specifier: ^4.28.0 - version: 4.28.0 + specifier: ^4.28.1 + version: 4.28.1 ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) @@ -2123,7 +2123,7 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dev: true - /@rollup/plugin-alias@5.1.1(rollup@4.28.0): + /@rollup/plugin-alias@5.1.1(rollup@4.28.1): resolution: {integrity: sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2132,10 +2132,10 @@ packages: rollup: optional: true dependencies: - rollup: 4.28.0 + rollup: 4.28.1 dev: true - /@rollup/plugin-commonjs@28.0.1(rollup@4.28.0): + /@rollup/plugin-commonjs@28.0.1(rollup@4.28.1): resolution: {integrity: sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==} engines: {node: '>=16.0.0 || 14 >= 14.17'} peerDependencies: @@ -2144,17 +2144,17 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.28.0) + '@rollup/pluginutils': 5.1.0(rollup@4.28.1) commondir: 1.0.1 estree-walker: 2.0.2 fdir: 6.3.0(picomatch@4.0.2) is-reference: 1.2.1 magic-string: 0.30.10 picomatch: 4.0.2 - rollup: 4.28.0 + rollup: 4.28.1 dev: true - /@rollup/plugin-json@6.1.0(rollup@4.28.0): + /@rollup/plugin-json@6.1.0(rollup@4.28.1): resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2163,11 +2163,11 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.28.0) - rollup: 4.28.0 + '@rollup/pluginutils': 5.1.0(rollup@4.28.1) + rollup: 4.28.1 dev: true - /@rollup/plugin-multi-entry@6.0.1(rollup@4.28.0): + /@rollup/plugin-multi-entry@6.0.1(rollup@4.28.1): resolution: {integrity: sha512-AXm6toPyTSfbYZWghQGbom1Uh7dHXlrGa+HoiYNhQtDUE3Q7LqoUYdVQx9E1579QWS1uOiu+cZRSE4okO7ySgw==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2176,12 +2176,12 @@ packages: rollup: optional: true dependencies: - '@rollup/plugin-virtual': 3.0.2(rollup@4.28.0) + '@rollup/plugin-virtual': 3.0.2(rollup@4.28.1) matched: 5.0.1 - rollup: 4.28.0 + rollup: 4.28.1 dev: true - /@rollup/plugin-node-resolve@15.3.0(rollup@4.28.0): + /@rollup/plugin-node-resolve@15.3.0(rollup@4.28.1): resolution: {integrity: sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2190,15 +2190,15 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.28.0) + '@rollup/pluginutils': 5.1.0(rollup@4.28.1) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-module: 1.0.0 resolve: 1.22.8 - rollup: 4.28.0 + rollup: 4.28.1 dev: true - /@rollup/plugin-terser@0.4.4(rollup@4.28.0): + /@rollup/plugin-terser@0.4.4(rollup@4.28.1): resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2207,13 +2207,13 @@ packages: rollup: optional: true dependencies: - rollup: 4.28.0 + rollup: 4.28.1 serialize-javascript: 6.0.1 smob: 1.4.1 terser: 5.24.0 dev: true - /@rollup/plugin-typescript@12.1.1(rollup@4.28.0)(tslib@2.8.1)(typescript@5.7.2): + /@rollup/plugin-typescript@12.1.1(rollup@4.28.1)(tslib@2.8.1)(typescript@5.7.2): resolution: {integrity: sha512-t7O653DpfB5MbFrqPe/VcKFFkvRuFNp9qId3xq4Eth5xlyymzxNpye2z8Hrl0RIMuXTSr5GGcFpkdlMeacUiFQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2226,14 +2226,14 @@ packages: tslib: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.28.0) + '@rollup/pluginutils': 5.1.0(rollup@4.28.1) resolve: 1.22.8 - rollup: 4.28.0 + rollup: 4.28.1 tslib: 2.8.1 typescript: 5.7.2 dev: true - /@rollup/plugin-virtual@3.0.2(rollup@4.28.0): + /@rollup/plugin-virtual@3.0.2(rollup@4.28.1): resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2242,7 +2242,7 @@ packages: rollup: optional: true dependencies: - rollup: 4.28.0 + rollup: 4.28.1 dev: true /@rollup/pluginutils@4.2.1: @@ -2253,7 +2253,7 @@ packages: picomatch: 2.3.1 dev: true - /@rollup/pluginutils@5.1.0(rollup@4.28.0): + /@rollup/pluginutils@5.1.0(rollup@4.28.1): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2265,147 +2265,155 @@ packages: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 4.28.0 + rollup: 4.28.1 dev: true - /@rollup/rollup-android-arm-eabi@4.28.0: - resolution: {integrity: sha512-wLJuPLT6grGZsy34g4N1yRfYeouklTgPhH1gWXCYspenKYD0s3cR99ZevOGw5BexMNywkbV3UkjADisozBmpPQ==} + /@rollup/rollup-android-arm-eabi@4.28.1: + resolution: {integrity: sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.28.0: - resolution: {integrity: sha512-eiNkznlo0dLmVG/6wf+Ifi/v78G4d4QxRhuUl+s8EWZpDewgk7PX3ZyECUXU0Zq/Ca+8nU8cQpNC4Xgn2gFNDA==} + /@rollup/rollup-android-arm64@4.28.1: + resolution: {integrity: sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.28.0: - resolution: {integrity: sha512-lmKx9yHsppblnLQZOGxdO66gT77bvdBtr/0P+TPOseowE7D9AJoBw8ZDULRasXRWf1Z86/gcOdpBrV6VDUY36Q==} + /@rollup/rollup-darwin-arm64@4.28.1: + resolution: {integrity: sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.28.0: - resolution: {integrity: sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w==} + /@rollup/rollup-darwin-x64@4.28.1: + resolution: {integrity: sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-freebsd-arm64@4.28.0: - resolution: {integrity: sha512-lA1zZB3bFx5oxu9fYud4+g1mt+lYXCoch0M0V/xhqLoGatbzVse0wlSQ1UYOWKpuSu3gyN4qEc0Dxf/DII1bhQ==} + /@rollup/rollup-freebsd-arm64@4.28.1: + resolution: {integrity: sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA==} cpu: [arm64] os: [freebsd] requiresBuild: true dev: true optional: true - /@rollup/rollup-freebsd-x64@4.28.0: - resolution: {integrity: sha512-aI2plavbUDjCQB/sRbeUZWX9qp12GfYkYSJOrdYTL/C5D53bsE2/nBPuoiJKoWp5SN78v2Vr8ZPnB+/VbQ2pFA==} + /@rollup/rollup-freebsd-x64@4.28.1: + resolution: {integrity: sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ==} cpu: [x64] os: [freebsd] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.28.0: - resolution: {integrity: sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w==} + /@rollup/rollup-linux-arm-gnueabihf@4.28.1: + resolution: {integrity: sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-musleabihf@4.28.0: - resolution: {integrity: sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg==} + /@rollup/rollup-linux-arm-musleabihf@4.28.1: + resolution: {integrity: sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.28.0: - resolution: {integrity: sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg==} + /@rollup/rollup-linux-arm64-gnu@4.28.1: + resolution: {integrity: sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.28.0: - resolution: {integrity: sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw==} + /@rollup/rollup-linux-arm64-musl@4.28.1: + resolution: {integrity: sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.28.0: - resolution: {integrity: sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ==} + /@rollup/rollup-linux-loongarch64-gnu@4.28.1: + resolution: {integrity: sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-powerpc64le-gnu@4.28.1: + resolution: {integrity: sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==} cpu: [ppc64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.28.0: - resolution: {integrity: sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g==} + /@rollup/rollup-linux-riscv64-gnu@4.28.1: + resolution: {integrity: sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-s390x-gnu@4.28.0: - resolution: {integrity: sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw==} + /@rollup/rollup-linux-s390x-gnu@4.28.1: + resolution: {integrity: sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg==} cpu: [s390x] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.28.0: - resolution: {integrity: sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw==} + /@rollup/rollup-linux-x64-gnu@4.28.1: + resolution: {integrity: sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.28.0: - resolution: {integrity: sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw==} + /@rollup/rollup-linux-x64-musl@4.28.1: + resolution: {integrity: sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.28.0: - resolution: {integrity: sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg==} + /@rollup/rollup-win32-arm64-msvc@4.28.1: + resolution: {integrity: sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.28.0: - resolution: {integrity: sha512-kN/Vpip8emMLn/eOza+4JwqDZBL6MPNpkdaEsgUtW1NYN3DZvZqSQrbKzJcTL6hd8YNmFTn7XGWMwccOcJBL0A==} + /@rollup/rollup-win32-ia32-msvc@4.28.1: + resolution: {integrity: sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.28.0: - resolution: {integrity: sha512-Bvno2/aZT6usSa7lRDL2+hMjVAGjuqaymF1ApZm31JXzniR/hvr14jpU+/z4X6Gt5BPlzosscyJZGUvguXIqeQ==} + /@rollup/rollup-win32-x64-msvc@4.28.1: + resolution: {integrity: sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA==} cpu: [x64] os: [win32] requiresBuild: true @@ -8361,7 +8369,7 @@ packages: package-json-from-dist: 1.0.0 dev: true - /rollup-plugin-dts@6.1.1(rollup@4.28.0)(typescript@5.7.2): + /rollup-plugin-dts@6.1.1(rollup@4.28.1)(typescript@5.7.2): resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} engines: {node: '>=16'} peerDependencies: @@ -8369,37 +8377,38 @@ packages: typescript: ^4.5 || ^5.0 dependencies: magic-string: 0.30.10 - rollup: 4.28.0 + rollup: 4.28.1 typescript: 5.7.2 optionalDependencies: '@babel/code-frame': 7.26.2 dev: true - /rollup@4.28.0: - resolution: {integrity: sha512-G9GOrmgWHBma4YfCcX8PjH0qhXSdH8B4HDE2o4/jaxj93S4DPCIDoLcXz99eWMji4hB29UFCEd7B2gwGJDR9cQ==} + /rollup@4.28.1: + resolution: {integrity: sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.28.0 - '@rollup/rollup-android-arm64': 4.28.0 - '@rollup/rollup-darwin-arm64': 4.28.0 - '@rollup/rollup-darwin-x64': 4.28.0 - '@rollup/rollup-freebsd-arm64': 4.28.0 - '@rollup/rollup-freebsd-x64': 4.28.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.28.0 - '@rollup/rollup-linux-arm-musleabihf': 4.28.0 - '@rollup/rollup-linux-arm64-gnu': 4.28.0 - '@rollup/rollup-linux-arm64-musl': 4.28.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.28.0 - '@rollup/rollup-linux-riscv64-gnu': 4.28.0 - '@rollup/rollup-linux-s390x-gnu': 4.28.0 - '@rollup/rollup-linux-x64-gnu': 4.28.0 - '@rollup/rollup-linux-x64-musl': 4.28.0 - '@rollup/rollup-win32-arm64-msvc': 4.28.0 - '@rollup/rollup-win32-ia32-msvc': 4.28.0 - '@rollup/rollup-win32-x64-msvc': 4.28.0 + '@rollup/rollup-android-arm-eabi': 4.28.1 + '@rollup/rollup-android-arm64': 4.28.1 + '@rollup/rollup-darwin-arm64': 4.28.1 + '@rollup/rollup-darwin-x64': 4.28.1 + '@rollup/rollup-freebsd-arm64': 4.28.1 + '@rollup/rollup-freebsd-x64': 4.28.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.28.1 + '@rollup/rollup-linux-arm-musleabihf': 4.28.1 + '@rollup/rollup-linux-arm64-gnu': 4.28.1 + '@rollup/rollup-linux-arm64-musl': 4.28.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.28.1 + '@rollup/rollup-linux-powerpc64le-gnu': 4.28.1 + '@rollup/rollup-linux-riscv64-gnu': 4.28.1 + '@rollup/rollup-linux-s390x-gnu': 4.28.1 + '@rollup/rollup-linux-x64-gnu': 4.28.1 + '@rollup/rollup-linux-x64-musl': 4.28.1 + '@rollup/rollup-win32-arm64-msvc': 4.28.1 + '@rollup/rollup-win32-ia32-msvc': 4.28.1 + '@rollup/rollup-win32-x64-msvc': 4.28.1 fsevents: 2.3.3 dev: true diff --git a/stake-pool/js/package.json b/stake-pool/js/package.json index 0428874603e..58fa4e014e7 100644 --- a/stake-pool/js/package.json +++ b/stake-pool/js/package.json @@ -69,7 +69,7 @@ "eslint": "^8.57.0", "jest": "^29.0.0", "rimraf": "^6.0.1", - "rollup": "^4.28.0", + "rollup": "^4.28.1", "rollup-plugin-dts": "^6.1.1", "ts-jest": "^29.2.5", "typescript": "^5.7.2" diff --git a/token-lending/js/package.json b/token-lending/js/package.json index 2bddf9fb90c..6c6bd6c5258 100644 --- a/token-lending/js/package.json +++ b/token-lending/js/package.json @@ -52,7 +52,7 @@ "@typescript-eslint/parser": "^8.4.0", "eslint": "^8.57.0", "gh-pages": "^6.2.0", - "rollup": "^4.28.0", + "rollup": "^4.28.1", "ts-node": "^10.9.2", "tslib": "^2.8.1", "typedoc": "^0.27.4", From 612a3019d766e55cee8ec4b1ecbc55e9c645c014 Mon Sep 17 00:00:00 2001 From: Jon C Date: Mon, 9 Dec 2024 13:19:45 +0100 Subject: [PATCH 52/52] token-2022: Add Pausable extension (#7562) * token-2022: Add Pausable extension #### Problem Users want a more Ethereum-style token experience by being able to "pause" their token, similar to the "Pausable" interface. When a mint is paused, tokens cannot be minted, burned, or transferred. #### Summary of changes Add the extension and some tests. It covers the following interactions: * mint / mint-checked * burn / burn-checked * transfer / transfer-checked / transfer-with-fee * confidential transfer / confidential transfer with fee * confidential mint / confidential burn Unfortunately, the confidential mint / burn extension doesn't have testing, so I couldn't get a full end-to-end test for it. Also note that it's still possible to: * move withheld tokens * initialize token accounts * close token accounts * set authority * freeze / thaw * approve / revoke * almost every other bit of extension management * Fix comments and semicolon * Add tests for deposit and withdraw --- token/client/src/token.rs | 53 ++- .../tests/confidential_transfer.rs | 346 +++++++++++++++++ token/program-2022-test/tests/pausable.rs | 356 ++++++++++++++++++ token/program-2022/src/error.rs | 6 + .../confidential_mint_burn/processor.rs | 11 + .../confidential_transfer/instruction.rs | 2 + .../confidential_transfer/processor.rs | 19 + token/program-2022/src/extension/mod.rs | 21 +- .../src/extension/pausable/instruction.rs | 136 +++++++ .../src/extension/pausable/mod.rs | 39 ++ .../src/extension/pausable/processor.rs | 91 +++++ token/program-2022/src/instruction.rs | 10 + token/program-2022/src/pod_instruction.rs | 1 + token/program-2022/src/processor.rs | 41 ++ 14 files changed, 1128 insertions(+), 4 deletions(-) create mode 100644 token/program-2022-test/tests/pausable.rs create mode 100644 token/program-2022/src/extension/pausable/instruction.rs create mode 100644 token/program-2022/src/extension/pausable/mod.rs create mode 100644 token/program-2022/src/extension/pausable/processor.rs diff --git a/token/client/src/token.rs b/token/client/src/token.rs index 20cae87c1fe..30fa7d40318 100644 --- a/token/client/src/token.rs +++ b/token/client/src/token.rs @@ -43,8 +43,8 @@ use { ConfidentialTransferFeeConfig, }, cpi_guard, default_account_state, group_member_pointer, group_pointer, - interest_bearing_mint, memo_transfer, metadata_pointer, scaled_ui_amount, transfer_fee, - transfer_hook, BaseStateWithExtensions, Extension, ExtensionType, + interest_bearing_mint, memo_transfer, metadata_pointer, pausable, scaled_ui_amount, + transfer_fee, transfer_hook, BaseStateWithExtensions, Extension, ExtensionType, StateWithExtensionsOwned, }, instruction, offchain, @@ -193,6 +193,9 @@ pub enum ExtensionInitializationParams { authority: Option, multiplier: f64, }, + PausableConfig { + authority: Pubkey, + }, } impl ExtensionInitializationParams { /// Get the extension type associated with the init params @@ -213,6 +216,7 @@ impl ExtensionInitializationParams { Self::GroupPointer { .. } => ExtensionType::GroupPointer, Self::GroupMemberPointer { .. } => ExtensionType::GroupMemberPointer, Self::ScaledUiAmountConfig { .. } => ExtensionType::ScaledUiAmount, + Self::PausableConfig { .. } => ExtensionType::Pausable, } } /// Generate an appropriate initialization instruction for the given mint @@ -331,6 +335,9 @@ impl ExtensionInitializationParams { authority, multiplier, ), + Self::PausableConfig { authority } => { + pausable::instruction::initialize(token_program_id, mint, &authority) + } } } } @@ -1753,6 +1760,48 @@ where .await } + /// Pause transferring, minting, and burning on the mint + pub async fn pause( + &self, + authority: &Pubkey, + signing_keypairs: &S, + ) -> TokenResult { + let signing_pubkeys = signing_keypairs.pubkeys(); + let multisig_signers = self.get_multisig_signers(authority, &signing_pubkeys); + + self.process_ixs( + &[pausable::instruction::pause( + &self.program_id, + self.get_address(), + authority, + &multisig_signers, + )?], + signing_keypairs, + ) + .await + } + + /// Resume transferring, minting, and burning on the mint + pub async fn resume( + &self, + authority: &Pubkey, + signing_keypairs: &S, + ) -> TokenResult { + let signing_pubkeys = signing_keypairs.pubkeys(); + let multisig_signers = self.get_multisig_signers(authority, &signing_pubkeys); + + self.process_ixs( + &[pausable::instruction::resume( + &self.program_id, + self.get_address(), + authority, + &multisig_signers, + )?], + signing_keypairs, + ) + .await + } + /// Prevent unsafe usage of token account through CPI pub async fn enable_cpi_guard( &self, diff --git a/token/program-2022-test/tests/confidential_transfer.rs b/token/program-2022-test/tests/confidential_transfer.rs index e3c80fe6f44..f0640c54b80 100644 --- a/token/program-2022-test/tests/confidential_transfer.rs +++ b/token/program-2022-test/tests/confidential_transfer.rs @@ -1617,6 +1617,251 @@ async fn confidential_transfer_transfer() { .await; } +#[cfg(feature = "zk-ops")] +#[tokio::test] +async fn pause_confidential_deposit() { + let authority = Keypair::new(); + let pausable_authority = Keypair::new(); + let auto_approve_new_accounts = true; + let auditor_elgamal_keypair = ElGamalKeypair::new_rand(); + let auditor_elgamal_pubkey = (*auditor_elgamal_keypair.pubkey()).into(); + + let mut context = TestContext::new().await; + context + .init_token_with_mint(vec![ + ExtensionInitializationParams::ConfidentialTransferMint { + authority: Some(authority.pubkey()), + auto_approve_new_accounts, + auditor_elgamal_pubkey: Some(auditor_elgamal_pubkey), + }, + ExtensionInitializationParams::PausableConfig { + authority: pausable_authority.pubkey(), + }, + ]) + .await + .unwrap(); + let TokenContext { + token, + alice, + mint_authority, + decimals, + .. + } = context.token_context.unwrap(); + + let alice_meta = ConfidentialTokenAccountMeta::new(&token, &alice, None, false, false).await; + + token + .mint_to( + &alice_meta.token_account, + &mint_authority.pubkey(), + 42, + &[mint_authority], + ) + .await + .unwrap(); + + token + .pause(&pausable_authority.pubkey(), &[&pausable_authority]) + .await + .unwrap(); + + let error = token + .confidential_transfer_deposit( + &alice_meta.token_account, + &alice.pubkey(), + 42, + decimals, + &[alice], + ) + .await + .unwrap_err(); + assert_eq!( + error, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::MintPaused as u32) + ) + ))) + ); +} + +#[cfg(feature = "zk-ops")] +#[tokio::test] +async fn pause_confidential_withdraw() { + let authority = Keypair::new(); + let pausable_authority = Keypair::new(); + let auto_approve_new_accounts = true; + let auditor_elgamal_keypair = ElGamalKeypair::new_rand(); + let auditor_elgamal_pubkey = (*auditor_elgamal_keypair.pubkey()).into(); + + let mut context = TestContext::new().await; + context + .init_token_with_mint(vec![ + ExtensionInitializationParams::ConfidentialTransferMint { + authority: Some(authority.pubkey()), + auto_approve_new_accounts, + auditor_elgamal_pubkey: Some(auditor_elgamal_pubkey), + }, + ExtensionInitializationParams::PausableConfig { + authority: pausable_authority.pubkey(), + }, + ]) + .await + .unwrap(); + let TokenContext { + token, + alice, + mint_authority, + decimals, + .. + } = context.token_context.unwrap(); + + let alice_meta = ConfidentialTokenAccountMeta::new(&token, &alice, None, false, false).await; + + token + .mint_to( + &alice_meta.token_account, + &mint_authority.pubkey(), + 42, + &[mint_authority], + ) + .await + .unwrap(); + + token + .confidential_transfer_deposit( + &alice_meta.token_account, + &alice.pubkey(), + 42, + decimals, + &[&alice], + ) + .await + .unwrap(); + + token + .confidential_transfer_apply_pending_balance( + &alice_meta.token_account, + &alice.pubkey(), + None, + alice_meta.elgamal_keypair.secret(), + &alice_meta.aes_key, + &[&alice], + ) + .await + .unwrap(); + + token + .pause(&pausable_authority.pubkey(), &[&pausable_authority]) + .await + .unwrap(); + + let error = withdraw_with_option( + &token, + &alice_meta.token_account, + &alice.pubkey(), + 42, + decimals, + &alice_meta.elgamal_keypair, + &alice_meta.aes_key, + &[&alice], + ConfidentialTransferOption::InstructionData, + ) + .await + .unwrap_err(); + + assert_eq!( + error, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::MintPaused as u32) + ) + ))) + ); +} + +#[cfg(feature = "zk-ops")] +#[tokio::test] +async fn pause_confidential_transfer() { + let authority = Keypair::new(); + let pausable_authority = Keypair::new(); + let auto_approve_new_accounts = true; + let auditor_elgamal_keypair = ElGamalKeypair::new_rand(); + let auditor_elgamal_pubkey = (*auditor_elgamal_keypair.pubkey()).into(); + + let mut context = TestContext::new().await; + context + .init_token_with_mint(vec![ + ExtensionInitializationParams::ConfidentialTransferMint { + authority: Some(authority.pubkey()), + auto_approve_new_accounts, + auditor_elgamal_pubkey: Some(auditor_elgamal_pubkey), + }, + ExtensionInitializationParams::PausableConfig { + authority: pausable_authority.pubkey(), + }, + ]) + .await + .unwrap(); + + let TokenContext { + token, + alice, + bob, + mint_authority, + decimals, + .. + } = context.token_context.unwrap(); + + let alice_meta = ConfidentialTokenAccountMeta::new_with_tokens( + &token, + &alice, + None, + false, + false, + &mint_authority, + 42, + decimals, + ) + .await; + + let bob_meta = ConfidentialTokenAccountMeta::new(&token, &bob, Some(2), false, false).await; + + // pause it + token + .pause(&pausable_authority.pubkey(), &[&pausable_authority]) + .await + .unwrap(); + let error = confidential_transfer_with_option( + &token, + &alice_meta.token_account, + &bob_meta.token_account, + &alice.pubkey(), + 10, + &alice_meta.elgamal_keypair, + &alice_meta.aes_key, + bob_meta.elgamal_keypair.pubkey(), + Some(auditor_elgamal_keypair.pubkey()), + None, + &[&alice], + ConfidentialTransferOption::InstructionData, + ) + .await + .unwrap_err(); + + assert_eq!( + error, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::MintPaused as u32) + ) + ))) + ); +} + #[cfg(feature = "zk-ops")] async fn confidential_transfer_transfer_with_option(option: ConfidentialTransferOption) { let authority = Keypair::new(); @@ -2328,6 +2573,107 @@ async fn confidential_transfer_transfer_with_fee() { .await; } +#[cfg(feature = "zk-ops")] +#[tokio::test] +async fn pause_confidential_transfer_with_fee() { + let transfer_fee_authority = Keypair::new(); + let withdraw_withheld_authority = Keypair::new(); + + let pausable_authority = Keypair::new(); + let confidential_transfer_authority = Keypair::new(); + let auto_approve_new_accounts = true; + let auditor_elgamal_keypair = ElGamalKeypair::new_rand(); + let auditor_elgamal_pubkey = (*auditor_elgamal_keypair.pubkey()).into(); + + let confidential_transfer_fee_authority = Keypair::new(); + let withdraw_withheld_authority_elgamal_keypair = ElGamalKeypair::new_rand(); + let withdraw_withheld_authority_elgamal_pubkey = + (*withdraw_withheld_authority_elgamal_keypair.pubkey()).into(); + + let mut context = TestContext::new().await; + context + .init_token_with_mint(vec![ + ExtensionInitializationParams::TransferFeeConfig { + transfer_fee_config_authority: Some(transfer_fee_authority.pubkey()), + withdraw_withheld_authority: Some(withdraw_withheld_authority.pubkey()), + transfer_fee_basis_points: TEST_FEE_BASIS_POINTS, + maximum_fee: TEST_MAXIMUM_FEE, + }, + ExtensionInitializationParams::ConfidentialTransferMint { + authority: Some(confidential_transfer_authority.pubkey()), + auto_approve_new_accounts, + auditor_elgamal_pubkey: Some(auditor_elgamal_pubkey), + }, + ExtensionInitializationParams::ConfidentialTransferFeeConfig { + authority: Some(confidential_transfer_fee_authority.pubkey()), + withdraw_withheld_authority_elgamal_pubkey, + }, + ExtensionInitializationParams::PausableConfig { + authority: pausable_authority.pubkey(), + }, + ]) + .await + .unwrap(); + + let TokenContext { + token, + alice, + bob, + mint_authority, + decimals, + .. + } = context.token_context.unwrap(); + + let alice_meta = ConfidentialTokenAccountMeta::new_with_tokens( + &token, + &alice, + None, + false, + true, + &mint_authority, + 100, + decimals, + ) + .await; + + let bob_meta = ConfidentialTokenAccountMeta::new(&token, &bob, None, false, true).await; + + token + .pause(&pausable_authority.pubkey(), &[&pausable_authority]) + .await + .unwrap(); + + let error = confidential_transfer_with_fee_with_option( + &token, + &alice_meta.token_account, + &bob_meta.token_account, + &alice.pubkey(), + 10, + &alice_meta.elgamal_keypair, + &alice_meta.aes_key, + bob_meta.elgamal_keypair.pubkey(), + Some(auditor_elgamal_keypair.pubkey()), + withdraw_withheld_authority_elgamal_keypair.pubkey(), + TEST_FEE_BASIS_POINTS, + TEST_MAXIMUM_FEE, + None, + &[&alice], + ConfidentialTransferOption::InstructionData, + ) + .await + .unwrap_err(); + + assert_eq!( + error, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::MintPaused as u32) + ) + ))) + ); +} + #[cfg(feature = "zk-ops")] async fn confidential_transfer_transfer_with_fee_with_option(option: ConfidentialTransferOption) { let transfer_fee_authority = Keypair::new(); diff --git a/token/program-2022-test/tests/pausable.rs b/token/program-2022-test/tests/pausable.rs new file mode 100644 index 00000000000..724758d413d --- /dev/null +++ b/token/program-2022-test/tests/pausable.rs @@ -0,0 +1,356 @@ +#![cfg(feature = "test-sbf")] + +mod program_test; +use { + program_test::{TestContext, TokenContext}, + solana_program_test::tokio, + solana_sdk::{ + instruction::InstructionError, pubkey::Pubkey, signature::Signer, signer::keypair::Keypair, + transaction::TransactionError, transport::TransportError, + }, + spl_token_2022::{ + error::TokenError, + extension::{ + pausable::{PausableAccount, PausableConfig}, + BaseStateWithExtensions, + }, + instruction::AuthorityType, + }, + spl_token_client::token::{ExtensionInitializationParams, TokenError as TokenClientError}, + std::convert::TryInto, +}; + +#[tokio::test] +async fn success_initialize() { + let authority = Pubkey::new_unique(); + let mut context = TestContext::new().await; + context + .init_token_with_mint(vec![ExtensionInitializationParams::PausableConfig { + authority, + }]) + .await + .unwrap(); + let TokenContext { token, alice, .. } = context.token_context.unwrap(); + + let state = token.get_mint_info().await.unwrap(); + let extension = state.get_extension::().unwrap(); + assert_eq!(Option::::from(extension.authority), Some(authority)); + assert!(!bool::from(extension.paused)); + + let account = Keypair::new(); + token + .create_auxiliary_token_account(&account, &alice.pubkey()) + .await + .unwrap(); + let state = token.get_account_info(&account.pubkey()).await.unwrap(); + let _ = state.get_extension::().unwrap(); +} + +#[tokio::test] +async fn set_authority() { + let authority = Keypair::new(); + let mut context = TestContext::new().await; + context + .init_token_with_mint(vec![ExtensionInitializationParams::PausableConfig { + authority: authority.pubkey(), + }]) + .await + .unwrap(); + let TokenContext { token, .. } = context.token_context.take().unwrap(); + + // success + let new_authority = Keypair::new(); + token + .set_authority( + token.get_address(), + &authority.pubkey(), + Some(&new_authority.pubkey()), + AuthorityType::Pause, + &[&authority], + ) + .await + .unwrap(); + let state = token.get_mint_info().await.unwrap(); + let extension = state.get_extension::().unwrap(); + assert_eq!( + extension.authority, + Some(new_authority.pubkey()).try_into().unwrap(), + ); + token + .pause(&new_authority.pubkey(), &[&new_authority]) + .await + .unwrap(); + let err = token + .pause(&authority.pubkey(), &[&authority]) + .await + .unwrap_err(); + assert_eq!( + err, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::OwnerMismatch as u32) + ) + ))) + ); + + // set to none + token + .set_authority( + token.get_address(), + &new_authority.pubkey(), + None, + AuthorityType::Pause, + &[&new_authority], + ) + .await + .unwrap(); + let state = token.get_mint_info().await.unwrap(); + let extension = state.get_extension::().unwrap(); + assert_eq!(extension.authority, None.try_into().unwrap(),); +} + +#[tokio::test] +async fn pause_mint() { + let authority = Keypair::new(); + let mut context = TestContext::new().await; + context + .init_token_with_mint(vec![ExtensionInitializationParams::PausableConfig { + authority: authority.pubkey(), + }]) + .await + .unwrap(); + let TokenContext { + mint_authority, + token, + token_unchecked, + alice, + .. + } = context.token_context.take().unwrap(); + + let alice_account = Keypair::new(); + token + .create_auxiliary_token_account(&alice_account, &alice.pubkey()) + .await + .unwrap(); + let alice_account = alice_account.pubkey(); + + token + .pause(&authority.pubkey(), &[&authority]) + .await + .unwrap(); + + let amount = 10; + let error = token + .mint_to( + &alice_account, + &mint_authority.pubkey(), + amount, + &[&mint_authority], + ) + .await + .unwrap_err(); + assert_eq!( + error, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::MintPaused as u32) + ) + ))) + ); + + let error = token_unchecked + .mint_to( + &alice_account, + &mint_authority.pubkey(), + amount, + &[&mint_authority], + ) + .await + .unwrap_err(); + assert_eq!( + error, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::MintPaused as u32) + ) + ))) + ); +} + +#[tokio::test] +async fn pause_burn() { + let authority = Keypair::new(); + let mut context = TestContext::new().await; + context + .init_token_with_mint(vec![ExtensionInitializationParams::PausableConfig { + authority: authority.pubkey(), + }]) + .await + .unwrap(); + let TokenContext { + mint_authority, + token, + token_unchecked, + alice, + .. + } = context.token_context.take().unwrap(); + + let alice_account = Keypair::new(); + token + .create_auxiliary_token_account(&alice_account, &alice.pubkey()) + .await + .unwrap(); + let alice_account = alice_account.pubkey(); + + let amount = 10; + token + .mint_to( + &alice_account, + &mint_authority.pubkey(), + amount, + &[&mint_authority], + ) + .await + .unwrap(); + + token + .pause(&authority.pubkey(), &[&authority]) + .await + .unwrap(); + + let error = token_unchecked + .burn(&alice_account, &alice.pubkey(), 1, &[&alice]) + .await + .unwrap_err(); + + assert_eq!( + error, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::MintPaused as u32) + ) + ))) + ); + + let error = token + .burn(&alice_account, &alice.pubkey(), 1, &[&alice]) + .await + .unwrap_err(); + + assert_eq!( + error, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::MintPaused as u32) + ) + ))) + ); +} + +#[tokio::test] +async fn pause_transfer() { + let authority = Keypair::new(); + let mut context = TestContext::new().await; + context + .init_token_with_mint(vec![ExtensionInitializationParams::PausableConfig { + authority: authority.pubkey(), + }]) + .await + .unwrap(); + let TokenContext { + mint_authority, + token, + token_unchecked, + alice, + bob, + .. + } = context.token_context.take().unwrap(); + + let alice_account = Keypair::new(); + token + .create_auxiliary_token_account(&alice_account, &alice.pubkey()) + .await + .unwrap(); + let alice_account = alice_account.pubkey(); + + let bob_account = Keypair::new(); + token + .create_auxiliary_token_account(&bob_account, &bob.pubkey()) + .await + .unwrap(); + let bob_account = bob_account.pubkey(); + + let amount = 10; + token + .mint_to( + &alice_account, + &mint_authority.pubkey(), + amount, + &[&mint_authority], + ) + .await + .unwrap(); + + token + .pause(&authority.pubkey(), &[&authority]) + .await + .unwrap(); + + let error = token_unchecked + .transfer(&alice_account, &bob_account, &alice.pubkey(), 1, &[&alice]) + .await + .unwrap_err(); + + // need to use checked transfer + assert_eq!( + error, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::MintRequiredForTransfer as u32) + ) + ))) + ); + + let error = token + .transfer(&alice_account, &bob_account, &alice.pubkey(), 1, &[&alice]) + .await + .unwrap_err(); + + assert_eq!( + error, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::MintPaused as u32) + ) + ))) + ); + + let error = token + .transfer_with_fee( + &alice_account, + &bob_account, + &alice.pubkey(), + 1, + 0, + &[&alice], + ) + .await + .unwrap_err(); + + assert_eq!( + error, + TokenClientError::Client(Box::new(TransportError::TransactionError( + TransactionError::InstructionError( + 0, + InstructionError::Custom(TokenError::MintPaused as u32) + ) + ))) + ); +} diff --git a/token/program-2022/src/error.rs b/token/program-2022/src/error.rs index 77f20cf5877..f7ae93c942c 100644 --- a/token/program-2022/src/error.rs +++ b/token/program-2022/src/error.rs @@ -266,6 +266,9 @@ pub enum TokenError { /// Invalid scale for scaled ui amount #[error("Invalid scale for scaled ui amount")] InvalidScale, + /// Transferring, minting, and burning is paused on this mint + #[error("Transferring, minting, and burning is paused on this mint")] + MintPaused, } impl From for ProgramError { fn from(e: TokenError) -> Self { @@ -459,6 +462,9 @@ impl PrintProgramError for TokenError { TokenError::InvalidScale => { msg!("Invalid scale for scaled ui amount") } + TokenError::MintPaused => { + msg!("Transferring, minting, and burning is paused on this mint") + } } } } diff --git a/token/program-2022/src/extension/confidential_mint_burn/processor.rs b/token/program-2022/src/extension/confidential_mint_burn/processor.rs index 197bb9165a0..1f63a7c4720 100644 --- a/token/program-2022/src/extension/confidential_mint_burn/processor.rs +++ b/token/program-2022/src/extension/confidential_mint_burn/processor.rs @@ -15,6 +15,7 @@ use { ConfidentialMintBurn, }, confidential_transfer::{ConfidentialTransferAccount, ConfidentialTransferMint}, + pausable::PausableConfig, BaseStateWithExtensions, BaseStateWithExtensionsMut, PodStateWithExtensionsMut, }, instruction::{decode_instruction_data, decode_instruction_type}, @@ -161,6 +162,11 @@ fn process_confidential_mint( let auditor_elgamal_pubkey = mint .get_extension::()? .auditor_elgamal_pubkey; + if let Ok(extension) = mint.get_extension::() { + if extension.paused.into() { + return Err(TokenError::MintPaused.into()); + } + } let mint_burn_extension = mint.get_extension_mut::()?; let proof_context = verify_mint_proof( @@ -285,6 +291,11 @@ fn process_confidential_burn( let auditor_elgamal_pubkey = mint .get_extension::()? .auditor_elgamal_pubkey; + if let Ok(extension) = mint.get_extension::() { + if extension.paused.into() { + return Err(TokenError::MintPaused.into()); + } + } let mint_burn_extension = mint.get_extension_mut::()?; let proof_context = verify_burn_proof( diff --git a/token/program-2022/src/extension/confidential_transfer/instruction.rs b/token/program-2022/src/extension/confidential_transfer/instruction.rs index 1419f08e38f..9c641a01adc 100644 --- a/token/program-2022/src/extension/confidential_transfer/instruction.rs +++ b/token/program-2022/src/extension/confidential_transfer/instruction.rs @@ -183,6 +183,7 @@ pub enum ConfidentialTransferInstruction { /// Fails if the source or destination accounts are frozen. /// Fails if the associated mint is extended as `NonTransferable`. /// Fails if the associated mint is extended as `ConfidentialMintBurn`. + /// Fails if the associated mint is paused with the `Pausable` extension. /// /// Accounts expected by this instruction: /// @@ -219,6 +220,7 @@ pub enum ConfidentialTransferInstruction { /// Fails if the source or destination accounts are frozen. /// Fails if the associated mint is extended as `NonTransferable`. /// Fails if the associated mint is extended as `ConfidentialMintBurn`. + /// Fails if the associated mint is paused with the `Pausable` extension. /// /// Accounts expected by this instruction: /// diff --git a/token/program-2022/src/extension/confidential_transfer/processor.rs b/token/program-2022/src/extension/confidential_transfer/processor.rs index 78aff19a17a..f9a3920b76c 100644 --- a/token/program-2022/src/extension/confidential_transfer/processor.rs +++ b/token/program-2022/src/extension/confidential_transfer/processor.rs @@ -16,6 +16,7 @@ use { EncryptedWithheldAmount, }, memo_transfer::{check_previous_sibling_instruction_is_memo, memo_required}, + pausable::PausableConfig, set_account_type, transfer_fee::TransferFeeConfig, transfer_hook, BaseStateWithExtensions, BaseStateWithExtensionsMut, @@ -397,6 +398,12 @@ fn process_deposit( let mint_data = &mint_info.data.borrow_mut(); let mint = PodStateWithExtensions::::unpack(mint_data)?; + if let Ok(extension) = mint.get_extension::() { + if extension.paused.into() { + return Err(TokenError::MintPaused.into()); + } + } + if expected_decimals != mint.base.decimals { return Err(TokenError::MintDecimalsMismatch.into()); } @@ -518,6 +525,12 @@ fn process_withdraw( return Err(TokenError::IllegalMintBurnConversion.into()); } + if let Ok(extension) = mint.get_extension::() { + if extension.paused.into() { + return Err(TokenError::MintPaused.into()); + } + } + check_program_account(token_account_info.owner)?; let token_account_data = &mut token_account_info.data.borrow_mut(); let mut token_account = PodStateWithExtensionsMut::::unpack(token_account_data)?; @@ -608,6 +621,12 @@ fn process_transfer( let mint_data = mint_info.data.borrow_mut(); let mint = PodStateWithExtensions::::unpack(&mint_data)?; + if let Ok(extension) = mint.get_extension::() { + if extension.paused.into() { + return Err(TokenError::MintPaused.into()); + } + } + let confidential_transfer_mint = mint.get_extension::()?; // A `Transfer` instruction must be accompanied by a zero-knowledge proof diff --git a/token/program-2022/src/extension/mod.rs b/token/program-2022/src/extension/mod.rs index d3f45977041..e68d5b4a618 100644 --- a/token/program-2022/src/extension/mod.rs +++ b/token/program-2022/src/extension/mod.rs @@ -21,6 +21,7 @@ use { metadata_pointer::MetadataPointer, mint_close_authority::MintCloseAuthority, non_transferable::{NonTransferable, NonTransferableAccount}, + pausable::{PausableAccount, PausableConfig}, permanent_delegate::PermanentDelegate, scaled_ui_amount::ScaledUiAmountConfig, transfer_fee::{TransferFeeAmount, TransferFeeConfig}, @@ -73,6 +74,8 @@ pub mod metadata_pointer; pub mod mint_close_authority; /// Non Transferable extension pub mod non_transferable; +/// Pausable extension +pub mod pausable; /// Permanent Delegate extension pub mod permanent_delegate; /// Utility to reallocate token accounts @@ -771,6 +774,9 @@ pub trait BaseStateWithExtensionsMut: BaseStateWithExtensions { // ConfidentialTransfers are currently opt-in only, so this is a no-op for extra safety // on InitializeAccount ExtensionType::ConfidentialTransferAccount => Ok(()), + ExtensionType::PausableAccount => { + self.init_extension::(true).map(|_| ()) + } #[cfg(test)] ExtensionType::AccountPaddingTest => { self.init_extension::(true).map(|_| ()) @@ -1114,6 +1120,10 @@ pub enum ExtensionType { ConfidentialMintBurn, /// Tokens whose UI amount is scaled by a given amount ScaledUiAmount, + /// Tokens where minting / burning / transferring can be paused + Pausable, + /// Indicates that the account belongs to a pausable mint + PausableAccount, /// Test variable-length mint extension #[cfg(test)] @@ -1197,6 +1207,8 @@ impl ExtensionType { ExtensionType::TokenGroupMember => pod_get_packed_len::(), ExtensionType::ConfidentialMintBurn => pod_get_packed_len::(), ExtensionType::ScaledUiAmount => pod_get_packed_len::(), + ExtensionType::Pausable => pod_get_packed_len::(), + ExtensionType::PausableAccount => pod_get_packed_len::(), #[cfg(test)] ExtensionType::AccountPaddingTest => pod_get_packed_len::(), #[cfg(test)] @@ -1262,7 +1274,8 @@ impl ExtensionType { | ExtensionType::GroupMemberPointer | ExtensionType::ConfidentialMintBurn | ExtensionType::TokenGroupMember - | ExtensionType::ScaledUiAmount => AccountType::Mint, + | ExtensionType::ScaledUiAmount + | ExtensionType::Pausable => AccountType::Mint, ExtensionType::ImmutableOwner | ExtensionType::TransferFeeAmount | ExtensionType::ConfidentialTransferAccount @@ -1270,7 +1283,8 @@ impl ExtensionType { | ExtensionType::NonTransferableAccount | ExtensionType::TransferHookAccount | ExtensionType::CpiGuard - | ExtensionType::ConfidentialTransferFeeAmount => AccountType::Account, + | ExtensionType::ConfidentialTransferFeeAmount + | ExtensionType::PausableAccount => AccountType::Account, #[cfg(test)] ExtensionType::VariableLenMintTest => AccountType::Mint, #[cfg(test)] @@ -1296,6 +1310,9 @@ impl ExtensionType { ExtensionType::TransferHook => { account_extension_types.push(ExtensionType::TransferHookAccount); } + ExtensionType::Pausable => { + account_extension_types.push(ExtensionType::PausableAccount); + } #[cfg(test)] ExtensionType::MintPaddingTest => { account_extension_types.push(ExtensionType::AccountPaddingTest); diff --git a/token/program-2022/src/extension/pausable/instruction.rs b/token/program-2022/src/extension/pausable/instruction.rs new file mode 100644 index 00000000000..0cc7c973997 --- /dev/null +++ b/token/program-2022/src/extension/pausable/instruction.rs @@ -0,0 +1,136 @@ +#[cfg(feature = "serde-traits")] +use serde::{Deserialize, Serialize}; +use { + crate::{ + check_program_account, + instruction::{encode_instruction, TokenInstruction}, + }, + bytemuck::{Pod, Zeroable}, + num_enum::{IntoPrimitive, TryFromPrimitive}, + solana_program::{ + instruction::{AccountMeta, Instruction}, + program_error::ProgramError, + pubkey::Pubkey, + }, +}; + +/// Pausable extension instructions +#[cfg_attr(feature = "serde-traits", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde-traits", serde(rename_all = "camelCase"))] +#[derive(Clone, Copy, Debug, PartialEq, IntoPrimitive, TryFromPrimitive)] +#[repr(u8)] +pub enum PausableInstruction { + /// Initialize the pausable extension for the given mint account + /// + /// Fails if the account has already been initialized, so must be called + /// before `InitializeMint`. + /// + /// Accounts expected by this instruction: + /// + /// 0. `[writable]` The mint account to initialize. + /// + /// Data expected by this instruction: + /// `crate::extension::pausable::instruction::InitializeInstructionData` + Initialize, + /// Pause minting, burning, and transferring for the mint. + /// + /// Accounts expected by this instruction: + /// + /// 0. `[writable]` The mint to update. + /// 1. `[signer]` The mint's pause authority. + /// + /// * Multisignature authority + /// 0. `[writable]` The mint to update. + /// 1. `[]` The mint's multisignature pause authority. + /// 2. `..2+M` `[signer]` M signer accounts. + Pause, + /// Resume minting, burning, and transferring for the mint. + /// + /// Accounts expected by this instruction: + /// + /// 0. `[writable]` The mint to update. + /// 1. `[signer]` The mint's pause authority. + /// + /// * Multisignature authority + /// 0. `[writable]` The mint to update. + /// 1. `[]` The mint's multisignature pause authority. + /// 2. `..2+M` `[signer]` M signer accounts. + Resume, +} + +/// Data expected by `PausableInstruction::Initialize` +#[cfg_attr(feature = "serde-traits", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde-traits", serde(rename_all = "camelCase"))] +#[derive(Clone, Copy, Pod, Zeroable)] +#[repr(C)] +pub struct InitializeInstructionData { + /// The public key for the account that can pause the mint + pub authority: Pubkey, +} + +/// Create an `Initialize` instruction +pub fn initialize( + token_program_id: &Pubkey, + mint: &Pubkey, + authority: &Pubkey, +) -> Result { + check_program_account(token_program_id)?; + let accounts = vec![AccountMeta::new(*mint, false)]; + Ok(encode_instruction( + token_program_id, + accounts, + TokenInstruction::PausableExtension, + PausableInstruction::Initialize, + &InitializeInstructionData { + authority: *authority, + }, + )) +} + +/// Create a `Pause` instruction +pub fn pause( + token_program_id: &Pubkey, + mint: &Pubkey, + authority: &Pubkey, + signers: &[&Pubkey], +) -> Result { + check_program_account(token_program_id)?; + let mut accounts = vec![ + AccountMeta::new(*mint, false), + AccountMeta::new_readonly(*authority, signers.is_empty()), + ]; + for signer_pubkey in signers.iter() { + accounts.push(AccountMeta::new_readonly(**signer_pubkey, true)); + } + Ok(encode_instruction( + token_program_id, + accounts, + TokenInstruction::PausableExtension, + PausableInstruction::Pause, + &(), + )) +} + +/// Create a `Resume` instruction +pub fn resume( + token_program_id: &Pubkey, + mint: &Pubkey, + authority: &Pubkey, + signers: &[&Pubkey], +) -> Result { + check_program_account(token_program_id)?; + let mut accounts = vec![ + AccountMeta::new(*mint, false), + AccountMeta::new_readonly(*authority, signers.is_empty()), + ]; + for signer_pubkey in signers.iter() { + accounts.push(AccountMeta::new_readonly(**signer_pubkey, true)); + } + Ok(encode_instruction( + token_program_id, + accounts, + TokenInstruction::PausableExtension, + PausableInstruction::Resume, + &(), + )) +} diff --git a/token/program-2022/src/extension/pausable/mod.rs b/token/program-2022/src/extension/pausable/mod.rs new file mode 100644 index 00000000000..82a3878abe4 --- /dev/null +++ b/token/program-2022/src/extension/pausable/mod.rs @@ -0,0 +1,39 @@ +#[cfg(feature = "serde-traits")] +use serde::{Deserialize, Serialize}; +use { + crate::extension::{Extension, ExtensionType}, + bytemuck::{Pod, Zeroable}, + spl_pod::{optional_keys::OptionalNonZeroPubkey, primitives::PodBool}, +}; + +/// Instruction types for the pausable extension +pub mod instruction; +/// Instruction processor for the pausable extension +pub mod processor; + +/// Indicates that the tokens from this mint can be paused +#[cfg_attr(feature = "serde-traits", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde-traits", serde(rename_all = "camelCase"))] +#[derive(Clone, Copy, Debug, Default, PartialEq, Pod, Zeroable)] +#[repr(C)] +pub struct PausableConfig { + /// Authority that can pause or resume activity on the mint + pub authority: OptionalNonZeroPubkey, + /// Whether minting / transferring / burning tokens is paused + pub paused: PodBool, +} + +/// Indicates that the tokens from this account belong to a pausable mint +#[cfg_attr(feature = "serde-traits", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde-traits", serde(rename_all = "camelCase"))] +#[derive(Clone, Copy, Debug, Default, PartialEq, Pod, Zeroable)] +#[repr(transparent)] +pub struct PausableAccount; + +impl Extension for PausableConfig { + const TYPE: ExtensionType = ExtensionType::Pausable; +} + +impl Extension for PausableAccount { + const TYPE: ExtensionType = ExtensionType::PausableAccount; +} diff --git a/token/program-2022/src/extension/pausable/processor.rs b/token/program-2022/src/extension/pausable/processor.rs new file mode 100644 index 00000000000..5f47982e114 --- /dev/null +++ b/token/program-2022/src/extension/pausable/processor.rs @@ -0,0 +1,91 @@ +use { + crate::{ + check_program_account, + error::TokenError, + extension::{ + pausable::{ + instruction::{InitializeInstructionData, PausableInstruction}, + PausableConfig, + }, + BaseStateWithExtensionsMut, PodStateWithExtensionsMut, + }, + instruction::{decode_instruction_data, decode_instruction_type}, + pod::PodMint, + processor::Processor, + }, + solana_program::{ + account_info::{next_account_info, AccountInfo}, + entrypoint::ProgramResult, + msg, + pubkey::Pubkey, + }, +}; + +fn process_initialize( + _program_id: &Pubkey, + accounts: &[AccountInfo], + authority: &Pubkey, +) -> ProgramResult { + let account_info_iter = &mut accounts.iter(); + let mint_account_info = next_account_info(account_info_iter)?; + let mut mint_data = mint_account_info.data.borrow_mut(); + let mut mint = PodStateWithExtensionsMut::::unpack_uninitialized(&mut mint_data)?; + + let extension = mint.init_extension::(true)?; + extension.authority = Some(*authority).try_into()?; + + Ok(()) +} + +/// Pause or resume minting / burning / transferring on the mint +fn process_toggle_pause( + program_id: &Pubkey, + accounts: &[AccountInfo], + pause: bool, +) -> ProgramResult { + let account_info_iter = &mut accounts.iter(); + let mint_account_info = next_account_info(account_info_iter)?; + let authority_info = next_account_info(account_info_iter)?; + let authority_info_data_len = authority_info.data_len(); + + let mut mint_data = mint_account_info.data.borrow_mut(); + let mut mint = PodStateWithExtensionsMut::::unpack(&mut mint_data)?; + let extension = mint.get_extension_mut::()?; + let maybe_authority: Option = extension.authority.into(); + let authority = maybe_authority.ok_or(TokenError::AuthorityTypeNotSupported)?; + + Processor::validate_owner( + program_id, + &authority, + authority_info, + authority_info_data_len, + account_info_iter.as_slice(), + )?; + + extension.paused = pause.into(); + Ok(()) +} + +pub(crate) fn process_instruction( + program_id: &Pubkey, + accounts: &[AccountInfo], + input: &[u8], +) -> ProgramResult { + check_program_account(program_id)?; + + match decode_instruction_type(input)? { + PausableInstruction::Initialize => { + msg!("PausableInstruction::Initialize"); + let InitializeInstructionData { authority } = decode_instruction_data(input)?; + process_initialize(program_id, accounts, authority) + } + PausableInstruction::Pause => { + msg!("PausableInstruction::Pause"); + process_toggle_pause(program_id, accounts, true /* pause */) + } + PausableInstruction::Resume => { + msg!("PausableInstruction::Resume"); + process_toggle_pause(program_id, accounts, false /* resume */) + } + } +} diff --git a/token/program-2022/src/instruction.rs b/token/program-2022/src/instruction.rs index c36c666ec58..974fc12c7b4 100644 --- a/token/program-2022/src/instruction.rs +++ b/token/program-2022/src/instruction.rs @@ -715,6 +715,8 @@ pub enum TokenInstruction<'a> { /// Instruction prefix for instructions to the scaled ui amount /// extension ScaledUiAmountExtension, + /// Instruction prefix for instructions to the pausable extension + PausableExtension, } impl<'a> TokenInstruction<'a> { /// Unpacks a byte buffer into a @@ -856,6 +858,7 @@ impl<'a> TokenInstruction<'a> { 41 => Self::GroupMemberPointerExtension, 42 => Self::ConfidentialMintBurnExtension, 43 => Self::ScaledUiAmountExtension, + 44 => Self::PausableExtension, _ => return Err(TokenError::InvalidInstruction.into()), }) } @@ -1033,6 +1036,9 @@ impl<'a> TokenInstruction<'a> { &Self::ScaledUiAmountExtension => { buf.push(43); } + &Self::PausableExtension => { + buf.push(44); + } }; buf } @@ -1132,6 +1138,8 @@ pub enum AuthorityType { GroupMemberPointer, /// Authority to set the UI amount scale ScaledUiAmount, + /// Authority to pause or resume minting / transferring / burning + Pause, } impl AuthorityType { @@ -1153,6 +1161,7 @@ impl AuthorityType { AuthorityType::GroupPointer => 13, AuthorityType::GroupMemberPointer => 14, AuthorityType::ScaledUiAmount => 15, + AuthorityType::Pause => 16, } } @@ -1174,6 +1183,7 @@ impl AuthorityType { 13 => Ok(AuthorityType::GroupPointer), 14 => Ok(AuthorityType::GroupMemberPointer), 15 => Ok(AuthorityType::ScaledUiAmount), + 16 => Ok(AuthorityType::Pause), _ => Err(TokenError::InvalidInstruction.into()), } } diff --git a/token/program-2022/src/pod_instruction.rs b/token/program-2022/src/pod_instruction.rs index 05da1e42d4d..4222e1972ba 100644 --- a/token/program-2022/src/pod_instruction.rs +++ b/token/program-2022/src/pod_instruction.rs @@ -116,6 +116,7 @@ pub(crate) enum PodTokenInstruction { GroupMemberPointerExtension, ConfidentialMintBurnExtension, ScaledUiAmountExtension, + PausableExtension, } fn unpack_pubkey_option(input: &[u8]) -> Result, ProgramError> { diff --git a/token/program-2022/src/processor.rs b/token/program-2022/src/processor.rs index 99a813e4775..908d50a0547 100644 --- a/token/program-2022/src/processor.rs +++ b/token/program-2022/src/processor.rs @@ -20,6 +20,7 @@ use { metadata_pointer::{self, MetadataPointer}, mint_close_authority::MintCloseAuthority, non_transferable::{NonTransferable, NonTransferableAccount}, + pausable::{self, PausableAccount, PausableConfig}, permanent_delegate::{get_permanent_delegate, PermanentDelegate}, reallocate, scaled_ui_amount::{self, ScaledUiAmountConfig}, @@ -349,6 +350,12 @@ impl Processor { 0 }; + if let Ok(extension) = mint.get_extension::() { + if extension.paused.into() { + return Err(TokenError::MintPaused.into()); + } + } + let maybe_permanent_delegate = get_permanent_delegate(&mint); let maybe_transfer_hook_program_id = transfer_hook::get_program_id(&mint); @@ -376,6 +383,12 @@ impl Processor { return Err(TokenError::MintRequiredForTransfer.into()); } + // Pausable extension exists on the account, but no mint + // was provided to see if it's paused, abort + if source_account.get_extension::().is_ok() { + return Err(TokenError::MintRequiredForTransfer.into()); + } + (0, None, None) }; if let Some(expected_fee) = expected_fee { @@ -921,6 +934,19 @@ impl Processor { )?; extension.authority = new_authority.try_into()?; } + AuthorityType::Pause => { + let extension = mint.get_extension_mut::()?; + let maybe_authority: Option = extension.authority.into(); + let authority = maybe_authority.ok_or(TokenError::AuthorityTypeNotSupported)?; + Self::validate_owner( + program_id, + &authority, + authority_info, + authority_info_data_len, + account_info_iter.as_slice(), + )?; + extension.authority = new_authority.try_into()?; + } _ => { return Err(TokenError::AuthorityTypeNotSupported.into()); } @@ -972,6 +998,12 @@ impl Processor { return Err(TokenError::NonTransferableNeedsImmutableOwnership.into()); } + if let Ok(extension) = mint.get_extension::() { + if extension.paused.into() { + return Err(TokenError::MintPaused.into()); + } + } + if mint.get_extension::().is_ok() { return Err(TokenError::IllegalMintBurnConversion.into()); } @@ -1053,6 +1085,11 @@ impl Processor { return Err(TokenError::MintDecimalsMismatch.into()); } } + if let Ok(extension) = mint.get_extension::() { + if extension.paused.into() { + return Err(TokenError::MintPaused.into()); + } + } let maybe_permanent_delegate = get_permanent_delegate(&mint); if let Ok(cpi_guard) = source_account.get_extension::() { @@ -1844,6 +1881,10 @@ impl Processor { &input[1..], ) } + PodTokenInstruction::PausableExtension => { + msg!("Instruction: PausableExtension"); + pausable::processor::process_instruction(program_id, accounts, &input[1..]) + } } } else if let Ok(instruction) = TokenMetadataInstruction::unpack(input) { token_metadata::processor::process_instruction(program_id, accounts, instruction)