diff --git a/.yarn/sdks/eslint/package.json b/.yarn/sdks/eslint/package.json index d0ae2df0..2b5f46d9 100644 --- a/.yarn/sdks/eslint/package.json +++ b/.yarn/sdks/eslint/package.json @@ -1,6 +1,6 @@ { "name": "eslint", - "version": "8.13.0-sdk", + "version": "8.14.0-sdk", "main": "./lib/api.js", "type": "commonjs" } diff --git a/Cargo.lock b/Cargo.lock index 40ee7668..f73e0190 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -197,9 +197,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" +checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" [[package]] name = "arrayref" @@ -776,9 +776,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.123" +version = "0.2.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb691a747a7ab48abc15c5b42066eaafde10dc427e3b6ee2a1cf43db04c763bd" +checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" [[package]] name = "libsecp256k1" @@ -1337,9 +1337,9 @@ checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "solana-frozen-abi" -version = "1.9.16" +version = "1.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8db0d37f7c345c6417898e675d218d76a1ce6d3bd57584d7f463d48badf1541" +checksum = "3129f7367168973c21989602df241bfbf890450d2d8912b9b07e820101a070eb" dependencies = [ "bs58 0.4.0", "bv", @@ -1357,9 +1357,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.9.16" +version = "1.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023560984c7f16a53e280866c177d1ad45225614356224c1ade671de16424466" +checksum = "d03ddde7f8bcc5a3847de5723efae88aea18931e559611a8cb0827d9add83f96" dependencies = [ "proc-macro2", "quote", @@ -1369,9 +1369,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.9.16" +version = "1.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57cb0a4ef4dd740397addf5fa50d9dff572371fd47df2bdecc5fb530546490e2" +checksum = "8151da49e5338abba3cac5fbeda754e0ff02dfe2e6ac26f76928d0435170b6fc" dependencies = [ "env_logger", "lazy_static", @@ -1380,9 +1380,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.9.16" +version = "1.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9654224bf5d4c6d80f68c3c996683b389693af1c69103af667c683180bad6c5e" +checksum = "3981394cc258fe1cb058b75bd5031eff01140ba0fa9b5a802b5c30f439ebeeba" dependencies = [ "base64 0.13.0", "bincode", @@ -1423,9 +1423,9 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.9.16" +version = "1.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac8cb60eb2e4c85d76ea1f0429dfc0e8b4ba7834e9d69695bb3164f3966e16d" +checksum = "7584154d8716cc4b2ad3cf7df3cf8e2be2639f85a0e63e6440eebc33cee97291" dependencies = [ "bs58 0.4.0", "proc-macro2", @@ -1442,10 +1442,11 @@ checksum = "f14189df19df7f3977a7ea236ccae6cdc40855ab5baf1ab2796a091ef5c490d1" [[package]] name = "spl-associated-token-account" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "393e2240d521c3dd770806bff25c2c00d761ac962be106e14e22dd912007f428" +checksum = "2b013067447a1396303ddfc294f36e3d260a32f8a16c501c295bcdc7de39b490" dependencies = [ + "borsh 0.9.3", "solana-program", "spl-token", ] diff --git a/package.json b/package.json index 4128d347..843b72b7 100644 --- a/package.json +++ b/package.json @@ -32,26 +32,26 @@ "devDependencies": { "@project-serum/anchor": "^0.24.2", "@rushstack/eslint-patch": "^1.1.3", - "@saberhq/anchor-contrib": "^1.12.61", - "@saberhq/chai-solana": "^1.12.61", - "@saberhq/eslint-config": "^1.12.61", - "@saberhq/solana-contrib": "^1.12.61", - "@saberhq/token-utils": "^1.12.61", - "@saberhq/tsconfig": "^1.12.61", - "@solana/web3.js": "^1.39.1", + "@saberhq/anchor-contrib": "^1.12.67", + "@saberhq/chai-solana": "^1.12.67", + "@saberhq/eslint-config": "^1.12.67", + "@saberhq/solana-contrib": "^1.12.67", + "@saberhq/token-utils": "^1.12.67", + "@saberhq/tsconfig": "^1.12.67", + "@solana/web3.js": "^1.41.1", "@types/bn.js": "^5.1.0", "@types/chai": "^4.3.1", - "@types/mocha": "^9.1.0", - "@types/node": "^17.0.24", + "@types/mocha": "^9.1.1", + "@types/node": "^17.0.29", "@types/prettier": "^2.6.0", "bn.js": "^5.2.0", "chai": "=4.3.4", - "eslint": "^8.13.0", + "eslint": "^8.14.0", "eslint-import-resolver-node": "^0.3.6", "eslint-plugin-import": "^2.26.0", "husky": "^7.0.4", - "jsbi": "^4.2.1", - "lint-staged": "^12.3.8", + "jsbi": "^4.3.0", + "lint-staged": "^12.4.1", "mocha": "^9.2.2", "prettier": "^2.6.2", "ts-node": "^10.7.0", @@ -85,7 +85,7 @@ "dependencies": { "superstruct": "^0.15.4", "tiny-invariant": "^1.2.0", - "tslib": "^2.3.1" + "tslib": "^2.4.0" }, "packageManager": "yarn@3.2.0" } diff --git a/programs/quarry-merge-mine/src/account_validators.rs b/programs/quarry-merge-mine/src/account_validators.rs index bfe12af5..89b177b9 100644 --- a/programs/quarry-merge-mine/src/account_validators.rs +++ b/programs/quarry-merge-mine/src/account_validators.rs @@ -1,13 +1,6 @@ //! Account validators -use anchor_lang::prelude::*; -use vipers::prelude::*; - -use crate::{ - ClaimRewards, InitMergeMiner, InitMiner, NewPool, QuarryStake, QuarryStakePrimary, - QuarryStakeReplica, WithdrawTokens, -}; -use anchor_lang::Key; +use crate::*; // -------------------------------- // Instruction account validators diff --git a/scripts/generate-idl-types.sh b/scripts/generate-idl-types.sh index bafdae34..511ca564 100755 --- a/scripts/generate-idl-types.sh +++ b/scripts/generate-idl-types.sh @@ -5,10 +5,10 @@ shopt -s extglob cd $(dirname $0)/.. generate_declaration_file() { - PROGRAM_SO=$1 + PROGRAM_TS=$1 OUT_DIR=$2 - prog="$(basename $PROGRAM_SO .json)" + prog="$(basename $PROGRAM_TS .ts)" OUT_PATH="$OUT_DIR/$prog.ts" if [ ! $(which gsed) ]; then PREFIX=$(echo $prog | sed -E 's/(^|_)([a-z])/\U\2/g') @@ -18,17 +18,13 @@ generate_declaration_file() { typename="${PREFIX}IDL" rawName="${PREFIX}JSON" - # types - echo "export type $typename =" >>$OUT_PATH - cat $PROGRAM_SO >>$OUT_PATH - echo ";" >>$OUT_PATH + cat $PROGRAM_TS >"$OUT_DIR/$prog.raw.ts" - cat artifacts/idl/$prog.ts | sed -E "s/${PREFIX}/Anchor${PREFIX}/" | sed -E "s/IDL: /Anchor${PREFIX}IDL: /" >>$OUT_PATH + # types + echo "import type { $PREFIX as $typename } from './$prog.raw';" >>$OUT_PATH + echo "import { IDL as $rawName } from './$prog.raw';" >>$OUT_PATH - # raw json - echo "export const $rawName: $typename =" >>$OUT_PATH - cat $PROGRAM_SO >>$OUT_PATH - echo ";" >>$OUT_PATH + echo "export { $typename, $rawName };" >>$OUT_PATH # error type echo "import { generateErrorMap } from '@saberhq/anchor-contrib';" >>$OUT_PATH @@ -57,4 +53,4 @@ generate_sdk_idls() { fi } -generate_sdk_idls ./src/idls 'artifacts/idl/*.json' +generate_sdk_idls ./src/idls 'artifacts/idl/*.ts' diff --git a/src/programs/mine.ts b/src/programs/mine.ts index f09ff06e..10000bb4 100644 --- a/src/programs/mine.ts +++ b/src/programs/mine.ts @@ -1,12 +1,12 @@ -import type { Program } from "@project-serum/anchor"; +import type { IdlAccounts, Program } from "@project-serum/anchor"; import type { AnchorTypes } from "@saberhq/anchor-contrib"; -import type { AnchorQuarryMine } from "../idls/quarry_mine"; +import type { QuarryMineIDL } from "../idls/quarry_mine"; export * from "../idls/quarry_mine"; export type MineTypes = AnchorTypes< - AnchorQuarryMine, + QuarryMineIDL, { rewarder: RewarderData; quarry: QuarryData; @@ -14,15 +14,15 @@ export type MineTypes = AnchorTypes< } >; -type Accounts = MineTypes["Accounts"]; -export type RewarderData = Accounts["rewarder"]; -export type QuarryData = Accounts["quarry"]; -export type MinerData = Accounts["miner"]; +type MineAccounts = IdlAccounts; + +export type RewarderData = MineAccounts["rewarder"]; +export type QuarryData = MineAccounts["quarry"]; +export type MinerData = MineAccounts["miner"]; export type MineError = MineTypes["Error"]; export type MineEvents = MineTypes["Events"]; -export type MineProgram = Omit, "account"> & - MineTypes["Program"]; +export type MineProgram = Program; export type ClaimEvent = MineEvents["ClaimEvent"]; export type StakeEvent = MineEvents["StakeEvent"]; diff --git a/src/programs/mintWrapper.ts b/src/programs/mintWrapper.ts index 50f12a1e..1c74393e 100644 --- a/src/programs/mintWrapper.ts +++ b/src/programs/mintWrapper.ts @@ -1,3 +1,4 @@ +import type { Program } from "@project-serum/anchor"; import type { AnchorTypes } from "@saberhq/anchor-contrib"; import type { QuarryMintWrapperIDL } from "../idls/quarry_mint_wrapper"; @@ -14,9 +15,9 @@ export type MintWrapperTypes = AnchorTypes< type Accounts = MintWrapperTypes["Accounts"]; -export type MintWrapperData = Accounts["MintWrapper"]; -export type MinterData = Accounts["Minter"]; +export type MintWrapperData = Accounts["mintWrapper"]; +export type MinterData = Accounts["minter"]; export type MintWrapperError = MintWrapperTypes["Error"]; -export type MintWrapperProgram = MintWrapperTypes["Program"]; +export type MintWrapperProgram = Program; diff --git a/src/programs/operator.ts b/src/programs/operator.ts index 98675640..b0b4357c 100644 --- a/src/programs/operator.ts +++ b/src/programs/operator.ts @@ -1,3 +1,4 @@ +import type { Program } from "@project-serum/anchor"; import type { AnchorTypes } from "@saberhq/anchor-contrib"; import type { QuarryOperatorIDL } from "../idls/quarry_operator"; @@ -12,7 +13,7 @@ export type QuarryOperatorTypes = AnchorTypes< >; type Accounts = QuarryOperatorTypes["Accounts"]; -export type OperatorData = Accounts["Operator"]; +export type OperatorData = Accounts["operator"]; export type QuarryOperatorError = QuarryOperatorTypes["Error"]; -export type QuarryOperatorProgram = QuarryOperatorTypes["Program"]; +export type QuarryOperatorProgram = Program; diff --git a/src/programs/quarryMergeMine.ts b/src/programs/quarryMergeMine.ts index e5a590ff..aff6686e 100644 --- a/src/programs/quarryMergeMine.ts +++ b/src/programs/quarryMergeMine.ts @@ -1,32 +1,27 @@ -import type { Program } from "@project-serum/anchor"; +import type { IdlAccounts, Program } from "@project-serum/anchor"; +import type { AllInstructionsMap } from "@project-serum/anchor/dist/esm/program/namespace/types"; import type { AnchorTypes } from "@saberhq/anchor-contrib"; -import type { PublicKey } from "@solana/web3.js"; -import type { AnchorQuarryMergeMine } from "../idls/quarry_merge_mine"; +import type { QuarryMergeMineIDL } from "../idls/quarry_merge_mine"; +import type { AccountMaps } from "../wrappers/mine/miner"; export * from "../idls/quarry_merge_mine"; export type QuarryMergeMineTypes = AnchorTypes< - AnchorQuarryMergeMine, + QuarryMergeMineIDL, { mergePool: MergePoolData; mergeMiner: MergeMinerData; } >; -type Accounts = QuarryMergeMineTypes["Accounts"]; +type Accounts = IdlAccounts; export type MergePoolData = Accounts["mergePool"]; export type MergeMinerData = Accounts["mergeMiner"]; export type QuarryMergeMineError = QuarryMergeMineTypes["Error"]; -export type QuarryMergeMineProgram = Omit< - Program, - "account" -> & - QuarryMergeMineTypes["Program"]; +export type QuarryMergeMineProgram = Program; -export type QuarryStakeAccounts = { - [A in keyof Parameters< - QuarryMergeMineProgram["instruction"]["stakePrimaryMiner"]["accounts"] - >[0]["stake"]]: PublicKey; -}; +export type QuarryStakeAccounts = AccountMaps< + AllInstructionsMap["stakePrimaryMiner"]["accounts"][2] +>; diff --git a/src/programs/redeemer.ts b/src/programs/redeemer.ts index 399264c2..017d2a92 100644 --- a/src/programs/redeemer.ts +++ b/src/programs/redeemer.ts @@ -1,3 +1,4 @@ +import type { Program } from "@project-serum/anchor"; import type { AnchorTypes } from "@saberhq/anchor-contrib"; import type { TransactionEnvelope } from "@saberhq/solana-contrib"; import type { u64 } from "@saberhq/token-utils"; @@ -15,11 +16,11 @@ export type RedeemerTypes = AnchorTypes< >; type Accounts = RedeemerTypes["Accounts"]; -export type RedeemerData = Accounts["Redeemer"]; +export type RedeemerData = Accounts["redeemer"]; export type RedeemerError = RedeemerTypes["Error"]; export type RedeemerEvents = RedeemerTypes["Events"]; -export type RedeemerProgram = RedeemerTypes["Program"]; +export type RedeemerProgram = Program; export type PendingRedeemer = { bump: number; diff --git a/src/programs/registry.ts b/src/programs/registry.ts index d90bfe4c..0f29beaa 100644 --- a/src/programs/registry.ts +++ b/src/programs/registry.ts @@ -1,3 +1,4 @@ +import type { Program } from "@project-serum/anchor"; import type { AnchorTypes } from "@saberhq/anchor-contrib"; import type { QuarryRegistryIDL } from "../idls/quarry_registry"; @@ -13,8 +14,8 @@ export type RegistryTypes = AnchorTypes< type Accounts = RegistryTypes["Accounts"]; -export type RegistryData = Accounts["Registry"]; +export type RegistryData = Accounts["registry"]; export type RegistryError = RegistryTypes["Error"]; -export type RegistryProgram = RegistryTypes["Program"]; +export type RegistryProgram = Program; diff --git a/src/wrappers/mine/miner.ts b/src/wrappers/mine/miner.ts index 24ce6e62..7e77d663 100644 --- a/src/wrappers/mine/miner.ts +++ b/src/wrappers/mine/miner.ts @@ -1,3 +1,9 @@ +import type { + IdlAccount, + IdlAccountItem, + IdlAccounts, +} from "@project-serum/anchor/dist/esm/idl"; +import type { AllInstructionsMap } from "@project-serum/anchor/dist/esm/program/namespace/types"; import type { Provider } from "@saberhq/solana-contrib"; import { TransactionEnvelope } from "@saberhq/solana-contrib"; import type { TokenAmount } from "@saberhq/token-utils"; @@ -5,19 +11,35 @@ import { getOrCreateATA, TOKEN_PROGRAM_ID } from "@saberhq/token-utils"; import type { PublicKey, TransactionInstruction } from "@solana/web3.js"; import { SystemProgram } from "@solana/web3.js"; -import type { MineProgram, MinerData } from "../../programs/mine"; +import type { + MineProgram, + MinerData, + QuarryMineIDL, +} from "../../programs/mine"; import type { QuarrySDK } from "../../sdk"; import { findMinterAddress } from "../mintWrapper/pda"; import type { QuarryWrapper } from "./quarry"; import type { PendingMiner } from "./types"; -type MineUserStakeAccounts = Parameters< - MineProgram["instruction"]["stakeTokens"]["accounts"] ->[0]; +export type AccountMaps = { + [K in T["accounts"][number]["name"]]: T["accounts"][number] & { + name: K; + } extends IdlAccount + ? PublicKey + : AccountMap; +}; -type MineUserClaimAccounts = Parameters< - MineProgram["instruction"]["claimRewards"]["accounts"] ->[0]["claim"]; +export type AccountMap = T extends IdlAccounts + ? AccountMaps + : PublicKey; + +export type MineUserStakeAccounts = AccountMaps< + AllInstructionsMap["stakeTokens"] +>; + +export type MineUserClaimAccounts = AccountMaps< + AllInstructionsMap["claimRewards"]["accounts"]["6"] +>; export class MinerWrapper { /** @@ -167,7 +189,7 @@ export class MinerWrapper { * @returns */ async fetchData(): Promise { - return await this.program.account.miner.fetch(this.minerKey); + return (await this.program.account.miner.fetch(this.minerKey)) as MinerData; } /** diff --git a/src/wrappers/mine/quarry.ts b/src/wrappers/mine/quarry.ts index 29425c31..eb631075 100644 --- a/src/wrappers/mine/quarry.ts +++ b/src/wrappers/mine/quarry.ts @@ -93,7 +93,7 @@ export class QuarryWrapper { token: Token; }): Promise { const program = sdk.programs.Mine; - const quarryData = await program.account.quarry.fetch(key); + const quarryData = (await program.account.quarry.fetch(key)) as QuarryData; const rewarderData = await program.account.rewarder.fetch( quarryData.rewarder ); @@ -140,13 +140,9 @@ export class QuarryWrapper { * @returns */ async getMiner(authority: PublicKey): Promise { - try { - return await this.program.account.miner.fetch( - await this.getMinerAddress(authority) - ); - } catch (e) { - return null; - } + return (await this.program.account.miner.fetchNullable( + await this.getMinerAddress(authority) + )) as MinerData; } /** diff --git a/yarn.lock b/yarn.lock index 9c5d234b..b29b2b2e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -30,9 +30,9 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^1.2.1": - version: 1.2.1 - resolution: "@eslint/eslintrc@npm:1.2.1" +"@eslint/eslintrc@npm:^1.2.2": + version: 1.2.2 + resolution: "@eslint/eslintrc@npm:1.2.2" dependencies: ajv: ^6.12.4 debug: ^4.3.2 @@ -43,7 +43,7 @@ __metadata: js-yaml: ^4.1.0 minimatch: ^3.0.4 strip-json-comments: ^3.1.1 - checksum: 1f797b9f94d71b965992cf6c44e3bcb574643014fd1e3d4862d25056bd5568f59c488461a7e9a1c1758ca7f0def5d3cb69c3d8b38581bcf4a53af74371243797 + checksum: d891036bbffb0efec1462aa4a603ed6e349d546b1632dde7d474ddd15c2a8b6895671b25293f1d3ba10ff629c24a3649ad049373fe695a0e44b612537088563c languageName: node linkType: hard @@ -186,32 +186,32 @@ __metadata: dependencies: "@project-serum/anchor": ^0.24.2 "@rushstack/eslint-patch": ^1.1.3 - "@saberhq/anchor-contrib": ^1.12.61 - "@saberhq/chai-solana": ^1.12.61 - "@saberhq/eslint-config": ^1.12.61 - "@saberhq/solana-contrib": ^1.12.61 - "@saberhq/token-utils": ^1.12.61 - "@saberhq/tsconfig": ^1.12.61 - "@solana/web3.js": ^1.39.1 + "@saberhq/anchor-contrib": ^1.12.67 + "@saberhq/chai-solana": ^1.12.67 + "@saberhq/eslint-config": ^1.12.67 + "@saberhq/solana-contrib": ^1.12.67 + "@saberhq/token-utils": ^1.12.67 + "@saberhq/tsconfig": ^1.12.67 + "@solana/web3.js": ^1.41.1 "@types/bn.js": ^5.1.0 "@types/chai": ^4.3.1 - "@types/mocha": ^9.1.0 - "@types/node": ^17.0.24 + "@types/mocha": ^9.1.1 + "@types/node": ^17.0.29 "@types/prettier": ^2.6.0 bn.js: ^5.2.0 chai: =4.3.4 - eslint: ^8.13.0 + eslint: ^8.14.0 eslint-import-resolver-node: ^0.3.6 eslint-plugin-import: ^2.26.0 husky: ^7.0.4 - jsbi: ^4.2.1 - lint-staged: ^12.3.8 + jsbi: ^4.3.0 + lint-staged: ^12.4.1 mocha: ^9.2.2 prettier: ^2.6.2 superstruct: ^0.15.4 tiny-invariant: ^1.2.0 ts-node: ^10.7.0 - tslib: ^2.3.1 + tslib: ^2.4.0 typedoc: ^0.22.15 typescript: ^4.6.3 peerDependencies: @@ -232,30 +232,30 @@ __metadata: languageName: node linkType: hard -"@saberhq/anchor-contrib@npm:^1.12.61": - version: 1.12.61 - resolution: "@saberhq/anchor-contrib@npm:1.12.61" +"@saberhq/anchor-contrib@npm:^1.12.67": + version: 1.12.67 + resolution: "@saberhq/anchor-contrib@npm:1.12.67" dependencies: - "@saberhq/solana-contrib": ^1.12.61 + "@saberhq/solana-contrib": ^1.12.67 eventemitter3: ^4.0.7 lodash.camelcase: ^4.3.0 lodash.mapvalues: ^4.6.0 - tslib: ^2.3.1 + tslib: ^2.4.0 peerDependencies: "@project-serum/anchor": ^0.22 || ^0.23 || ^0.24 "@solana/web3.js": ^1.37 bn.js: ^4 || ^5 - checksum: 824bd7120381ac6b1d7ac00d65587fe25fc3573b34177ed3c82c52fb09555431f52162a6d27a7d5db55bad173dd49857bcf1bef424cb45a281572095fd2e5caa + checksum: 3f66fdae7645960901d951402cc284a0e8b625ca9ac1f1a89172812de85fd21f0506e7eb1bb992ad1de7b608fdf94db8f2d327b7b0e17073d6adc6ec14ed1505 languageName: node linkType: hard -"@saberhq/chai-solana@npm:^1.12.61": - version: 1.12.61 - resolution: "@saberhq/chai-solana@npm:1.12.61" +"@saberhq/chai-solana@npm:^1.12.67": + version: 1.12.67 + resolution: "@saberhq/chai-solana@npm:1.12.67" dependencies: - "@saberhq/anchor-contrib": ^1.12.61 - "@saberhq/solana-contrib": ^1.12.61 - "@saberhq/token-utils": ^1.12.61 + "@saberhq/anchor-contrib": ^1.12.67 + "@saberhq/solana-contrib": ^1.12.67 + "@saberhq/token-utils": ^1.12.67 "@types/chai": ^4.3.1 "@types/chai-as-promised": ^7.1.5 "@types/promise-retry": ^1.1.3 @@ -263,22 +263,22 @@ __metadata: chai-as-promised: ^7.1.1 chai-bn: ^0.3.1 colors: ^1.4.0 - tslib: ^2.3.1 + tslib: ^2.4.0 peerDependencies: "@project-serum/anchor": ">=0.17" "@solana/web3.js": ^1.37 bn.js: ^5.2.0 jsbi: "*" - checksum: f7e63eb7e7bf619b0a91cc859e30961b2e10ada3cd7c4a3b524dc948accbf86deac1493a7d21258c20ce25be7db372aab6d19daf1f29eb600ce2a92773d4cb30 + checksum: c57aee6d10fcd4b69a5eaf7032c47aa36e1740e60c1badc9293111455b89e64a4958935df2c7e77154f083a5abe9da015729c41880851963805f8738b77f5539 languageName: node linkType: hard -"@saberhq/eslint-config@npm:^1.12.61": - version: 1.12.61 - resolution: "@saberhq/eslint-config@npm:1.12.61" +"@saberhq/eslint-config@npm:^1.12.67": + version: 1.12.67 + resolution: "@saberhq/eslint-config@npm:1.12.67" dependencies: - "@typescript-eslint/eslint-plugin": ^5.19.0 - "@typescript-eslint/parser": ^5.19.0 + "@typescript-eslint/eslint-plugin": ^5.21.0 + "@typescript-eslint/parser": ^5.21.0 eslint-config-prettier: ^8.5.0 eslint-import-resolver-node: ^0.3.6 eslint-plugin-import: ^2.26.0 @@ -288,13 +288,13 @@ __metadata: prettier: ^2.6.2 peerDependencies: eslint: ">=7" - checksum: 84a10dda5e0a5555e9347b472bcf96d7835f32cb5f2f4e6c81c794438a8d0289a3c0aafe662b41115f470b7eceed83f5f7319eecb2e13f8b2a12f89eac09bbdf + checksum: 4ad216e11e8289646510bdf62844430c487eab08bed8bb326617ca599b54d7eae9183eb00ad55fd4c42114ebfb4efce44b1503f0fdf55e6613c8eac026fc8c8b languageName: node linkType: hard -"@saberhq/solana-contrib@npm:^1.12.61": - version: 1.12.61 - resolution: "@saberhq/solana-contrib@npm:1.12.61" +"@saberhq/solana-contrib@npm:^1.12.67": + version: 1.12.67 + resolution: "@saberhq/solana-contrib@npm:1.12.67" dependencies: "@solana/buffer-layout": ^4.0.0 "@types/promise-retry": ^1.1.3 @@ -302,36 +302,36 @@ __metadata: promise-retry: ^2.0.1 retry: ^0.13.1 tiny-invariant: ^1.2.0 - tslib: ^2.3.1 + tslib: ^2.4.0 peerDependencies: "@solana/web3.js": ^1.37 bn.js: ^4 || ^5 - checksum: 29800595d97a28d3d0a2189afd06b07ff41b882b5426e06b4414ed1b8341b13eb7f9105db6c5574b4c991b23fc53473ec6c4438b35aacdcf67e7c8b3c7a3f482 + checksum: 7f0a3e7b4b0a4b01c15afa48732531adc6bb99cf890b67bef1fa76fd0d38d95ebe266c4ebdf0f681954275d35921861d098ca1459431699ecdeb92f5c2a9a654 languageName: node linkType: hard -"@saberhq/token-utils@npm:^1.12.61": - version: 1.12.61 - resolution: "@saberhq/token-utils@npm:1.12.61" +"@saberhq/token-utils@npm:^1.12.67": + version: 1.12.67 + resolution: "@saberhq/token-utils@npm:1.12.67" dependencies: - "@saberhq/solana-contrib": ^1.12.61 + "@saberhq/solana-contrib": ^1.12.67 "@solana/buffer-layout": ^4.0.0 "@solana/spl-token": ^0.1.8 "@ubeswap/token-math": ^4.4.6 tiny-invariant: ^1.2.0 - tslib: ^2.3.1 + tslib: ^2.4.0 peerDependencies: "@solana/web3.js": ^1.29.2 bn.js: ^4 || ^5 jsbi: ^3 || ^4 - checksum: 4944481657aa2e0a5c4924d63f41a1dc6ff934b9cd99f5ee252a8b4ab66cd8d05fa66ce4ace7e36ee2cde6a62fce3f409ba6ae6c6d5eaee48495b1e4e52ceeea + checksum: 06167c7a3f28e57c7a4d043c9e8ef320f2cb50233844454a7ca179bee6cf45030c91d51f3293d93548a9a43f8fd24cc9dfda9ffd198a1815c7c28f591f927e9f languageName: node linkType: hard -"@saberhq/tsconfig@npm:^1.12.61": - version: 1.12.61 - resolution: "@saberhq/tsconfig@npm:1.12.61" - checksum: 73e13da1ed19a05161e3cee985660155dd0c6c6a765ea8b3d2e6c52647007b46a8f102419636817a84a74ee56bb3448e7e49b171ab66f50cfa617ce2e26f4da2 +"@saberhq/tsconfig@npm:^1.12.67": + version: 1.12.67 + resolution: "@saberhq/tsconfig@npm:1.12.67" + checksum: c3027a0f3e0bfe2d9e9acc51a42096acb2097e4654a8bac61986fc122114aeeadc3548be783ab35a7dee08ed64edebcd4315180cfd6ef39db1e149b44c8c3129 languageName: node linkType: hard @@ -411,9 +411,9 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.39.1": - version: 1.39.1 - resolution: "@solana/web3.js@npm:1.39.1" +"@solana/web3.js@npm:^1.41.1": + version: 1.41.1 + resolution: "@solana/web3.js@npm:1.41.1" dependencies: "@babel/runtime": ^7.12.5 "@ethersproject/sha2": ^5.5.0 @@ -429,7 +429,7 @@ __metadata: secp256k1: ^4.0.2 superstruct: ^0.14.2 tweetnacl: ^1.0.0 - checksum: 40d2f4f629eff06726324e751d0a8e9f08c9c6fcdb3b4e2a62707e23b24046ee8659545686a2ad7a29ea781d9188e77c13f32b958d82d28cf1c5e772dd1a91a4 + checksum: ae31a83cad9a1ccf8a717ce5ea58fce4384429fc4fbb6fe68ccd2b12fdee8dda0e2277d4fa8cb103f6b8b5924b6dbbf14b57f6530d5a385f217f51b867fc8ba0 languageName: node linkType: hard @@ -541,10 +541,10 @@ __metadata: languageName: node linkType: hard -"@types/mocha@npm:^9.1.0": - version: 9.1.0 - resolution: "@types/mocha@npm:9.1.0" - checksum: 21e1000dafcfe387c6812be41c44a47b48c27a74d5a70c3d5ef1bb5c88eadadfc74dba06e93f160e7248c8a57b3977b590f82504c801c9927816ecd4668023c0 +"@types/mocha@npm:^9.1.1": + version: 9.1.1 + resolution: "@types/mocha@npm:9.1.1" + checksum: 516077c0acd9806dc78317f88aaac0df5aaf0bdc2f63dfdadeabdf0b0137953b6ca65472e6ff7c30bc93ce4e0ae76eae70e8d46764b9a8eae4877a928b6ef49a languageName: node linkType: hard @@ -562,10 +562,10 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^17.0.24": - version: 17.0.24 - resolution: "@types/node@npm:17.0.24" - checksum: 9e7c4f863601b2430b4c2429a89935f22eba692956f5013c90a4c7fb0e1401ed8add8c4307453c5d6b8b985384500f8c3f644427ab88632640cc396159af479a +"@types/node@npm:^17.0.29": + version: 17.0.29 + resolution: "@types/node@npm:17.0.29" + checksum: bb9d7bce9d6d3882efd9d63b773b548dce98df4bd57eff8ceaa316aa2f3346e36d3618764cc93da84bbff92005174a35eec3465cde91ee973ef1c351ffa40074 languageName: node linkType: hard @@ -615,13 +615,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^5.19.0": - version: 5.19.0 - resolution: "@typescript-eslint/eslint-plugin@npm:5.19.0" +"@typescript-eslint/eslint-plugin@npm:^5.21.0": + version: 5.21.0 + resolution: "@typescript-eslint/eslint-plugin@npm:5.21.0" dependencies: - "@typescript-eslint/scope-manager": 5.19.0 - "@typescript-eslint/type-utils": 5.19.0 - "@typescript-eslint/utils": 5.19.0 + "@typescript-eslint/scope-manager": 5.21.0 + "@typescript-eslint/type-utils": 5.21.0 + "@typescript-eslint/utils": 5.21.0 debug: ^4.3.2 functional-red-black-tree: ^1.0.1 ignore: ^5.1.8 @@ -634,42 +634,42 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 7fa73fc8f988c6876cb51e2581e4d965e2958ad522222d364d295797a5f3460440d3188a197c584a274bf1c55d7fe01ac84cc4f63c074eaecce6908cc30d1f51 + checksum: 52068319798775f320564e98b1361bbe7f8a80ece3ded35145b2cefc5530047a12c6482727eb3c4d845dcd4e4a8d8bf5898125775f99c1d197d45c47a7732813 languageName: node linkType: hard -"@typescript-eslint/parser@npm:^5.19.0": - version: 5.19.0 - resolution: "@typescript-eslint/parser@npm:5.19.0" +"@typescript-eslint/parser@npm:^5.21.0": + version: 5.21.0 + resolution: "@typescript-eslint/parser@npm:5.21.0" dependencies: - "@typescript-eslint/scope-manager": 5.19.0 - "@typescript-eslint/types": 5.19.0 - "@typescript-eslint/typescript-estree": 5.19.0 + "@typescript-eslint/scope-manager": 5.21.0 + "@typescript-eslint/types": 5.21.0 + "@typescript-eslint/typescript-estree": 5.21.0 debug: ^4.3.2 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: eaff3c6b5d179b3b6758e9a64f15c27fa4957a41cc1b4ed99c82605d43394fec467626b11623d5f861ff3c3442c4d2735e1ba18a452f1316d20da74fcaa5e0ec + checksum: c0a4f03dccfba699c95788bef35312ec2ab7fa0dd7164916bce7762293b00f12f454d44dea2f1553d516d87a5fcc262ea3c5b7efa958cbfda7e4b9b73d67b54f languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.19.0": - version: 5.19.0 - resolution: "@typescript-eslint/scope-manager@npm:5.19.0" +"@typescript-eslint/scope-manager@npm:5.21.0": + version: 5.21.0 + resolution: "@typescript-eslint/scope-manager@npm:5.21.0" dependencies: - "@typescript-eslint/types": 5.19.0 - "@typescript-eslint/visitor-keys": 5.19.0 - checksum: 3aced2be7e4a8b98b6b0fe4c6b5a78ac7e16af67cdcaa6f6ad5596ba8a131600aae6a0dad4e8dccb57afd9765800fb49f4e0d5ec9670bdb7df006abe0a14ab9c + "@typescript-eslint/types": 5.21.0 + "@typescript-eslint/visitor-keys": 5.21.0 + checksum: 2bcb5947d7882f08fb8f40eea154c15152957105a3dc80bf8481212a66d35a8d2239437e095a9a7526c6c0043e9bd6bececf4f87d40da85abb2d2b69f774d805 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:5.19.0": - version: 5.19.0 - resolution: "@typescript-eslint/type-utils@npm:5.19.0" +"@typescript-eslint/type-utils@npm:5.21.0": + version: 5.21.0 + resolution: "@typescript-eslint/type-utils@npm:5.21.0" dependencies: - "@typescript-eslint/utils": 5.19.0 + "@typescript-eslint/utils": 5.21.0 debug: ^4.3.2 tsutils: ^3.21.0 peerDependencies: @@ -677,23 +677,23 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 9ac20813139de0dc917cd9bc169b3592202faef3ad714c9cff6d07422761b3e138e212827ad3de75aed674df3acc69ecc015923c9496d084aac6855f55ef0f30 + checksum: 09a9dbaa26c0c56aa36e0d6e119007dcbe2cc326b844892ce9389409d5a1d43951f67e0ca03fb28d4d96a09ab498f125dd3bc09f82e655c2ca7023566ad2cf5f languageName: node linkType: hard -"@typescript-eslint/types@npm:5.19.0": - version: 5.19.0 - resolution: "@typescript-eslint/types@npm:5.19.0" - checksum: 383091f0063c789c07e8e8361f8a2b5c4619fc3672e9b1ac88c83ec3abd9ddeaea7c8adcc62aacfa8139ebff4c87c5871fb8f743a54208cc239c5a0c3bfbc280 +"@typescript-eslint/types@npm:5.21.0": + version: 5.21.0 + resolution: "@typescript-eslint/types@npm:5.21.0" + checksum: 1581bf79f8c9236844ca8891e26c84503b654359fbfee80d76f9f57fb90c24210687cd30f61592e7d44cacf5417c83aaa5ae8559a4a8b6ce6b6c4a163b8b86c2 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:5.19.0": - version: 5.19.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.19.0" +"@typescript-eslint/typescript-estree@npm:5.21.0": + version: 5.21.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.21.0" dependencies: - "@typescript-eslint/types": 5.19.0 - "@typescript-eslint/visitor-keys": 5.19.0 + "@typescript-eslint/types": 5.21.0 + "@typescript-eslint/visitor-keys": 5.21.0 debug: ^4.3.2 globby: ^11.0.4 is-glob: ^4.0.3 @@ -702,33 +702,33 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 57567065a27f6945005e59d0b092c9d4e9537a06c225a8ffdc22f5504e4e4e61a47895ae60301d2c497b67add82ca3bab8fab816df131ab0d2106370e13ba49b + checksum: 4f78d61be2f35775d0f2d7fc4e3bb0bfc6b84e608e96a297c948f84a7254c1b9f0062f61a1dce67a8d4eb67476a9b4a9ebd8b6412e97db76f675c03363a5a0ad languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.19.0": - version: 5.19.0 - resolution: "@typescript-eslint/utils@npm:5.19.0" +"@typescript-eslint/utils@npm:5.21.0": + version: 5.21.0 + resolution: "@typescript-eslint/utils@npm:5.21.0" dependencies: "@types/json-schema": ^7.0.9 - "@typescript-eslint/scope-manager": 5.19.0 - "@typescript-eslint/types": 5.19.0 - "@typescript-eslint/typescript-estree": 5.19.0 + "@typescript-eslint/scope-manager": 5.21.0 + "@typescript-eslint/types": 5.21.0 + "@typescript-eslint/typescript-estree": 5.21.0 eslint-scope: ^5.1.1 eslint-utils: ^3.0.0 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 2778e38574a70695e2d499f2451e4eceb56c1cdb41b8a74b866519fd078417a96e1ddcd28ccb92edcbf4c243930cfdae684163588806160493d1099e8fd78eab + checksum: ed339a4ccb9eeb2a1132c41999d6584c15c4b7e2f0132bce613f502faa1dbbad7e206b642360392a6e2b24e294df90910141c7da0959901efcd600aedc4c4253 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.19.0": - version: 5.19.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.19.0" +"@typescript-eslint/visitor-keys@npm:5.21.0": + version: 5.21.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.21.0" dependencies: - "@typescript-eslint/types": 5.19.0 + "@typescript-eslint/types": 5.21.0 eslint-visitor-keys: ^3.0.0 - checksum: ea878349c716980e8c83fde0b60399c5e59931f74eed14d3db0f630a3ed4d092a069a5cdd3bd652bde5e19d733babd18a70ddbb5e4f6ab5b2110ad5cce857bf7 + checksum: 328b18faa61872160f3e5faacb5b68022bdabd04b5414f115133245a4a1ecfb5762c67fd645ab3253005480bd25a38598f57fdc2ff2b01d830ac68b37d3d06a5 languageName: node linkType: hard @@ -1888,11 +1888,11 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^8.13.0": - version: 8.13.0 - resolution: "eslint@npm:8.13.0" +"eslint@npm:^8.14.0": + version: 8.14.0 + resolution: "eslint@npm:8.14.0" dependencies: - "@eslint/eslintrc": ^1.2.1 + "@eslint/eslintrc": ^1.2.2 "@humanwhocodes/config-array": ^0.9.2 ajv: ^6.10.0 chalk: ^4.0.0 @@ -1929,7 +1929,7 @@ __metadata: v8-compile-cache: ^2.0.3 bin: eslint: bin/eslint.js - checksum: bc7d2fc9a046d42cb2c8987573ecaf534c1fae14747c4695e32388e179c5f21b83eefdb3e4f35924bf76152e226d7cc9dfb21f12348baf12c803109005b17439 + checksum: 87d2e3e5eb93216d4ab36006e7b8c0bfad02f40b0a0f193f1d42754512cd3a9d8244152f1c69df5db2e135b3c4f1c10d0ed2f0881fe8a8c01af55465968174c1 languageName: node linkType: hard @@ -2827,10 +2827,10 @@ __metadata: languageName: node linkType: hard -"jsbi@npm:^4.2.1": - version: 4.2.1 - resolution: "jsbi@npm:4.2.1" - checksum: e92d19e845c30406e998b875113782702ed15230f735a3c397c95f900f8ddbed6c460fd0e608317830040f5b13605fe6ddfda57ff5c6fa18987f20d11f92704e +"jsbi@npm:^4.3.0": + version: 4.3.0 + resolution: "jsbi@npm:4.3.0" + checksum: 27c4f178eb7fd9d1756144066fdebc62f4a0176e877f55e646e8ce84075c13551bd575a316b9959ccdcca9d5dc05a81c9907cfa09f0cfeb43c9777797e36b0e9 languageName: node linkType: hard @@ -2897,9 +2897,9 @@ __metadata: languageName: node linkType: hard -"lint-staged@npm:^12.3.8": - version: 12.3.8 - resolution: "lint-staged@npm:12.3.8" +"lint-staged@npm:^12.4.1": + version: 12.4.1 + resolution: "lint-staged@npm:12.4.1" dependencies: cli-truncate: ^3.1.0 colorette: ^2.0.16 @@ -2917,7 +2917,7 @@ __metadata: yaml: ^1.10.2 bin: lint-staged: bin/lint-staged.js - checksum: af6a89ae4244e4eac7180c6e7da452f378fd156ff38eaa666ecbb78f1e2efb7f1a9fc766dcc1cdde2bd76e03da68e602056ca9d2f1c6e46cf10aa83d20bf4d49 + checksum: b57183b537064cda6caef6679918bf271903145f7c28d09567e918b8b13094048b579f8df808ea590dbd7ea2ec332327c5e372cf3d77e85b7b0254f6541ce4c3 languageName: node linkType: hard @@ -4436,6 +4436,13 @@ resolve@^1.20.0: languageName: node linkType: hard +"tslib@npm:^2.4.0": + version: 2.4.0 + resolution: "tslib@npm:2.4.0" + checksum: 8c4aa6a3c5a754bf76aefc38026134180c053b7bd2f81338cb5e5ebf96fefa0f417bff221592bf801077f5bf990562f6264fecbc42cd3309b33872cb6fc3b113 + languageName: node + linkType: hard + "tsutils@npm:^3.21.0": version: 3.21.0 resolution: "tsutils@npm:3.21.0"