diff --git a/Cargo.lock b/Cargo.lock index 2ec56ecb9..92ce3546e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2540,9 +2540,9 @@ dependencies = [ [[package]] name = "mpl-token-metadata" -version = "3.0.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "651388b8ccae4805f240ebd495172eb44ea10153e018623b628df7034e042a96" +checksum = "177204bbe7486b22ac35af2c91a82630f830a6ddd3392651aefde1ef346aba3d" dependencies = [ "borsh 0.10.3", "num-derive 0.3.3", diff --git a/Cargo.toml b/Cargo.toml index dd6883b1d..58ddfa1f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ members = [ "utils/proposal", ] exclude = [ - "deps/metaplex-program-library/bubblegum/program", + "deps/metaplex-program-library/bubblegum/program", "deps/metaplex-program-library/token-metadata/program", "utils/ecc-sig-verifier", "utils/migration-tx-executor", @@ -19,7 +19,7 @@ exclude = [ [workspace.dependencies] anchor-lang = { version = "0.28.0", features = ["init-if-needed"] } anchor-spl = { version = "0.28.0", features = ["mint", "token"] } -mpl-token-metadata = { version = "3.0.1" } +mpl-token-metadata = { version = "3.1.0" } account-compression-cpi = { rev = "a2d12e4a157d91feb73aa40a97fe297fd477dd87", git = "https://github.com/helium/account-compression-anchor-gen.git", features = ["cpi"]} bubblegum-cpi = { rev = "a2d12e4a157d91feb73aa40a97fe297fd477dd87", git = "https://github.com/helium/account-compression-anchor-gen.git", features = ["cpi"]} solana-security-txt = "1.1.1" diff --git a/package.json b/package.json index a1d65ec8d..1e23adc72 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,9 @@ "@coral-xyz/anchor": "^0.28.0", "@coral-xyz/anchor-cli": "^0.28.0", "@coral-xyz/borsh": "^0.2.6", + "@helium/crypto": "^4.10.2", "@helium/modular-governance-idls": "^0.0.2", "@helium/proposal-sdk": "^0.0.2", - "@helium/crypto": "^4.10.2", "@helium/transactions": "^3.38.0", "@metaplex-foundation/mpl-bubblegum": "^0.7.0", "@pythnetwork/client": "^2.8.0", @@ -56,6 +56,6 @@ "prettier": "^2.6.2", "shx": "^0.3.4", "ts-mocha": "^10.0.0", - "typescript": "^4.3.5" + "typescript": "^5.2.2" } } diff --git a/packages/account-fetch-cache-hooks/package.json b/packages/account-fetch-cache-hooks/package.json index ff3e3ff61..98ce1f175 100644 --- a/packages/account-fetch-cache-hooks/package.json +++ b/packages/account-fetch-cache-hooks/package.json @@ -39,7 +39,7 @@ "devDependencies": { "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "peerDependencies": { diff --git a/packages/account-fetch-cache/package.json b/packages/account-fetch-cache/package.json index 3ff128f0e..816eac5a9 100644 --- a/packages/account-fetch-cache/package.json +++ b/packages/account-fetch-cache/package.json @@ -36,7 +36,7 @@ "devDependencies": { "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "gitHead": "5a8bf0b7b88e5934ef8d774e686f7c95804fbb8d" diff --git a/packages/account-postgres-sink-service/Dockerfile b/packages/account-postgres-sink-service/Dockerfile index 9e4e62b86..5024e2784 100644 --- a/packages/account-postgres-sink-service/Dockerfile +++ b/packages/account-postgres-sink-service/Dockerfile @@ -1,5 +1,5 @@ # Specify the base image -FROM node:16-alpine AS BUILD_IMAGE +FROM node:18-alpine AS BUILD_IMAGE WORKDIR /usr/src/app @@ -8,6 +8,7 @@ COPY package.json ./ RUN yarn install COPY src src +COPY typeings typeings COPY tsconfig.build.json tsconfig.json RUN yarn global add typescript @@ -15,7 +16,7 @@ RUN yarn run build RUN npm prune --production -FROM node:16-alpine +FROM node:18-alpine WORKDIR /usr/src/app diff --git a/packages/account-postgres-sink-service/package.json b/packages/account-postgres-sink-service/package.json index e08b0b4a2..ce38e95e5 100644 --- a/packages/account-postgres-sink-service/package.json +++ b/packages/account-postgres-sink-service/package.json @@ -68,7 +68,7 @@ "ts-loader": "^9.2.3", "ts-node": "^10.9.1", "ts-node-dev": "^2.0.0", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/packages/account-postgres-sink-service/tsconfig.build.json b/packages/account-postgres-sink-service/tsconfig.build.json index 43c1febce..38d8e445a 100644 --- a/packages/account-postgres-sink-service/tsconfig.build.json +++ b/packages/account-postgres-sink-service/tsconfig.build.json @@ -16,12 +16,12 @@ "moduleResolution": "Node", "skipLibCheck": true, "baseUrl": ".", - "typeRoots": ["node_modules/@types"], + "typeRoots": ["node_modules/@types", "typeings"], "strict": true, "paths": { "@/*": ["*"] }, - "outDir": "lib" + "outDir": "lib", }, - "include": ["src"] + "include": ["src"], } diff --git a/packages/account-postgres-sink-service/typeings/cron.d.ts b/packages/account-postgres-sink-service/typeings/cron.d.ts new file mode 100644 index 000000000..a2104d388 --- /dev/null +++ b/packages/account-postgres-sink-service/typeings/cron.d.ts @@ -0,0 +1,4 @@ +declare module "cron" { + let _cron: any; + export = _cron; +} diff --git a/packages/active-device-oracle/package.json b/packages/active-device-oracle/package.json index 8cd4b074d..84fdf3438 100644 --- a/packages/active-device-oracle/package.json +++ b/packages/active-device-oracle/package.json @@ -41,7 +41,7 @@ "ts-loader": "^9.2.3", "ts-node": "^10.9.1", "ts-node-dev": "^2.0.0", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/packages/anchor-resolvers/package.json b/packages/anchor-resolvers/package.json index 71ee9e016..fd8d36e16 100644 --- a/packages/anchor-resolvers/package.json +++ b/packages/anchor-resolvers/package.json @@ -40,7 +40,7 @@ "devDependencies": { "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "gitHead": "5a8bf0b7b88e5934ef8d774e686f7c95804fbb8d" diff --git a/packages/circuit-breaker-sdk/package.json b/packages/circuit-breaker-sdk/package.json index a50a3d78e..1849bfc0e 100644 --- a/packages/circuit-breaker-sdk/package.json +++ b/packages/circuit-breaker-sdk/package.json @@ -41,7 +41,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/packages/crons/package.json b/packages/crons/package.json index 52aff38ab..d4c05f3d2 100644 --- a/packages/crons/package.json +++ b/packages/crons/package.json @@ -56,7 +56,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" } } diff --git a/packages/data-credits-sdk/package.json b/packages/data-credits-sdk/package.json index 8a2f9b21e..a224b13d1 100644 --- a/packages/data-credits-sdk/package.json +++ b/packages/data-credits-sdk/package.json @@ -45,7 +45,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/packages/distributor-oracle/package.json b/packages/distributor-oracle/package.json index 2a5bf5dc4..718588d69 100644 --- a/packages/distributor-oracle/package.json +++ b/packages/distributor-oracle/package.json @@ -68,7 +68,7 @@ "nodemon": "^2.0.20", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "gitHead": "5a8bf0b7b88e5934ef8d774e686f7c95804fbb8d" diff --git a/packages/fanout-metadata-service/package.json b/packages/fanout-metadata-service/package.json index 51e266d5f..377a87e96 100644 --- a/packages/fanout-metadata-service/package.json +++ b/packages/fanout-metadata-service/package.json @@ -53,7 +53,7 @@ "ts-loader": "^9.2.3", "ts-node": "^10.9.1", "ts-node-dev": "^2.0.0", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/packages/fanout-sdk/package.json b/packages/fanout-sdk/package.json index e4001bf91..02c8f5014 100644 --- a/packages/fanout-sdk/package.json +++ b/packages/fanout-sdk/package.json @@ -41,7 +41,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "gitHead": "5a8bf0b7b88e5934ef8d774e686f7c95804fbb8d" diff --git a/packages/faucet-service/package.json b/packages/faucet-service/package.json index 6990cfd31..cc588c39a 100644 --- a/packages/faucet-service/package.json +++ b/packages/faucet-service/package.json @@ -53,7 +53,7 @@ "ts-loader": "^9.2.3", "ts-node": "^10.9.1", "ts-node-dev": "^2.0.0", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/packages/helium-admin-cli/package.json b/packages/helium-admin-cli/package.json index ffc75fae3..d54b5ef21 100644 --- a/packages/helium-admin-cli/package.json +++ b/packages/helium-admin-cli/package.json @@ -68,7 +68,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "author": "", diff --git a/packages/helium-entity-manager-sdk/package.json b/packages/helium-entity-manager-sdk/package.json index 4cd6eb8ab..6ff7f19dc 100644 --- a/packages/helium-entity-manager-sdk/package.json +++ b/packages/helium-entity-manager-sdk/package.json @@ -47,7 +47,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "gitHead": "5a8bf0b7b88e5934ef8d774e686f7c95804fbb8d" diff --git a/packages/helium-react-hooks/package.json b/packages/helium-react-hooks/package.json index a8764f442..444a14864 100644 --- a/packages/helium-react-hooks/package.json +++ b/packages/helium-react-hooks/package.json @@ -45,7 +45,7 @@ "@solana/wallet-adapter-react": "^0.15.32", "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "peerDependencies": { diff --git a/packages/helium-sub-daos-sdk/package.json b/packages/helium-sub-daos-sdk/package.json index 757bb276d..07d87981a 100644 --- a/packages/helium-sub-daos-sdk/package.json +++ b/packages/helium-sub-daos-sdk/package.json @@ -43,7 +43,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "gitHead": "5a8bf0b7b88e5934ef8d774e686f7c95804fbb8d" diff --git a/packages/idls/package.json b/packages/idls/package.json index e3df47ca1..561d7203b 100644 --- a/packages/idls/package.json +++ b/packages/idls/package.json @@ -34,7 +34,7 @@ }, "devDependencies": { "ts-loader": "^9.2.3", - "typescript": "^4.8.4" + "typescript": "^5.2.2" }, "gitHead": "5a8bf0b7b88e5934ef8d774e686f7c95804fbb8d" } diff --git a/packages/iot-premine-data-only-service/package.json b/packages/iot-premine-data-only-service/package.json index a6071b326..f14896e10 100644 --- a/packages/iot-premine-data-only-service/package.json +++ b/packages/iot-premine-data-only-service/package.json @@ -52,7 +52,7 @@ "@types/yargs": "^17.0.24", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" } } diff --git a/packages/lazy-distributor-sdk/package.json b/packages/lazy-distributor-sdk/package.json index 9b88bb2b6..83980d386 100644 --- a/packages/lazy-distributor-sdk/package.json +++ b/packages/lazy-distributor-sdk/package.json @@ -41,7 +41,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "gitHead": "5a8bf0b7b88e5934ef8d774e686f7c95804fbb8d" diff --git a/packages/lazy-transactions-sdk/package.json b/packages/lazy-transactions-sdk/package.json index f339de60e..b46e90f06 100644 --- a/packages/lazy-transactions-sdk/package.json +++ b/packages/lazy-transactions-sdk/package.json @@ -43,7 +43,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "gitHead": "5a8bf0b7b88e5934ef8d774e686f7c95804fbb8d" diff --git a/packages/metadata-service/package.json b/packages/metadata-service/package.json index bde0befa7..8eb8ac68f 100644 --- a/packages/metadata-service/package.json +++ b/packages/metadata-service/package.json @@ -37,6 +37,7 @@ "@helium/address": "^4.10.2", "@helium/helium-entity-manager-sdk": "^0.4.1", "@helium/helium-sub-daos-sdk": "^0.4.1", + "@helium/spl-utils": "^0.4.1", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-token": "^0.3.8", "@solana/web3.js": "^1.78.4", @@ -56,7 +57,7 @@ "ts-loader": "^9.2.3", "ts-node": "^10.9.1", "ts-node-dev": "^2.0.0", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/packages/metadata-service/src/constants.ts b/packages/metadata-service/src/constants.ts new file mode 100644 index 000000000..d6004e210 --- /dev/null +++ b/packages/metadata-service/src/constants.ts @@ -0,0 +1,2 @@ +export const SHDW_DRIVE_URL = + "https://shdw-drive.genesysgo.net/6tcnBSybPG7piEDShBcrVtYJDPSvGrDbVvXmXKpzBvWP"; diff --git a/packages/metadata-service/src/index.ts b/packages/metadata-service/src/index.ts index 454234472..b3f310e57 100644 --- a/packages/metadata-service/src/index.ts +++ b/packages/metadata-service/src/index.ts @@ -5,18 +5,19 @@ import { decodeEntityKey, init } from "@helium/helium-entity-manager-sdk"; import { HeliumEntityManager } from "@helium/idls/lib/types/helium_entity_manager"; import { PublicKey } from "@solana/web3.js"; // @ts-ignore +import { truthy } from "@helium/spl-utils"; import animalHash from "angry-purple-tiger"; -import Fastify, { FastifyInstance } from "fastify"; import axios from "axios"; -import { provider } from "./solana"; +import bs58 from "bs58"; +import Fastify, { FastifyInstance } from "fastify"; +import { SHDW_DRIVE_URL } from "./constants"; import { IotHotspotInfo, KeyToAsset, MobileHotspotInfo, sequelize, } from "./model"; -import bs58 from "bs58"; -import { truthy } from "@helium/spl-utils"; +import { provider } from "./solana"; const server: FastifyInstance = Fastify({ logger: true, @@ -33,18 +34,12 @@ let program: Program; server.get<{ Params: { keyToAssetKey: string } }>( "/v1/:keyToAssetKey", async (request, reply) => { + program = program || (await init(provider)); const { keyToAssetKey } = request.params; const keyToAsset = new PublicKey(keyToAssetKey); - if (!program) { - program = await init(provider); - } - const keyToAssetAccount = await program.account.keyToAssetV0.fetch( - keyToAsset - ); - const keyStr = decodeEntityKey( - keyToAssetAccount.entityKey, - keyToAssetAccount.keySerialization - ); + const keyToAssetAcc = await program.account.keyToAssetV0.fetch(keyToAsset); + const { entityKey, keySerialization } = keyToAssetAcc; + const keyStr = decodeEntityKey(entityKey, keySerialization); const digest = animalHash(keyStr); const record = await KeyToAsset.findOne({ where: { @@ -53,6 +48,19 @@ server.get<{ Params: { keyToAssetKey: string } }>( include: [IotHotspotInfo, MobileHotspotInfo], }); + // HACK: If it has a long key, it's an RSA key, and this is a mobile hotspot. + // In the future, we need to put different symbols on different types of hotspots + const hotspotType = entityKey.length > 100 ? "MOBILE" : "IOT"; + const image = `${SHDW_DRIVE_URL}/${ + hotspotType === "MOBILE" + ? record?.mobile_hotspot_info?.is_active + ? "mobile-hotspot-active.png" + : "mobile-hotspot.png" + : record?.iot_hotspot_info?.is_active + ? "hotspot-active.png" + : "hotspot.png" + }`; + return { name: keyStr === "iot_operations_fund" ? "IOT Operations Fund" : digest, description: @@ -61,10 +69,7 @@ server.get<{ Params: { keyToAssetKey: string } }>( : "A Rewardable NFT on Helium", // HACK: If it has a long key, it's an RSA key, and this is a mobile hotspot. // In the future, we need to put different symbols on different types of hotspots - image: - keyToAssetAccount.entityKey.length > 100 - ? "https://shdw-drive.genesysgo.net/6tcnBSybPG7piEDShBcrVtYJDPSvGrDbVvXmXKpzBvWP/mobile-hotspot.png" - : "https://shdw-drive.genesysgo.net/6tcnBSybPG7piEDShBcrVtYJDPSvGrDbVvXmXKpzBvWP/hotspot.png", + image, attributes: [ keyStr && Address.isValid(keyStr) ? { trait_type: "ecc_compact", value: keyStr } @@ -72,7 +77,7 @@ server.get<{ Params: { keyToAssetKey: string } }>( { trait_type: "entity_key_string", value: keyStr }, { trait_type: "entity_key", - value: keyToAssetAccount.entityKey.toString("base64"), + value: entityKey.toString("base64"), }, { trait_type: "rewardable", value: true }, { @@ -114,12 +119,14 @@ server.get<{ Params: { eccCompact: string } }>( }); const digest = animalHash(eccCompact); + const image = `${SHDW_DRIVE_URL}/${ + record?.iot_hotspot_info?.is_active ? "hotspot-active.png" : "hotspot.png" + }`; return { name: digest, description: "A Hotspot NFT on Helium", - image: - "https://shdw-drive.genesysgo.net/6tcnBSybPG7piEDShBcrVtYJDPSvGrDbVvXmXKpzBvWP/hotspot.png", + image, attributes: [ { trait_type: "ecc_compact", value: eccCompact }, { trait_type: "rewardable", value: true }, @@ -132,7 +139,7 @@ server.get<{ Params: { eccCompact: string } }>( }, ...locationAttributes("iot", record?.iot_hotspot_info), ...locationAttributes("mobile", record?.mobile_hotspot_info), - ] + ], }; } ); diff --git a/packages/metadata-service/src/model.ts b/packages/metadata-service/src/model.ts index c60a362a7..c36b5b598 100644 --- a/packages/metadata-service/src/model.ts +++ b/packages/metadata-service/src/model.ts @@ -58,6 +58,7 @@ export class MobileHotspotInfo extends Model { declare country: string; declare lat: number; declare long: number; + declare is_active: boolean; } MobileHotspotInfo.init( { @@ -71,6 +72,7 @@ MobileHotspotInfo.init( city: DataTypes.STRING, state: DataTypes.STRING, country: DataTypes.STRING, + isActive: DataTypes.BOOLEAN, }, { sequelize, @@ -90,6 +92,7 @@ export class IotHotspotInfo extends Model { declare country: string; declare lat: number; declare long: number; + declare is_active: boolean; } IotHotspotInfo.init( { @@ -103,6 +106,7 @@ IotHotspotInfo.init( city: DataTypes.STRING, state: DataTypes.STRING, country: DataTypes.STRING, + isActive: DataTypes.BOOLEAN, }, { sequelize, @@ -144,5 +148,5 @@ KeyToAsset.hasOne(IotHotspotInfo, { }); KeyToAsset.hasOne(MobileHotspotInfo, { sourceKey: "asset", - foreignKey: "asset" + foreignKey: "asset", }); diff --git a/packages/metadata-service/tsconfig.json b/packages/metadata-service/tsconfig.json index 2bbbd2780..31e2caef4 100644 --- a/packages/metadata-service/tsconfig.json +++ b/packages/metadata-service/tsconfig.json @@ -1,6 +1,9 @@ { "extends": "../../tsconfig.root.json", "references": [ + { + "path": "../spl-utils" + }, { "path": "../helium-entity-manager-sdk" }, diff --git a/packages/migration-service/package.json b/packages/migration-service/package.json index 3eef0f573..ede0d93d7 100644 --- a/packages/migration-service/package.json +++ b/packages/migration-service/package.json @@ -74,7 +74,7 @@ "ts-loader": "^9.2.3", "ts-node": "^10.9.1", "ts-node-dev": "^2.0.0", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/packages/mobile-entity-manager-sdk/package.json b/packages/mobile-entity-manager-sdk/package.json index 9c9a3e29f..ddeb0e140 100644 --- a/packages/mobile-entity-manager-sdk/package.json +++ b/packages/mobile-entity-manager-sdk/package.json @@ -43,7 +43,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "gitHead": "5a8bf0b7b88e5934ef8d774e686f7c95804fbb8d" diff --git a/packages/monitor-service/package.json b/packages/monitor-service/package.json index 0b3f2c02a..92dec126e 100644 --- a/packages/monitor-service/package.json +++ b/packages/monitor-service/package.json @@ -60,7 +60,7 @@ "ts-loader": "^9.2.3", "ts-node": "^10.9.1", "ts-node-dev": "^2.0.0", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/packages/price-oracle-sdk/package.json b/packages/price-oracle-sdk/package.json index 1a67cc56e..d621a82ff 100644 --- a/packages/price-oracle-sdk/package.json +++ b/packages/price-oracle-sdk/package.json @@ -40,7 +40,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/packages/rewards-oracle-faucet-service/package.json b/packages/rewards-oracle-faucet-service/package.json index 3b9ecca66..3de12e4f9 100644 --- a/packages/rewards-oracle-faucet-service/package.json +++ b/packages/rewards-oracle-faucet-service/package.json @@ -47,7 +47,7 @@ "ts-loader": "^9.2.3", "ts-node": "^10.9.1", "ts-node-dev": "^2.0.0", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/packages/rewards-oracle-sdk/package.json b/packages/rewards-oracle-sdk/package.json index 9381e0142..22760921c 100644 --- a/packages/rewards-oracle-sdk/package.json +++ b/packages/rewards-oracle-sdk/package.json @@ -41,7 +41,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/packages/spl-utils/package.json b/packages/spl-utils/package.json index 19ddf11d9..5bf894c7e 100644 --- a/packages/spl-utils/package.json +++ b/packages/spl-utils/package.json @@ -47,7 +47,7 @@ "devDependencies": { "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "gitHead": "5a8bf0b7b88e5934ef8d774e686f7c95804fbb8d" diff --git a/packages/tokens-to-rent-service/package.json b/packages/tokens-to-rent-service/package.json index 876f8d3cd..7365efe72 100644 --- a/packages/tokens-to-rent-service/package.json +++ b/packages/tokens-to-rent-service/package.json @@ -50,7 +50,7 @@ "ts-loader": "^9.2.3", "ts-node": "^10.9.1", "ts-node-dev": "^2.0.0", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/packages/treasury-management-sdk/package.json b/packages/treasury-management-sdk/package.json index 5151869fe..19df139c7 100644 --- a/packages/treasury-management-sdk/package.json +++ b/packages/treasury-management-sdk/package.json @@ -42,7 +42,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "gitHead": "5a8bf0b7b88e5934ef8d774e686f7c95804fbb8d" diff --git a/packages/voter-stake-registry-hooks/package.json b/packages/voter-stake-registry-hooks/package.json index c9e3e8ea1..7aa4faef6 100644 --- a/packages/voter-stake-registry-hooks/package.json +++ b/packages/voter-stake-registry-hooks/package.json @@ -50,7 +50,7 @@ "devDependencies": { "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "peerDependencies": { diff --git a/packages/voter-stake-registry-sdk/package.json b/packages/voter-stake-registry-sdk/package.json index aa735920f..c7b3c3bba 100644 --- a/packages/voter-stake-registry-sdk/package.json +++ b/packages/voter-stake-registry-sdk/package.json @@ -43,7 +43,7 @@ "git-format-staged": "^2.1.3", "ts-loader": "^9.2.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "gitHead": "5a8bf0b7b88e5934ef8d774e686f7c95804fbb8d" diff --git a/packages/vsr-metadata-service/package.json b/packages/vsr-metadata-service/package.json index 1c660afc8..7834b6942 100644 --- a/packages/vsr-metadata-service/package.json +++ b/packages/vsr-metadata-service/package.json @@ -53,7 +53,7 @@ "ts-loader": "^9.2.3", "ts-node": "^10.9.1", "ts-node-dev": "^2.0.0", - "typescript": "^4.8.4", + "typescript": "^5.2.2", "yarn": "^1.22.18" }, "keywords": [], diff --git a/utils/shared-utils/src/token_metadata.rs b/utils/shared-utils/src/token_metadata.rs index a40d3b7fc..79fee024f 100644 --- a/utils/shared-utils/src/token_metadata.rs +++ b/utils/shared-utils/src/token_metadata.rs @@ -36,7 +36,10 @@ pub fn create_metadata_accounts_v3<'info>( mint: &ctx.accounts.mint, mint_authority: &ctx.accounts.mint_authority, payer: &ctx.accounts.payer, - update_authority: &ctx.accounts.update_authority, + update_authority: ( + &ctx.accounts.update_authority, + ctx.accounts.update_authority.is_signer, + ), system_program: &ctx.accounts.system_program, rent: None, }, diff --git a/yarn.lock b/yarn.lock index b7b1f8865..bd4182158 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11338,11 +11338,16 @@ typescript-collections@^1.3.3: resolved "https://registry.yarnpkg.com/typescript-collections/-/typescript-collections-1.3.3.tgz#62d50d93c018c094d425eabee649f00ec5cc0fea" integrity sha512-7sI4e/bZijOzyURng88oOFZCISQPTHozfE2sUu5AviFYk5QV7fYGb6YiDl+vKjF/pICA354JImBImL9XJWUvdQ== -"typescript@^3 || ^4", typescript@^4.3.5, typescript@^4.8.4: +"typescript@^3 || ^4": version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" + integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== + u3@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/u3/-/u3-0.1.1.tgz#5f52044f42ee76cd8de33148829e14528494b73b"