diff --git a/.github/workflows/check-build.yml b/.github/workflows/check-build.yml index 565001b430..46e48a771a 100644 --- a/.github/workflows/check-build.yml +++ b/.github/workflows/check-build.yml @@ -46,8 +46,5 @@ jobs: - name: Generate stats-dapp codegen run: yarn gql:codegen - - name: Fetch the on-chain anchors data - run: yarn fetch:onChainConfig - - name: build run: yarn nx run-many --all --target=build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df247a00f6..22bd4c0f9f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,9 +82,6 @@ jobs: - name: Generate stats-dapp codegen run: yarn gql:codegen - - name: Fetch the on-chain anchors data - run: yarn fetch:onChainConfig - - name: build run: yarn nx run-many --all --target=build diff --git a/apps/bridge-dapp/postcss.config.js b/apps/bridge-dapp/postcss.config.js index bc58d7b3c2..434477edf5 100644 --- a/apps/bridge-dapp/postcss.config.js +++ b/apps/bridge-dapp/postcss.config.js @@ -7,6 +7,7 @@ const { join } = require('path'); module.exports = { plugins: { + 'postcss-preset-env': {}, 'postcss-import': {}, tailwindcss: { config: join(__dirname, 'tailwind.config.js'), diff --git a/apps/bridge-dapp/scripts/localSubstrate.ts b/apps/bridge-dapp/scripts/localSubstrate.ts index 0b3e191c4c..b67a7ded96 100644 --- a/apps/bridge-dapp/scripts/localSubstrate.ts +++ b/apps/bridge-dapp/scripts/localSubstrate.ts @@ -15,8 +15,7 @@ * -v --verbose: Enable node logging */ -import { ApiPromise, WsProvider } from '@polkadot/api'; -import { LocalProtocolSubstrate } from '@webb-tools/test-utils'; +import { ApiPromise } from '@polkadot/api'; import { BN } from 'bn.js'; import chalk from 'chalk'; import { Command } from 'commander'; @@ -27,8 +26,8 @@ import addAssetMetadata from './utils/addAssetMetadata'; import addAssetToPool from './utils/addAssetToPool'; import createPoolShare from './utils/createPoolShare'; import createVAnchor from './utils/createVAnchor'; -import getLocalApi from './utils/getLocalApi'; import getKeyring from './utils/getKeyRing'; +import getLocalApi from './utils/getLocalApi'; import transferAsset from './utils/transferAsset'; // Load env variables @@ -66,7 +65,7 @@ async function main() { // Start the nodes console.log(chalk.blue('Starting local substrate protocol...')); - const aliceNode = await LocalProtocolSubstrate.start({ + /* await LocalProtocolSubstrate.start({ name: 'substrate-alice', authority: 'alice', usageMode, @@ -74,20 +73,20 @@ async function main() { enableLogging: options.verbose, }); - const _bobNode = await LocalProtocolSubstrate.start({ + await LocalProtocolSubstrate.start({ name: 'substrate-bob', authority: 'bob', usageMode, ports: 'auto', enableLogging: options.verbose, - }); + }); */ // Wait until we are ready and connected console.log(chalk.blue('Waiting for API to be ready...')); const aliceApi = await getLocalApi(ALICE_PORT); - console.log(chalk`=> {green.bold API are ready!}`); + console.log(chalk`=> {green.bold API is ready!}`); await initPoolShare(aliceApi); } @@ -151,8 +150,15 @@ async function initPoolShare(api: ApiPromise) { chalk` => {green Token transferred to test account with hash \`${hash}\`}` ); } - - console.log(chalk.green.bold('✅ Protocol Substrate ready to use!!!')); } -main().catch(console.error); +main() + .then(() => { + console.log(chalk.green.bold('✅ Protocol Substrate ready to use!!!')); + process.exit(0); + }) + .catch((error) => { + console.log(chalk.red.bold('❌ Protocol Substrate failed to start!!!')); + console.log(error); + process.exit(1); + }); diff --git a/apps/bridge-dapp/scripts/localTangle.ts b/apps/bridge-dapp/scripts/localTangle.ts index e77ccf4d02..081209cae8 100644 --- a/apps/bridge-dapp/scripts/localTangle.ts +++ b/apps/bridge-dapp/scripts/localTangle.ts @@ -29,6 +29,7 @@ import getLocalApi from './utils/getLocalApi'; import getKeyring from './utils/getKeyRing'; import transferAsset from './utils/transferAsset'; +// TODO: Replace this lib with `execa` // eslint-disable-next-line @typescript-eslint/no-var-requires const shelljs = require('shelljs'); diff --git a/apps/bridge-dapp/webpack.base.js b/apps/bridge-dapp/webpack.base.js index f6706ae93a..9e0ae370d5 100644 --- a/apps/bridge-dapp/webpack.base.js +++ b/apps/bridge-dapp/webpack.base.js @@ -11,15 +11,13 @@ const CopyWebpackPlugin = require('copy-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const webpack = require('webpack'); const TerserPlugin = require('terser-webpack-plugin'); +const { commandSync } = require('execa'); const { workspaceRoot } = require('nx/src/utils/workspace-root'); const findPackages = require('../../tools/scripts/findPackages'); -const { ON_CHAIN_CONFIG_PATH } = require('../../tools/scripts/constants'); const packageJson = require(path.resolve(__dirname, 'package.json')); const packageVersion = packageJson.version; -const onChainCfgPath = path.resolve(workspaceRoot, ON_CHAIN_CONFIG_PATH); - function mapChunks(name, regs, inc) { return regs.reduce( (result, test, index) => ({ @@ -36,19 +34,12 @@ function mapChunks(name, regs, inc) { } function createWebpack(env, mode = 'production') { - if (!fs.existsSync(onChainCfgPath)) { - throw new Error( - `Please run \`${chalk.cyan.bold.underline( - 'yarn fetch:onChainConfig' - )}\` first. Missing on-chain config at ${onChainCfgPath}.` - ); - } else { - console.log( - `Found on-chain config at ${onChainCfgPath}. Using it to generate the on-chain config.` - ); - } + commandSync('yarn fetch:onChainConfig', { + cwd: workspaceRoot, + stdio: 'inherit', + }); - console.log('Running webpack in: ', mode); + console.log(chalk.cyan('Running webpack in: ', mode)); const isDevelopment = mode === 'development'; const alias = findPackages().reduce((alias, { dir, name }) => { alias[name] = path.resolve(__dirname, `../../libs/${dir}/src`); @@ -107,17 +98,6 @@ function createWebpack(env, mode = 'production') { sourceMap: isDevelopment, }, }, - { - // process tailwind stuff - // https://webpack.js.org/loaders/postcss-loader/ - loader: 'postcss-loader', - options: { - sourceMap: isDevelopment, - postcssOptions: { - plugins: [require('tailwindcss')], - }, - }, - }, { // load sass files into css files loader: 'sass-loader', @@ -125,6 +105,7 @@ function createWebpack(env, mode = 'production') { sourceMap: isDevelopment, }, }, + 'postcss-loader', ], }, { diff --git a/apps/bridge-dapp/webpack.dev.js b/apps/bridge-dapp/webpack.dev.js index cb7f9aa7d8..4f7e13033f 100644 --- a/apps/bridge-dapp/webpack.dev.js +++ b/apps/bridge-dapp/webpack.dev.js @@ -7,7 +7,6 @@ const path = require('path'); const { merge } = require('webpack-merge'); const baseConfig = require('./webpack.base.js'); -const isDevelopment = process.env.NODE_ENV !== 'production'; module.exports = (env, config) => { env.context = __dirname; @@ -32,7 +31,7 @@ module.exports = (env, config) => { inject: true, template: './src/public/index.html', }), - isDevelopment && new ReactRefreshWebpackPlugin(), + new ReactRefreshWebpackPlugin(), ], watchOptions: { // 5.66.0 work-around (was reduced to 20, then started failing) diff --git a/apps/webbsite/.env.example b/apps/webbsite/.env.example deleted file mode 100644 index 36e038f951..0000000000 --- a/apps/webbsite/.env.example +++ /dev/null @@ -1,7 +0,0 @@ -NOTION_TOKEN_V2="NOTION_TOKEN_V2" - -NOTION_ACTIVE_USER="NOTION_ACTIVE_USER" - -PRIVACY_POLICY_PAGE_ID="PRIVACY_POLICY_PAGE_ID" - -TERMS_AND_CONDITIONS_PAGE_ID="TERMS_AND_CONDITIONS_PAGE_ID" diff --git a/libs/abstract-api-provider/src/utils/utxoFromVAnchorNote.ts b/libs/abstract-api-provider/src/utils/utxoFromVAnchorNote.ts index 348edef3a0..388df26173 100644 --- a/libs/abstract-api-provider/src/utils/utxoFromVAnchorNote.ts +++ b/libs/abstract-api-provider/src/utils/utxoFromVAnchorNote.ts @@ -24,9 +24,7 @@ async function utxoFromVAnchorNote(note: JsNote, leafIndex = 0): Promise { keypair, }; - return input.backend === 'Arkworks' - ? Utxo.generateUtxo(input) - : CircomUtxo.generateUtxo(input); + return CircomUtxo.generateUtxo(input); } export default utxoFromVAnchorNote; diff --git a/libs/abstract-api-provider/src/webb-provider.interface.ts b/libs/abstract-api-provider/src/webb-provider.interface.ts index fa220a1b33..59eb0dbb11 100644 --- a/libs/abstract-api-provider/src/webb-provider.interface.ts +++ b/libs/abstract-api-provider/src/webb-provider.interface.ts @@ -253,6 +253,12 @@ export interface WebbApiProvider extends EventBus { provider?: providers.Provider | ApiPromise ) => Promise; + // get vanchor levels + getVAnchorLevels: ( + vAnchorAddressOrTreeId: string, + providerOrApi?: providers.Provider | ApiPromise + ) => Promise; + // generate utxo generateUtxo: (input: UtxoGenInput) => Promise; } diff --git a/libs/abstract-api-provider/tsconfig.lib.json b/libs/abstract-api-provider/tsconfig.lib.json index 7bfc80f73e..8b99997ab5 100644 --- a/libs/abstract-api-provider/tsconfig.lib.json +++ b/libs/abstract-api-provider/tsconfig.lib.json @@ -5,6 +5,6 @@ "declaration": true, "types": ["node"] }, - "include": ["**/*.ts"], + "include": ["**/*.ts", "../../types/**/*.d.ts"], "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"] } diff --git a/libs/api-provider-environment/project.json b/libs/api-provider-environment/project.json index 38310b70fd..a1c7947b15 100644 --- a/libs/api-provider-environment/project.json +++ b/libs/api-provider-environment/project.json @@ -12,6 +12,14 @@ "main": "libs/api-provider-environment/src/index.ts", "tsConfig": "libs/api-provider-environment/tsconfig.lib.json", "assets": ["libs/api-provider-environment/*.md"] + }, + "dependsOn": ["fetch-on-chain-config", "^build"] + }, + "fetch-on-chain-config": { + "executor": "nx:run-commands", + "options": { + "command": "yarn fetch:onChainConfig", + "color": true } }, "lint": { diff --git a/libs/api-provider-environment/src/types.ts b/libs/api-provider-environment/src/types.ts deleted file mode 100644 index 9c7afcf1d3..0000000000 --- a/libs/api-provider-environment/src/types.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module 'circomlibjs'; - -declare module 'snarkjs'; diff --git a/libs/api-provider-environment/tsconfig.lib.json b/libs/api-provider-environment/tsconfig.lib.json index 7bfc80f73e..8b99997ab5 100644 --- a/libs/api-provider-environment/tsconfig.lib.json +++ b/libs/api-provider-environment/tsconfig.lib.json @@ -5,6 +5,6 @@ "declaration": true, "types": ["node"] }, - "include": ["**/*.ts"], + "include": ["**/*.ts", "../../types/**/*.d.ts"], "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"] } diff --git a/libs/dapp-config/src/types.ts b/libs/dapp-config/src/types.ts index 0f4632706a..c558ac8c1b 100644 --- a/libs/dapp-config/src/types.ts +++ b/libs/dapp-config/src/types.ts @@ -42,3 +42,8 @@ export interface AnchorMetadata { */ linkableAnchor: Record; } + +export type ConfigType = Record< + number, + { nativeCurrency: ICurrency; anchorMetadatas: AnchorMetadata[] } +>; diff --git a/libs/dapp-types/src/WebbError.ts b/libs/dapp-types/src/WebbError.ts index 092c8fdd30..0ccd962c5b 100644 --- a/libs/dapp-types/src/WebbError.ts +++ b/libs/dapp-types/src/WebbError.ts @@ -41,10 +41,12 @@ export enum WebbErrorCodes { ChainIdTypeUnformatted, // Invalid amount to withdraw, AmountToWithdrawExceedsTheDepositedAmount, - // Transaction is cancelled + /// Transaction is cancelled TransactionCancelled, - // There is a transaction in progress + /// There is a transaction in progress TransactionInProgress, + /// The tree not found + TreeNotFound, // Insufficient disk space InsufficientDiskSpace, } @@ -216,6 +218,12 @@ export class WebbError extends Error { message: `No currency is available`, }; + case WebbErrorCodes.TreeNotFound: + return { + code, + message: `The tree not found`, + }; + case WebbErrorCodes.InsufficientDiskSpace: return { code, diff --git a/libs/note-manager/src/note-manager.ts b/libs/note-manager/src/note-manager.ts index dffae5fc5e..1b16e0127b 100644 --- a/libs/note-manager/src/note-manager.ts +++ b/libs/note-manager/src/note-manager.ts @@ -376,9 +376,7 @@ export class NoteManager { }; // Convert the amount to units of wei - const utxo = await (backend == 'Arkworks' - ? Utxo.generateUtxo(input) - : CircomUtxo.generateUtxo(input)); + const utxo = await CircomUtxo.generateUtxo(input); const noteInput: NoteGenInput = { ...this.defaultNoteGenInput, diff --git a/libs/polkadot-api-provider/src/types.ts b/libs/polkadot-api-provider/src/types.ts new file mode 100644 index 0000000000..59481fa0ee --- /dev/null +++ b/libs/polkadot-api-provider/src/types.ts @@ -0,0 +1,42 @@ +import { HexString } from '@polkadot/util/types'; + +export interface IVAnchorPublicInputs { + proof: HexString; + roots: HexString[]; + inputNullifiers: HexString[]; + outputCommitments: [HexString, HexString]; + publicAmount: HexString; + extDataHash: HexString; +} + +export interface Groth16Proof { + proof: { + pi_a: string[]; + pi_b: string[][]; + pi_c: string[]; + curve: string; + prococol: 'groth16'; + }; + publicSignals: string[]; +} + +export interface VAnchorGroth16ProofInput { + roots: bigint[]; + chainID: bigint; + inputNullifier: bigint[]; + outputCommitment: bigint[]; + publicAmount: bigint; + extDataHash: bigint; + + inAmount: bigint[]; + inPrivateKey: bigint[]; + inBlinding: bigint[]; + inPathIndices: bigint[]; + inPathElements: bigint[][]; + + // data for 2 transaction outputs + outChainID: bigint[]; + outAmount: bigint[]; + outPubkey: bigint[]; + outBlinding: bigint[]; +} diff --git a/libs/polkadot-api-provider/src/utils/ensureHex.ts b/libs/polkadot-api-provider/src/utils/ensureHex.ts new file mode 100644 index 0000000000..8e0c713449 --- /dev/null +++ b/libs/polkadot-api-provider/src/utils/ensureHex.ts @@ -0,0 +1,11 @@ +import { HexString } from '@polkadot/util/types'; + +const ensureHex = (maybeHex: string): HexString => { + if (maybeHex.startsWith('0x')) { + return maybeHex as `0x${string}`; + } + + return `0x${maybeHex}`; +}; + +export default ensureHex; diff --git a/libs/polkadot-api-provider/src/utils/getVAnchorExtDataHash.ts b/libs/polkadot-api-provider/src/utils/getVAnchorExtDataHash.ts new file mode 100644 index 0000000000..cc5a6ab89a --- /dev/null +++ b/libs/polkadot-api-provider/src/utils/getVAnchorExtDataHash.ts @@ -0,0 +1,20 @@ +import { IVariableAnchorExtData } from '@webb-tools/interfaces'; +import { FIELD_SIZE } from '@webb-tools/sdk-core'; +import { ethers } from 'ethers'; +import ensureHex from './ensureHex'; + +const getVAnchorExtDataHash = (extData: IVariableAnchorExtData): bigint => { + const abi = new ethers.utils.AbiCoder(); + const encodedData = abi.encode( + [ + '(bytes recipient,int256 extAmount,bytes relayer,uint256 fee,uint256 refund,bytes token,bytes encryptedOutput1,bytes encryptedOutput2)', + ], + [extData] + ); + + const hash = ethers.utils.keccak256(encodedData); + + return BigInt(ensureHex(hash)) % FIELD_SIZE.toBigInt(); +}; + +export default getVAnchorExtDataHash; diff --git a/libs/polkadot-api-provider/src/utils/groth16ProofToBytes.ts b/libs/polkadot-api-provider/src/utils/groth16ProofToBytes.ts new file mode 100644 index 0000000000..7004a61c02 --- /dev/null +++ b/libs/polkadot-api-provider/src/utils/groth16ProofToBytes.ts @@ -0,0 +1,32 @@ +import { ethers } from 'ethers'; +import { Groth16Proof } from '../types'; +import * as snarkjs from 'snarkjs'; +import { hexToU8a } from '@webb-tools/utils'; + +async function groth16ProofToBytes(proof: Groth16Proof): Promise { + const callData = await snarkjs.groth16.exportSolidityCallData( + proof.proof, + proof.publicSignals + ); + + const parsedCalldata = JSON.parse('[' + callData + ']'); + const pi_a = parsedCalldata[0] as Groth16Proof['proof']['pi_a']; + const pi_b = parsedCalldata[1] as Groth16Proof['proof']['pi_b']; + const pi_c = parsedCalldata[2] as Groth16Proof['proof']['pi_c']; + + const abi = new ethers.utils.AbiCoder(); + const fnAbi = '(uint[2] a,uint[2][2] b,uint[2] c)'; + const encodedData = abi.encode( + [fnAbi], + [ + { + a: pi_a, + b: pi_b, + c: pi_c, + }, + ] + ); + return hexToU8a(encodedData); +} + +export default groth16ProofToBytes; diff --git a/libs/polkadot-api-provider/src/utils/index.ts b/libs/polkadot-api-provider/src/utils/index.ts new file mode 100644 index 0000000000..ca8a0f3dda --- /dev/null +++ b/libs/polkadot-api-provider/src/utils/index.ts @@ -0,0 +1,4 @@ +export { default as ensureHex } from './ensureHex'; +export { default as getVAnchorExtDataHash } from './getVAnchorExtDataHash'; +export { default as substrateProviderFactory } from './substrateProviderFactory'; +export { default as groth16ProofToBytes } from './groth16ProofToBytes'; diff --git a/libs/polkadot-api-provider/src/utils.ts b/libs/polkadot-api-provider/src/utils/substrateProviderFactory.ts similarity index 86% rename from libs/polkadot-api-provider/src/utils.ts rename to libs/polkadot-api-provider/src/utils/substrateProviderFactory.ts index df2001580a..ee6aa675b0 100644 --- a/libs/polkadot-api-provider/src/utils.ts +++ b/libs/polkadot-api-provider/src/utils/substrateProviderFactory.ts @@ -1,11 +1,11 @@ import { ApiPromise } from '@polkadot/api'; import { executorWithTimeout } from '@webb-tools/browser-utils'; import { chainsPopulated } from '@webb-tools/dapp-config'; -import { PolkadotProvider } from './ext-provider'; +import { PolkadotProvider } from '../ext-provider/polkadot-provider'; const substrateProviderCache: { [typedChainId: number]: ApiPromise } = {}; -export const substrateProviderFactory = async ( +const substrateProviderFactory = async ( typedChainId: number ): Promise => { const cached = substrateProviderCache[typedChainId]; @@ -38,3 +38,5 @@ export const substrateProviderFactory = async ( }) ); }; + +export default substrateProviderFactory; diff --git a/libs/polkadot-api-provider/src/webb-provider.ts b/libs/polkadot-api-provider/src/webb-provider.ts index 3b17425a22..bd867b0265 100644 --- a/libs/polkadot-api-provider/src/webb-provider.ts +++ b/libs/polkadot-api-provider/src/webb-provider.ts @@ -29,6 +29,7 @@ import { buildVariableWitnessCalculator, calculateTypedChainId, ChainType, + CircomUtxo, parseTypedChainId, Utxo, UtxoGenInput, @@ -41,8 +42,15 @@ import { } from '@polkadot/extension-inject/types'; import { VoidFn } from '@polkadot/api/types'; +import { + fetchVAnchorKeyFromAws, + fetchVAnchorWasmFromAws, +} from '@webb-tools/fixtures-deployments'; import { ZkComponents } from '@webb-tools/utils'; +import type { Backend } from '@webb-tools/wasm-utils'; +import { providers } from 'ethers'; import { BehaviorSubject, Observable } from 'rxjs'; + import { PolkadotProvider } from './ext-provider'; import { PolkaTXBuilder } from './transaction'; import { PolkadotBridgeApi } from './webb-provider/bridge-api'; @@ -52,11 +60,6 @@ import { PolkadotECDSAClaims } from './webb-provider/ecdsa-claims'; import { PolkadotRelayerManager } from './webb-provider/relayer-manager'; import { PolkadotVAnchorActions } from './webb-provider/vanchor-actions'; import { PolkadotWrapUnwrap } from './webb-provider/wrap-unwrap'; -import { providers } from 'ethers'; -import { - fetchVAnchorKeyFromAws, - fetchVAnchorWasmFromAws, -} from '@webb-tools/fixtures-deployments'; export class WebbPolkadot extends EventBus @@ -79,13 +82,16 @@ export class WebbPolkadot readonly typedChainidSubject: BehaviorSubject; - readonly backend = 'Arkworks'; + readonly backend: Backend = 'Circom'; private _newBlock = new BehaviorSubject(null); // Map to store the max edges for each tree id private readonly vAnchorMaxEdges = new Map(); + // Map to store the vAnchor levels for each tree id + private readonly vAnchorLevels = new Map(); + private smallFixtures: ZkComponents | null = null; private largeFixtures: ZkComponents | null = null; @@ -377,11 +383,7 @@ export class WebbPolkadot return this.smallFixtures; } - const smallKey = await fetchVAnchorKeyFromAws( - maxEdges, - isSmall, - true // isSubstrate - ); + const smallKey = await fetchVAnchorKeyFromAws(maxEdges, isSmall); const smallWasm = await fetchVAnchorWasmFromAws( maxEdges, @@ -403,11 +405,7 @@ export class WebbPolkadot return this.largeFixtures; } - const largeKey = await fetchVAnchorKeyFromAws( - maxEdges, - isSmall, - true // isSubstrate - ); + const largeKey = await fetchVAnchorKeyFromAws(maxEdges, isSmall); const largeWasm = await fetchVAnchorWasmFromAws( maxEdges, @@ -425,44 +423,6 @@ export class WebbPolkadot return largeFixtures; } - /** - * Get the zero knowledge vanchor proving key - * @param maxEdges the max number of edges in the merkle tree - * @param isSmall whether fixtures are for small inputs (less than or equal to 2 inputs) - * @returns zk proving key - */ - async getZkVAnchorKey(maxEdges: number, isSmall?: boolean) { - if (isSmall) { - if (this.smallFixtures) { - return this.smallFixtures.zkey; - } - - const smallKey = await fetchVAnchorKeyFromAws( - maxEdges, - isSmall, - true // isSubstrate - ); - - // Return the key without storing it in the cache - // because we cached the response already in browser cache - return smallKey; - } - - if (this.largeFixtures) { - return this.largeFixtures.zkey; - } - - const largeKey = await fetchVAnchorKeyFromAws( - maxEdges, - isSmall, - true // isSubstrate - ); - - // Return the key without storing it in the cache - // because we cached the response already in browser cache - return largeKey; - } - async getVAnchorMaxEdges( treeId: string, provider?: providers.Provider | ApiPromise @@ -490,7 +450,37 @@ export class WebbPolkadot return maxEdges.toNumber(); } + async getVAnchorLevels( + treeId: string, + provider?: providers.Provider | ApiPromise + ): Promise { + if (provider instanceof providers.Provider) { + console.error( + '`provider` of the type `providers.Provider` is not supported in polkadot provider overriding to `this.api`' + ); + provider = this.api; + } + + const storedLevels = this.vAnchorLevels.get(treeId); + if (storedLevels) { + return storedLevels; + } + + const api = provider || this.api; + const treeData = await api.query.merkleTreeBn254.trees(treeId); + if (treeData.isNone) { + throw WebbError.from(WebbErrorCodes.TreeNotFound); + } + + const treeMedata = treeData.unwrap(); + const levels = treeMedata.depth.toNumber(); + + this.vAnchorLevels.set(treeId, levels); + + return levels; + } + generateUtxo(input: UtxoGenInput): Promise { - return Utxo.generateUtxo(input); + return CircomUtxo.generateUtxo(input); } } diff --git a/libs/polkadot-api-provider/src/webb-provider/vanchor-actions.ts b/libs/polkadot-api-provider/src/webb-provider/vanchor-actions.ts index ebf2e343be..4c98516c5f 100644 --- a/libs/polkadot-api-provider/src/webb-provider/vanchor-actions.ts +++ b/libs/polkadot-api-provider/src/webb-provider/vanchor-actions.ts @@ -1,34 +1,47 @@ -import { decodeAddress, naclEncrypt, randomAsU8a } from '@polkadot/util-crypto'; +import { decodeAddress } from '@polkadot/util-crypto'; import { ActiveWebbRelayer, FixturesStatus, - isVAnchorDepositPayload, NewNotesTxResult, ParametersOfTransactMethod, Transaction, TransactionPayloadType, TransactionState, - utxoFromVAnchorNote, VAnchorActions, + isVAnchorDepositPayload, + utxoFromVAnchorNote, } from '@webb-tools/abstract-api-provider'; import { WebbError, WebbErrorCodes } from '@webb-tools/dapp-types'; +import { IVariableAnchorExtData } from '@webb-tools/interfaces'; import { - ArkworksProvingManager, FIELD_SIZE, Keypair, LeafIdentifier, + MerkleProof, + MerkleTree, Note, - ProvingManagerSetupInput, - randomBN, Utxo, - VAnchorProof, + buildVariableWitnessCalculator, + generateVariableWitnessInput, + randomBN, + toFixedHex, } from '@webb-tools/sdk-core'; import { hexToU8a, u8aToHex } from '@webb-tools/utils'; import BN from 'bn.js'; +import { BigNumber } from 'ethers'; import { formatUnits } from 'ethers/lib/utils'; import { firstValueFrom } from 'rxjs'; -import { getLeafIndex } from '../mt-utils'; +import * as snarkjs from 'snarkjs'; + +import assert from 'assert'; +import { getLeafIndex } from '../mt-utils'; +import { Groth16Proof, IVAnchorPublicInputs } from '../types'; +import { + ensureHex, + getVAnchorExtDataHash, + groth16ProofToBytes, +} from '../utils'; import { WebbPolkadot } from '../webb-provider'; export class PolkadotVAnchorActions extends VAnchorActions { @@ -87,19 +100,18 @@ export class PolkadotVAnchorActions extends VAnchorActions { inputs = await this.padUtxos(inputs, 16); outputs = await this.padUtxos(outputs, 2); - const { extAmount, extData, vanchorProofData } = - await this.setupTransaction( - tx, - inputs, - outputs, - fee, - refund, - recipient, - relayer, - wrapUnwrapAssetId, - leavesMap, - treeId - ); + const { extData, publicInputs } = await this.setupTransaction( + tx, + inputs, + outputs, + fee, + refund, + recipient, + relayer, + wrapUnwrapAssetId, + leavesMap, + treeId + ); tx.next( TransactionState.SendingTransaction, @@ -114,7 +126,7 @@ export class PolkadotVAnchorActions extends VAnchorActions { section: 'vAnchorBn254', }, ], - [[treeId, vanchorProofData, extData]] + [[treeId, publicInputs, extData]] ); const txHash = await polkadotTx.call(activeAccount.address); @@ -193,6 +205,8 @@ export class PolkadotVAnchorActions extends VAnchorActions { return nextIdx.toBigInt(); } + // ------------------ Private ------------------ + private async prepareDepositTransaction( tx: Transaction, payload: Note, @@ -292,22 +306,27 @@ export class PolkadotVAnchorActions extends VAnchorActions { .then((roots) => roots.toHuman()); const rootsSet = [hexToU8a(root), hexToU8a(neighborRoots[0])]; - const extAmount = this.getExtAmount(inputs, outputs, fee); + const feeBigInt = BigInt(fee.toString()); + const extAmount = this.getExtAmount(inputs, outputs, feeBigInt); + + const extAmountAbs = extAmount < 0 ? -extAmount : extAmount; + if (extAmountAbs <= feeBigInt) { + throw new Error('The amount must be greater than the fee'); + } // Pass the identifier for leaves alongside the proof input - const leafIds: LeafIdentifier[] = []; + const leafIds: LeafIdentifier[] = inputs.map((input) => { + const index = input.index ?? this.inner.state.defaultUtxoIndex; + if (!input.index) { + input.setIndex(index); + } - for (const inputUtxo of inputs) { - leafIds.push({ - index: inputUtxo.index ?? this.inner.state.defaultUtxoIndex, - typedChainId: Number(inputUtxo.originChainId), - }); - } + return { index, typedChainId: Number(input.originChainId) }; + }); - const secret = randomAsU8a(); const encryptedCommitments: [Uint8Array, Uint8Array] = [ - naclEncrypt(outputs[0].commitment, secret).encrypted, - naclEncrypt(outputs[1].commitment, secret).encrypted, + hexToU8a(outputs[0].encrypt()), + hexToU8a(outputs[1].encrypt()), ]; const fixturesList = new Map(); @@ -317,75 +336,281 @@ export class PolkadotVAnchorActions extends VAnchorActions { // Proving key fixturesList.set('vanchor key', 'Waiting'); - const pkey = await this.inner.getZkVAnchorKey(maxEdges, inputs.length <= 2); + const { zkey, wasm } = await this.inner.getZkFixtures( + maxEdges, + inputs.length <= 2 + ); fixturesList.set('vanchor key', 'Done'); tx.next(TransactionState.GeneratingZk, undefined); - // Asset must be a 4 bytes array (32 bits) - const assetIdBytes = hexToU8a(Number(wrapUnwrapAssetId).toString(16), 32); - const fieldSize = new BN(FIELD_SIZE.toString()); + const fieldSize = FIELD_SIZE.toBigInt(); + const publicAmount = (extAmount - feeBigInt + fieldSize) % fieldSize; - if (!leavesMap[sourceTypedChainId]) { - leavesMap[sourceTypedChainId] = []; - } + const { extData, extDataHash } = this.generateExtData( + recipient, + relayer, + extAmount, + feeBigInt, + BigInt(refund.toString()), + wrapUnwrapAssetId, + u8aToHex(encryptedCommitments[0]), + u8aToHex(encryptedCommitments[1]) + ); - const proofInput: ProvingManagerSetupInput<'vanchor'> = { - inputUtxos: inputs, - leavesMap, - leafIds, - roots: rootsSet, - chainId: sourceTypedChainId.toString(), - output: [outputs[0], outputs[1]], - encryptedCommitments, - publicAmount: extAmount.sub(fee).add(fieldSize).mod(fieldSize).toString(), - provingKey: pkey, - relayer: decodeAddress(relayer), - recipient: decodeAddress(recipient), - extAmount: extAmount.toString(), - fee: fee.toString(), - refund: refund.toString(), - token: assetIdBytes, + const proofInputs = await this.generateProofInputs( + treeId, + rootsSet.map((r) => BigInt(u8aToHex(r))), + BigInt(sourceTypedChainId), + inputs, + outputs, + publicAmount, + feeBigInt, + extDataHash, + leavesMap + ); + + console.log('proofInputs', proofInputs); + + const witness = await this.getSnarkJsWitness(proofInputs, wasm); + + const proof = await this.getSnarkJsProof(zkey, witness); + + const publicInputs = await this.generatePublicInputs( + proof, + rootsSet, + inputs, + outputs, + publicAmount, + extDataHash + ); + + // For Substrate, specifically, we need the extAmount to not be in hex value, + // since substrate does not understand -ve hex values. + // Hence, we convert it to a string. + extData.extAmount = extAmount.toString(); + + return { + extData, + extAmount: extData.extAmount, + publicInputs, }; + } + + private async generatePublicInputs( + proof: Groth16Proof, + roots: Uint8Array[], + inputs: Utxo[], + outputs: Utxo[], + publicAmount: bigint, + extDataHash: bigint + ): Promise { + const proofBytes = await groth16ProofToBytes(proof); + const publicAmountHex = ensureHex(toFixedHex(publicAmount, 32)); + const extDataHashHex = ensureHex(toFixedHex(extDataHash)); + + const inputNullifiers = inputs.map((x) => + ensureHex(toFixedHex('0x' + x.nullifier)) + ); + + const outputCommitments = [ + ensureHex(toFixedHex(u8aToHex(outputs[0].commitment))), + ensureHex(toFixedHex(u8aToHex(outputs[1].commitment))), + ]; + + const rootsHex = roots.map((r) => ensureHex(toFixedHex(u8aToHex(r)))); - const extData = { - relayer: decodeAddress(relayer), - recipient: decodeAddress(recipient), - fee: String(fee), - refund: String(refund), - token: assetIdBytes, - extAmount: proofInput.extAmount, - encryptedOutput1: u8aToHex(encryptedCommitments[0]), - encryptedOutput2: u8aToHex(encryptedCommitments[1]), + return { + proof: ensureHex(u8aToHex(proofBytes)), + roots: rootsHex, + inputNullifiers, + outputCommitments: [outputCommitments[0], outputCommitments[1]], + publicAmount: publicAmountHex, + extDataHash: extDataHashHex, }; + } - const worker = this.inner.wasmFactory(); - const pm = new ArkworksProvingManager(worker); - const data: VAnchorProof = await pm.prove('vanchor', proofInput); - - const vanchorProofData = { - proof: `0x${data.proof}` as const, - publicAmount: data.publicAmount, - roots: rootsSet, - inputNullifiers: data.inputUtxos.map( - (input) => `0x${input.nullifier}` as const - ), - outputCommitments: data.outputUtxos.map((utxo) => utxo.commitment), - extDataHash: data.extDataHash, + private generateExtData( + recipient: string, + relayer: string, + extAmount: bigint, + fee: bigint, + refund: bigint, + wrapUnwrapToken: string, + encryptedOutput1: string, + encryptedOutput2: string + ): { + extData: IVariableAnchorExtData; + extDataHash: bigint; + } { + // i128 is a signed 128-bit integer + const extAmountBN = new BN(extAmount.toString()).toTwos(128).toString(); + const feeBN = new BN(fee.toString()).toTwos(128).toString(); + const refundBN = new BN(refund.toString()).toTwos(128).toString(); + + const extData: IVariableAnchorExtData = { + // For recipient, since it is an AccountId (32 bytes) we use toFixedHex to pad it to 32 bytes. + recipient: toFixedHex(u8aToHex(decodeAddress(recipient))), + // For relayer, since it is an AccountId (32 bytes) we use toFixedHex to pad it to 32 bytes. + relayer: toFixedHex(u8aToHex(decodeAddress(relayer))), + // For extAmount, since it is an Amount (i128) it should be 16 bytes + extAmount: toFixedHex(extAmountBN, 16), + // For fee, since it is a Balance (u128) it should be 16 bytes + fee: toFixedHex(feeBN, 16), + // For refund, since it is a Balance (u128) it should be 16 bytes + refund: toFixedHex(refundBN, 16), + // For token, since it is an AssetId (u32) it should be 4 bytes + token: toFixedHex(wrapUnwrapToken, 4), + encryptedOutput1, + encryptedOutput2, }; + const extDataHash = getVAnchorExtDataHash(extData); + + return { extData, extDataHash }; + } + + private getMerkleProof( + levels: number, + input: Utxo, + leavesMap?: Uint8Array[] + ): MerkleProof { + const tree = new MerkleTree(levels, leavesMap); + + let inputMerklePathIndices: number[]; + let inputMerklePathElements: BigNumber[]; + + if (Number(input.amount) > 0) { + if (input.index === undefined) { + throw new Error( + `Input commitment ${u8aToHex(input.commitment)} index was not set` + ); + } + if (input.index < 0) { + throw new Error( + `Input commitment ${u8aToHex(input.commitment)} index should be >= 0` + ); + } + if (leavesMap === undefined) { + const path = tree.path(input.index); + inputMerklePathIndices = path.pathIndices; + inputMerklePathElements = path.pathElements; + } else { + const mt = new MerkleTree(levels, leavesMap); + const path = mt.path(input.index); + inputMerklePathIndices = path.pathIndices; + inputMerklePathElements = path.pathElements; + } + } else { + inputMerklePathIndices = new Array(tree.levels).fill(0); + inputMerklePathElements = new Array(tree.levels).fill(0); + } + return { - extData, - extAmount: extData.extAmount, - vanchorProofData, + element: BigNumber.from(u8aToHex(input.commitment)), + pathElements: inputMerklePathElements, + pathIndices: inputMerklePathIndices, + merkleRoot: tree.root(), }; } - // https://github.com/webb-tools/protocol-solidity/blob/65d8e7ca7b7ba227d8cd97f2773fefc378655944/packages/anchors/src/Common.ts#L194-L198 - private getExtAmount(inputs: Utxo[], outputs: Utxo[], fee: BN) { - return new BN(fee) - .add(outputs.reduce((sum, x) => sum.add(new BN(x.amount)), new BN(0))) - .sub(inputs.reduce((sum, x) => sum.add(new BN(x.amount)), new BN(0))); + private async generateProofInputs( + treeId: string, + roots: bigint[], + typedChainId: bigint, + inputUtxos: Utxo[], + outputUtxos: Utxo[], + publicAmount: bigint, + fee: bigint, + extDataHash: bigint, + leavesMap: Record + ) { + const levels = await this.inner.getVAnchorLevels(treeId); + + let vanchorMerkleProof: MerkleProof[]; + if (Object.keys(leavesMap).length === 0) { + vanchorMerkleProof = inputUtxos.map((u) => + this.getMerkleProof(levels, u) + ); + } else { + const treeElements = leavesMap[typedChainId.toString()]; + vanchorMerkleProof = inputUtxos.map((u) => + this.getMerkleProof(levels, u, treeElements) + ); + } + + const witnessInput = generateVariableWitnessInput( + roots.map((r) => BigNumber.from(r)), // Temporary use of `BigNumber`, need to change to `BigInt` + typedChainId, + inputUtxos, + outputUtxos, + publicAmount, + fee, + BigNumber.from(extDataHash), // Temporary use of `BigNumber`, need to change to `BigInt` + vanchorMerkleProof + ); + + /* witnessInput['inputNullifier'] = witnessInput['inputNullifier'].map( + (el: HexString) => BigInt(el).toString() + ); + + witnessInput['inPrivateKey'] = witnessInput['inPrivateKey'].map( + (el: HexString) => BigInt(el).toString() + ); + + witnessInput['inPathElements'] = ( + witnessInput['inPathElements'] as BigNumber[][] + ).reduce((prev, current) => { + prev.push(...current.map((el) => el.toString())); + return prev; + }, [] as string[]); */ + + return witnessInput; + } + + private async getSnarkJsWitness( + witnessInput: any, + circuitWasm: Buffer + ): Promise { + const witnessCalculator = await buildVariableWitnessCalculator( + circuitWasm, + 0 + ); + return witnessCalculator.calculateWTNSBin(witnessInput, 0); + } + + private async getSnarkJsProof( + zkey: Uint8Array, + witness: Uint8Array + ): Promise { + const proofOutput: Groth16Proof = await snarkjs.groth16.prove( + zkey, + witness + ); + + const proof = proofOutput.proof; + const publicSignals = proofOutput.publicSignals; + + const vKey = await snarkjs.zKey.exportVerificationKey(zkey); + + const isValid = await snarkjs.groth16.verify(vKey, publicSignals, proof); + + assert.strictEqual(isValid, true, 'Invalid proof'); + + return proofOutput; + } + + private getExtAmount(inputs: Utxo[], outputs: Utxo[], fee: bigint) { + const outAmount = outputs.reduce( + (sum, x) => sum + BigInt(x.amount), + BigInt(0) + ); + const inAmount = inputs.reduce( + (sum, x) => sum + BigInt(x.amount), + BigInt(0) + ); + + return fee + outAmount - inAmount; } // https://github.com/webb-tools/protocol-solidity/blob/65d8e7ca7b7ba227d8cd97f2773fefc378655944/packages/anchors/src/Common.ts#L247-L269 diff --git a/libs/polkadot-api-provider/tsconfig.lib.json b/libs/polkadot-api-provider/tsconfig.lib.json index 7bfc80f73e..8b99997ab5 100644 --- a/libs/polkadot-api-provider/tsconfig.lib.json +++ b/libs/polkadot-api-provider/tsconfig.lib.json @@ -5,6 +5,6 @@ "declaration": true, "types": ["node"] }, - "include": ["**/*.ts"], + "include": ["**/*.ts", "../../types/**/*.d.ts"], "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"] } diff --git a/libs/react-hooks/tsconfig.lib.json b/libs/react-hooks/tsconfig.lib.json index 5d17cff212..269e28feda 100644 --- a/libs/react-hooks/tsconfig.lib.json +++ b/libs/react-hooks/tsconfig.lib.json @@ -6,6 +6,6 @@ "types": ["node"], "strict": true }, - "include": ["**/*.ts", "**/*.tsx"], + "include": ["**/*.ts", "**/*.tsx", "../../types/**/*.d.ts"], "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"] } diff --git a/libs/web3-api-provider/src/typings.ts b/libs/web3-api-provider/src/typings.ts deleted file mode 100644 index 3d2138b23d..0000000000 --- a/libs/web3-api-provider/src/typings.ts +++ /dev/null @@ -1 +0,0 @@ -declare module 'circomlibjs'; diff --git a/libs/web3-api-provider/src/webb-provider.ts b/libs/web3-api-provider/src/webb-provider.ts index 7e3ced384d..f2f205c70a 100644 --- a/libs/web3-api-provider/src/webb-provider.ts +++ b/libs/web3-api-provider/src/webb-provider.ts @@ -1,6 +1,8 @@ // Copyright 2022 @webb-tools/ // SPDX-License-Identifier: Apache-2.0 +import { ApiPromise } from '@polkadot/api'; +import { hexToU8a } from '@polkadot/util'; import { AccountsAdapter, Bridge, @@ -16,8 +18,11 @@ import { WebbProviderEvents, WebbState, } from '@webb-tools/abstract-api-provider'; +import { VAnchor } from '@webb-tools/anchors'; import { EventBus } from '@webb-tools/app-util'; +import { retryPromise } from '@webb-tools/browser-utils'; import { BridgeStorage } from '@webb-tools/browser-utils/storage'; +import { VAnchor__factory } from '@webb-tools/contracts'; import { ApiConfig, getAnchorDeploymentBlockNumber, @@ -28,6 +33,10 @@ import { WebbError, WebbErrorCodes, } from '@webb-tools/dapp-types'; +import { + fetchVAnchorKeyFromAws, + fetchVAnchorWasmFromAws, +} from '@webb-tools/fixtures-deployments'; import { NoteManager } from '@webb-tools/note-manager'; import { ChainType, @@ -41,19 +50,11 @@ import { toFixedHex, } from '@webb-tools/sdk-core'; import { Storage } from '@webb-tools/storage'; -import { Signer, ethers, providers } from 'ethers'; -import { Eth } from 'web3-eth'; -import { hexToU8a } from '@polkadot/util'; -import { ApiPromise } from '@polkadot/api'; -import { VAnchor } from '@webb-tools/anchors'; -import { retryPromise } from '@webb-tools/browser-utils'; -import { VAnchor__factory } from '@webb-tools/contracts'; -import { - fetchVAnchorKeyFromAws, - fetchVAnchorWasmFromAws, -} from '@webb-tools/fixtures-deployments'; import { ZkComponents } from '@webb-tools/utils'; +import type { Backend } from '@webb-tools/wasm-utils'; +import { Signer, ethers, providers } from 'ethers'; import { BehaviorSubject } from 'rxjs'; +import { Eth } from 'web3-eth'; import { Web3Accounts, Web3Provider } from './ext-provider'; import { calculateProvingLeavesAndCommitmentIndex } from './utils'; @@ -63,10 +64,6 @@ import { Web3RelayerManager } from './webb-provider/relayer-manager'; import { Web3VAnchorActions } from './webb-provider/vanchor-actions'; import { Web3WrapUnwrap } from './webb-provider/wrap-unwrap'; -type GetVariableAnchorLeavesOptions = { - abortSignal?: AbortSignal; -}; - export class WebbWeb3Provider extends EventBus> implements WebbApiProvider @@ -82,6 +79,9 @@ export class WebbWeb3Provider // Map to store the max edges for each vanchor address private readonly vAnchorMaxEdges = new Map(); + // Map to store the vAnchor levels for each tree id + private readonly vAnchorLevels = new Map(); + private smallFixtures: ZkComponents | null = null; private largeFixtures: ZkComponents | null = null; @@ -90,7 +90,7 @@ export class WebbWeb3Provider readonly typedChainidSubject: BehaviorSubject; - readonly backend = 'Circom'; + readonly backend: Backend = 'Circom'; readonly methods: WebbMethods; @@ -638,6 +638,32 @@ export class WebbWeb3Provider return maxEdges; } + async getVAnchorLevels( + vAnchorAddressOrTreeId: string, + providerOrApi?: ethers.providers.Provider | ApiPromise | undefined + ): Promise { + if (providerOrApi instanceof ApiPromise) { + console.error( + '`provider` of the type `ApiPromise` is not supported in web3 provider overriding to `this.ethersProvider`' + ); + providerOrApi = this.ethersProvider; + } + + const storedLevels = this.vAnchorLevels.get(vAnchorAddressOrTreeId); + if (storedLevels) { + return Promise.resolve(storedLevels); + } + + const vAnchorContract = VAnchor__factory.connect( + vAnchorAddressOrTreeId, + providerOrApi ?? this.ethersProvider + ); + const levels = await retryPromise(vAnchorContract.getLevels); + + this.vAnchorLevels.set(vAnchorAddressOrTreeId, levels); + return levels; + } + generateUtxo(input: UtxoGenInput): Promise { return CircomUtxo.generateUtxo(input); } diff --git a/libs/web3-api-provider/tsconfig.lib.json b/libs/web3-api-provider/tsconfig.lib.json index 388948c8fc..b134bcba73 100644 --- a/libs/web3-api-provider/tsconfig.lib.json +++ b/libs/web3-api-provider/tsconfig.lib.json @@ -6,6 +6,6 @@ "strict": true, "types": ["node"] }, - "include": ["**/*.ts", "**/*.tsx"], + "include": ["**/*.ts", "**/*.tsx", "../../types/**/*.d.ts"], "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"] } diff --git a/package.json b/package.json index 56552ecfdc..1cfc697d91 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "lint": "nx run-many --all --target=lint", "gql:codegen": "graphql-codegen --config apps/stats-dapp/codegen.yml", "fetch:onChainConfig": "TS_NODE_PROJECT=\"tools/tsconfig.json\" ts-node-esm tools/scripts/fetchingOnChainConfig.ts", - "build:bridge": "yarn fetch:onChainConfig && yarn nx build bridge-dapp", + "build:bridge": "yarn nx build bridge-dapp", "build:stats": "yarn gql:codegen && yarn nx build stats-dapp", "build:webbsite": "nx build webbsite", "build:tangle-website": "nx build tangle-website", @@ -21,7 +21,7 @@ "build:storybook": "nx build-storybook webb-ui-components", "build:faucet": "nx build faucet", "export:faucet": "nx export faucet", - "start:bridge": "yarn fetch:onChainConfig && yarn nx serve bridge-dapp", + "start:bridge": "yarn nx serve bridge-dapp", "start:stats": "yarn gql:codegen && yarn nx serve stats-dapp", "start:webbsite": "nx serve webbsite", "start:tangle-website": "nx serve tangle-website", @@ -239,6 +239,7 @@ "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-sort-keys-fix": "^1.1.2", "eslint-plugin-storybook": "^0.6.12", + "execa": "5.1.1", "framer-motion": "^10.12.11", "html-loader": "^4.2.0", "html-webpack-plugin": "^5.5.0", @@ -257,6 +258,7 @@ "postcss-import": "^15.0.0", "postcss-loader": "^7.0.0", "postcss-nested": "^6.0.0", + "postcss-preset-env": "^8.4.1", "prettier": "^2.8.8", "process": "^0.11.10", "react-refresh": "0.14.0", diff --git a/tools/scripts/fetchingOnChainConfig.ts b/tools/scripts/fetchingOnChainConfig.ts index 81195be72c..f69b16c144 100644 --- a/tools/scripts/fetchingOnChainConfig.ts +++ b/tools/scripts/fetchingOnChainConfig.ts @@ -5,8 +5,8 @@ import { parsedAnchorConfig, } from '@webb-tools/dapp-config/src/anchors/anchor-config'; import { chainsConfig } from '@webb-tools/dapp-config/src/chains/chain-config'; -import { AnchorMetadata } from '@webb-tools/dapp-config/src/types'; -import { substrateProviderFactory } from '@webb-tools/polkadot-api-provider/src/utils'; +import { AnchorMetadata, ConfigType } from '@webb-tools/dapp-config/src/types'; +import substrateProviderFactory from '@webb-tools/polkadot-api-provider/src/utils/substrateProviderFactory'; import { ChainType, parseTypedChainId, @@ -16,10 +16,10 @@ import fs from 'fs'; import { Listr, color } from 'listr2'; import { workspaceRoot } from 'nx/src/utils/workspace-root'; import path from 'path'; +import { ON_CHAIN_CONFIG_PATH } from './constants'; import fetchAnchorMetadata from './utils/on-chain-utils/fetchAnchorMetadata'; import fetchNativeCurrency from './utils/on-chain-utils/fetchNative'; - -import { ON_CHAIN_CONFIG_PATH } from './constants'; +import mergeConfig from './utils/on-chain-utils/mergeConfig'; const configPath = path.join(workspaceRoot, ON_CHAIN_CONFIG_PATH); @@ -152,7 +152,7 @@ async function writeFileTask( nativeRecord: Record, metadataRecord: Record ): Promise { - const writableConfig = typedChainIds.reduce((acc, typedChainId) => { + const fetchedCfg = typedChainIds.reduce((acc, typedChainId) => { const native = nativeRecord[typedChainId]; const anchorMetadatas = metadataRecord[typedChainId]; @@ -166,7 +166,9 @@ async function writeFileTask( }; return acc; - }, {} as Record); + }, {} as ConfigType); + + const writableConfig = mergeConfig(configPath, fetchedCfg); // Ensure directories are created const dir = path.dirname(configPath); @@ -309,7 +311,15 @@ const tasks = new Listr( } ); -tasks.run().catch((error) => { - console.log(color.red(color.bold(`Error while running tasks: ${error}`))); - process.exit(1); -}); +tasks + .run() + .then(() => { + console.log(color.green(color.bold('✅ Done!'))); + process.exit(0); + }) + .catch((error) => { + console.log( + color.red(color.bold(`❌ Error while running tasks: ${error}`)) + ); + process.exit(1); + }); diff --git a/tools/scripts/utils/on-chain-utils/fetchAnchorMetadata.ts b/tools/scripts/utils/on-chain-utils/fetchAnchorMetadata.ts index 007ef1553f..0dc7edf6dd 100644 --- a/tools/scripts/utils/on-chain-utils/fetchAnchorMetadata.ts +++ b/tools/scripts/utils/on-chain-utils/fetchAnchorMetadata.ts @@ -294,10 +294,10 @@ async function fetchAnchorMetadata( typedChainId, provider ); + } else { + metadata = await fetchEVMAnchorMetadata(anchorAddress, typedChainId); } - metadata = await fetchEVMAnchorMetadata(anchorAddress, typedChainId); - return metadata; } diff --git a/tools/scripts/utils/on-chain-utils/getViemClient.ts b/tools/scripts/utils/on-chain-utils/getViemClient.ts index cd2afbd84a..cbf30f91ea 100644 --- a/tools/scripts/utils/on-chain-utils/getViemClient.ts +++ b/tools/scripts/utils/on-chain-utils/getViemClient.ts @@ -44,6 +44,7 @@ function defineViemChain(typedChainId: number) { id: chain.chainId, name: chain.name, network: chain.base, + testnet: true, nativeCurrency: { decimals: 18, name: 'ETH', @@ -53,6 +54,14 @@ function defineViemChain(typedChainId: number) { public: { http: chain.evmRpcUrls }, default: { http: chain.evmRpcUrls }, }, + blockExplorers: chain.blockExplorerStub + ? { + default: { + name: chain.name, + url: chain.blockExplorerStub, + }, + } + : undefined, contracts: { multicall3: chain.multicall3 ? { @@ -77,7 +86,7 @@ function getViemClient(typedChainId: number) { batch: { multicall: true, }, - transport: http(), + transport: http(undefined, { timeout: 60_000 }), }); } diff --git a/tools/scripts/utils/on-chain-utils/mergeConfig.ts b/tools/scripts/utils/on-chain-utils/mergeConfig.ts new file mode 100644 index 0000000000..670e32bad6 --- /dev/null +++ b/tools/scripts/utils/on-chain-utils/mergeConfig.ts @@ -0,0 +1,16 @@ +import { ConfigType } from '@webb-tools/dapp-config/types'; +import merge from 'lodash/merge'; +import { existsSync, readFileSync } from 'fs'; + +function mergeConfig(cfgPath: string, fetchedCfg: ConfigType): ConfigType { + if (!existsSync(cfgPath)) { + return fetchedCfg; + } + + const content = readFileSync(cfgPath, { encoding: 'utf-8' }); + const localCfg = JSON.parse(content) as ConfigType; + + return merge(localCfg, fetchedCfg); +} + +export default mergeConfig; diff --git a/tsconfig.base.json b/tsconfig.base.json index 1d0930047d..1e7ef82cea 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -2,7 +2,7 @@ "compileOnSave": false, "compilerOptions": { "rootDir": ".", - "typeRoots": ["node_modules/@types"], + "typeRoots": ["types/global.d.ts", "node_modules/@types"], "sourceMap": true, "declaration": false, "moduleResolution": "node", diff --git a/libs/abstract-api-provider/src/types.ts b/types/global.d.ts similarity index 100% rename from libs/abstract-api-provider/src/types.ts rename to types/global.d.ts diff --git a/yarn.lock b/yarn.lock index 5f18dcc219..835e1d953e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1592,6 +1592,236 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" +"@csstools/cascade-layer-name-parser@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@csstools/cascade-layer-name-parser/-/cascade-layer-name-parser-1.0.2.tgz#35253f57c6c83d684fe396672486c644e6a84127" + integrity sha512-xm7Mgwej/wBfLoK0K5LfntmPJzoULayl1XZY9JYgQgT29JiqNw++sLnx95u5y9zCihblzkyaRYJrsRMhIBzRdg== + +"@csstools/color-helpers@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@csstools/color-helpers/-/color-helpers-2.1.0.tgz#b27d8376e9e8a947878f10967481c22bf046976a" + integrity sha512-OWkqBa7PDzZuJ3Ha7T5bxdSVfSCfTq6K1mbAhbO1MD+GSULGjrp45i5RudyJOedstSarN/3mdwu9upJE7gDXfw== + +"@csstools/css-calc@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@csstools/css-calc/-/css-calc-1.1.1.tgz#c622728b7f0c9aae70952623c2b0d3d114752987" + integrity sha512-Nh+iLCtjlooTzuR0lpmB8I6hPX/VupcGQ3Z1U2+wgJJ4fa8+cWkub+lCsbZcYPzBGsZLEL8fQAg+Na5dwEFJxg== + +"@csstools/css-color-parser@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@csstools/css-color-parser/-/css-color-parser-1.2.0.tgz#30243b2fe912e1da0787e7d093d25a9ed40a73b5" + integrity sha512-kt9jhqyL/Ig/Tsf1cY+iygxs2nu3/D532048G9BSeg9YjlpZxbor6I+nvgMNB1A1ppL+i15Mb/yyDHYMQmgBtQ== + dependencies: + "@csstools/color-helpers" "^2.1.0" + "@csstools/css-calc" "^1.1.1" + +"@csstools/css-parser-algorithms@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.1.1.tgz#7b62e6412a468a2d1096ed267edd1e4a7fd4a119" + integrity sha512-viRnRh02AgO4mwIQb2xQNJju0i+Fh9roNgmbR5xEuG7J3TGgxjnE95HnBLgsFJOJOksvcfxOUCgODcft6Y07cA== + +"@csstools/css-tokenizer@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-2.1.1.tgz#07ae11a0a06365d7ec686549db7b729bc036528e" + integrity sha512-GbrTj2Z8MCTUv+52GE0RbFGM527xuXZ0Xa5g0Z+YN573uveS4G0qi6WNOMyz3yrFM/jaILTTwJ0+umx81EzqfA== + +"@csstools/media-query-list-parser@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.0.4.tgz#466bd254041530dfd1e88bcb1921e8ca4af75b6a" + integrity sha512-GyYot6jHgcSDZZ+tLSnrzkR7aJhF2ZW6d+CXH66mjy5WpAQhZD4HDke2OQ36SivGRWlZJpAz7TzbW6OKlEpxAA== + +"@csstools/postcss-cascade-layers@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@csstools/postcss-cascade-layers/-/postcss-cascade-layers-3.0.1.tgz#d839386e90428b448e3f75276bc01d516e852a0d" + integrity sha512-dD8W98dOYNOH/yX4V4HXOhfCOnvVAg8TtsL+qCGNoKXuq5z2C/d026wGWgySgC8cajXXo/wNezS31Glj5GcqrA== + dependencies: + "@csstools/selector-specificity" "^2.0.2" + postcss-selector-parser "^6.0.10" + +"@csstools/postcss-color-function@^2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@csstools/postcss-color-function/-/postcss-color-function-2.2.2.tgz#10bd96096b01ba58336c7eda90673f27a8b2df0c" + integrity sha512-HpBtNAS8m07Umr1kYYOIKTSg2uBMjWMc7zeXchhodsZtopICa5pTyCIuuT0z9oy07j/M4+Uj0M01OLvmN0AHqA== + dependencies: + "@csstools/css-color-parser" "^1.2.0" + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + "@csstools/postcss-progressive-custom-properties" "^2.2.0" + +"@csstools/postcss-color-mix-function@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@csstools/postcss-color-mix-function/-/postcss-color-mix-function-1.0.2.tgz#02e366b84cf84f4522b4d27053959614fbab0e22" + integrity sha512-SZRZ1osJo5CR89xojPEkORnH6RS0FK1aktMujo52TCc74oJCIf6udX1e22qTeV8YG78lRNx8NpM3WzI4dL94tQ== + dependencies: + "@csstools/css-color-parser" "^1.2.0" + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + "@csstools/postcss-progressive-custom-properties" "^2.2.0" + +"@csstools/postcss-font-format-keywords@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@csstools/postcss-font-format-keywords/-/postcss-font-format-keywords-2.0.2.tgz#d798d96f4af6cddcfee459f598c976e6011042d2" + integrity sha512-iKYZlIs6JsNT7NKyRjyIyezTCHLh4L4BBB3F5Nx7Dc4Z/QmBgX+YJFuUSar8IM6KclGiAUFGomXFdYxAwJydlA== + dependencies: + postcss-value-parser "^4.2.0" + +"@csstools/postcss-gradients-interpolation-method@^3.0.5": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@csstools/postcss-gradients-interpolation-method/-/postcss-gradients-interpolation-method-3.0.5.tgz#7a066b10d42ef6048382ef38dc0a4c845fa9721f" + integrity sha512-x1tKUChKajjlZ+pOvapvHTXfRasXLBaChzwcKzI+wGsUmWIfIZhWVdksI/9Yeef0RhI9RFsEgr1fI3gWNcxHyg== + dependencies: + "@csstools/css-color-parser" "^1.2.0" + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + "@csstools/postcss-progressive-custom-properties" "^2.2.0" + +"@csstools/postcss-hwb-function@^2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@csstools/postcss-hwb-function/-/postcss-hwb-function-2.2.2.tgz#c36a450bc98038df00bbbebcef20f04aac6e0b08" + integrity sha512-W5Y5oaJ382HSlbdGfPf60d7dAK6Hqf10+Be1yZbd/TNNrQ/3dDdV1c07YwOXPQ3PZ6dvFMhxbIbn8EC3ki3nEg== + dependencies: + "@csstools/css-color-parser" "^1.2.0" + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + +"@csstools/postcss-ic-unit@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@csstools/postcss-ic-unit/-/postcss-ic-unit-2.0.3.tgz#21b3adea10aedd51181285f3e1225598d602e1e2" + integrity sha512-azDezOeI7IhLGqRauyfi/JuJOfNHM951h0TZWnL9L38xTmlBK+s7y4MpWXTq/Ohz8IuiIuVPobXTewsqXaTeiQ== + dependencies: + "@csstools/postcss-progressive-custom-properties" "^2.2.0" + postcss-value-parser "^4.2.0" + +"@csstools/postcss-is-pseudo-class@^3.2.1": + version "3.2.1" + resolved "https://registry.yarnpkg.com/@csstools/postcss-is-pseudo-class/-/postcss-is-pseudo-class-3.2.1.tgz#610f451b9293307d83d484c84af332a05e48b661" + integrity sha512-AtANdV34kJl04Al62is3eQRk/BfOfyAvEmRJvbt+nx5REqImLC+2XhuE6skgkcPli1l8ONS67wS+l1sBzySc3Q== + dependencies: + "@csstools/selector-specificity" "^2.0.0" + postcss-selector-parser "^6.0.10" + +"@csstools/postcss-logical-float-and-clear@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@csstools/postcss-logical-float-and-clear/-/postcss-logical-float-and-clear-1.0.1.tgz#d255ea7aad18880930b63d8a04164f56182f2ecf" + integrity sha512-eO9z2sMLddvlfFEW5Fxbjyd03zaO7cJafDurK4rCqyRt9P7aaWwha0LcSzoROlcZrw1NBV2JAp2vMKfPMQO1xw== + +"@csstools/postcss-logical-resize@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@csstools/postcss-logical-resize/-/postcss-logical-resize-1.0.1.tgz#826d3de929d7d786c32c2c118f78e813a1c2cdec" + integrity sha512-x1ge74eCSvpBkDDWppl+7FuD2dL68WP+wwP2qvdUcKY17vJksz+XoE1ZRV38uJgS6FNUwC0AxrPW5gy3MxsDHQ== + dependencies: + postcss-value-parser "^4.2.0" + +"@csstools/postcss-logical-viewport-units@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@csstools/postcss-logical-viewport-units/-/postcss-logical-viewport-units-1.0.3.tgz#63e212954015ecdc493878601c3daa4da6ba6714" + integrity sha512-6zqcyRg9HSqIHIPMYdt6THWhRmE5/tyHKJQLysn2TeDf/ftq7Em9qwMTx98t2C/7UxIsYS8lOiHHxAVjWn2WUg== + dependencies: + "@csstools/css-tokenizer" "^2.1.1" + +"@csstools/postcss-media-minmax@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@csstools/postcss-media-minmax/-/postcss-media-minmax-1.0.2.tgz#77efc4fdd96c7ff97f0d714c940187d25fd87619" + integrity sha512-DsEykSINZTqlBefi1uSQBym1Rj0NQOj92dLRd5jUQpSy8yBVaXXmkiUgBUbb+gQh8imAdqPpz2v4sAUnw8yXXA== + dependencies: + "@csstools/css-calc" "^1.1.1" + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + "@csstools/media-query-list-parser" "^2.0.4" + +"@csstools/postcss-media-queries-aspect-ratio-number-values@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@csstools/postcss-media-queries-aspect-ratio-number-values/-/postcss-media-queries-aspect-ratio-number-values-1.0.2.tgz#23ca3c3decc79d9089c2028ded20a97a2c784eee" + integrity sha512-rOSR5p+5m0joXUoitYgCyMqNCu97yfLsLG3cnNaM8VeJRCWHGEu5hE9Gv0M7n9A4wo2pYF8QqaxkTlWbSJY9Fg== + dependencies: + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + "@csstools/media-query-list-parser" "^2.0.4" + +"@csstools/postcss-nested-calc@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@csstools/postcss-nested-calc/-/postcss-nested-calc-2.0.2.tgz#a0857650ef88b1aa7b094c7ea8ea1378c35695e0" + integrity sha512-jbwrP8rN4e7LNaRcpx3xpMUjhtt34I9OV+zgbcsYAAk6k1+3kODXJBf95/JMYWhu9g1oif7r06QVUgfWsKxCFw== + dependencies: + postcss-value-parser "^4.2.0" + +"@csstools/postcss-normalize-display-values@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@csstools/postcss-normalize-display-values/-/postcss-normalize-display-values-2.0.1.tgz#35dc188c5b4713cf902959fe3c8ce613fcb7543e" + integrity sha512-TQT5g3JQ5gPXC239YuRK8jFceXF9d25ZvBkyjzBGGoW5st5sPXFVQS8OjYb9IJ/K3CdfK4528y483cgS2DJR/w== + dependencies: + postcss-value-parser "^4.2.0" + +"@csstools/postcss-oklab-function@^2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@csstools/postcss-oklab-function/-/postcss-oklab-function-2.2.2.tgz#a002b05980050f9307b3482cff6925081591a2cf" + integrity sha512-25Y9GYia9QamEOHx3B8hyHftDo/lzVhmPPm96ziOzOri9MDZvphPYPyx8NxQXh0P1P0j92eJcOjw4AO6HcXWYw== + dependencies: + "@csstools/css-color-parser" "^1.2.0" + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + "@csstools/postcss-progressive-custom-properties" "^2.2.0" + +"@csstools/postcss-progressive-custom-properties@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@csstools/postcss-progressive-custom-properties/-/postcss-progressive-custom-properties-2.2.0.tgz#69e9b28282d5f72dbbc82b5ccdf69b20e30c99fe" + integrity sha512-qtJ2Jgf5bQW65OK7JaR0dw+XL3tc3BN99g+I5cRdik++HpyZitrKKxIwDGb3OHp2Yo3PZKuiX8pXljqmLHT/eg== + dependencies: + postcss-value-parser "^4.2.0" + +"@csstools/postcss-relative-color-syntax@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@csstools/postcss-relative-color-syntax/-/postcss-relative-color-syntax-1.0.0.tgz#104c1f7c549781334d408bdba93baf4f7288bc1b" + integrity sha512-/Q2xOHjOeq8p8j/+yilJlroWzqbBca3+tux2ikkArsAsQS9sHWbFtPz602EpNnoGSnVg7o/QSf3xxaekyzv/8A== + dependencies: + "@csstools/css-color-parser" "^1.2.0" + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + "@csstools/postcss-progressive-custom-properties" "^2.2.0" + +"@csstools/postcss-scope-pseudo-class@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@csstools/postcss-scope-pseudo-class/-/postcss-scope-pseudo-class-2.0.2.tgz#6325e1e3b321093c59b008ec670bb772e17f06fe" + integrity sha512-6Pvo4uexUCXt+Hz5iUtemQAcIuCYnL+ePs1khFR6/xPgC92aQLJ0zGHonWoewiBE+I++4gXK3pr+R1rlOFHe5w== + dependencies: + postcss-selector-parser "^6.0.10" + +"@csstools/postcss-stepped-value-functions@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@csstools/postcss-stepped-value-functions/-/postcss-stepped-value-functions-2.1.1.tgz#f31aa0e7bd0ce3e4a0450573e1e27ce5e602b100" + integrity sha512-YCvdF0GCZK35nhLgs7ippcxDlRVe5QsSht3+EghqTjnYnyl3BbWIN6fYQ1dKWYTJ+7Bgi41TgqQFfJDcp9Xy/w== + dependencies: + "@csstools/css-calc" "^1.1.1" + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + +"@csstools/postcss-text-decoration-shorthand@^2.2.4": + version "2.2.4" + resolved "https://registry.yarnpkg.com/@csstools/postcss-text-decoration-shorthand/-/postcss-text-decoration-shorthand-2.2.4.tgz#184af1d68f4d97c381fad2ca58ae7f3f2a5dd7c3" + integrity sha512-zPN56sQkS/7YTCVZhOBVCWf7AiNge8fXDl7JVaHLz2RyT4pnyK2gFjckWRLpO0A2xkm1lCgZ0bepYZTwAVd/5A== + dependencies: + "@csstools/color-helpers" "^2.1.0" + postcss-value-parser "^4.2.0" + +"@csstools/postcss-trigonometric-functions@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@csstools/postcss-trigonometric-functions/-/postcss-trigonometric-functions-2.1.1.tgz#871a2048b0f81495d6cd8858ffb1fb04231ca741" + integrity sha512-XcXmHEFfHXhvYz40FtDlA4Fp4NQln2bWTsCwthd2c+MCnYArUYU3YaMqzR5CrKP3pMoGYTBnp5fMqf1HxItNyw== + dependencies: + "@csstools/css-calc" "^1.1.1" + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + +"@csstools/postcss-unset-value@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@csstools/postcss-unset-value/-/postcss-unset-value-2.0.1.tgz#67091dd6cff556bff896c95053eb070cc6b21c25" + integrity sha512-oJ9Xl29/yU8U7/pnMJRqAZd4YXNCfGEdcP4ywREuqm/xMqcgDNDppYRoCGDt40aaZQIEKBS79LytUDN/DHf0Ew== + +"@csstools/selector-specificity@^2.0.0", "@csstools/selector-specificity@^2.0.1", "@csstools/selector-specificity@^2.0.2": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz#2cbcf822bf3764c9658c4d2e568bd0c0cb748016" + integrity sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw== + "@cypress/request@^2.88.10": version "2.88.11" resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.11.tgz#5a4c7399bc2d7e7ed56e92ce5acb620c8b187047" @@ -9283,7 +9513,7 @@ auto-bind@~4.0.0: resolved "https://registry.yarnpkg.com/auto-bind/-/auto-bind-4.0.0.tgz#e3589fc6c2da8f7ca43ba9f84fa52a744fc997fb" integrity sha512-Hdw8qdNiqdJ8LqT0iK0sVzkFbzg6fhnQqqfWhBDxcHZvU75+B+ayzTy8x+k5Ix0Y92XOhOUlx74ps+bA6BeYMQ== -autoprefixer@10.4.14, autoprefixer@^10.4.9: +autoprefixer@10.4.14, autoprefixer@^10.4.14, autoprefixer@^10.4.9: version "10.4.14" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.14.tgz#e28d49902f8e759dd25b153264e862df2705f79d" integrity sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ== @@ -11192,6 +11422,13 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== +css-blank-pseudo@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/css-blank-pseudo/-/css-blank-pseudo-5.0.2.tgz#3df5cd950f64de960974da05e76954fd3d7442f9" + integrity sha512-aCU4AZ7uEcVSUzagTlA9pHciz7aWPKA/YzrEkpdSopJ2pvhIxiQ5sYeMz1/KByxlIo4XBdvMNJAVKMg/GRnhfw== + dependencies: + postcss-selector-parser "^6.0.10" + css-color-keywords@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" @@ -11202,6 +11439,15 @@ css-declaration-sorter@^6.3.1: resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.4.0.tgz#630618adc21724484b3e9505bce812def44000ad" integrity sha512-jDfsatwWMWN0MODAFuHszfjphEXfNw9JUAhmY4pLu3TyTU+ohUpsbVtbU+1MZn4a47D9kqh03i4eyOm+74+zew== +css-has-pseudo@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/css-has-pseudo/-/css-has-pseudo-5.0.2.tgz#8798118c705d858b7aeb9d839a39edd901c1cc83" + integrity sha512-q+U+4QdwwB7T9VEW/LyO6CFrLAeLqOykC5mDqJXc7aKZAhDbq7BvGT13VGJe+IwBfdN2o3Xdw2kJ5IxwV1Sc9Q== + dependencies: + "@csstools/selector-specificity" "^2.0.1" + postcss-selector-parser "^6.0.10" + postcss-value-parser "^4.2.0" + css-in-js-utils@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/css-in-js-utils/-/css-in-js-utils-3.1.0.tgz#640ae6a33646d401fc720c54fc61c42cd76ae2bb" @@ -11280,6 +11526,11 @@ css-minimizer-webpack-plugin@^5.0.0: serialize-javascript "^6.0.1" source-map "^0.6.1" +css-prefers-color-scheme@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/css-prefers-color-scheme/-/css-prefers-color-scheme-8.0.2.tgz#a0671f54eb19ed0d30b952574c0af11ec355fb6d" + integrity sha512-OvFghizHJ45x7nsJJUSYLyQNTzsCU8yWjxAc/nhPQg1pbs18LMoET8N3kOweFDPy0JV0OSXN2iqRFhPBHYOeMA== + css-select@^4.1.3: version "4.3.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" @@ -11354,6 +11605,11 @@ css@^3.0.0: source-map "^0.6.1" source-map-resolve "^0.6.0" +cssdb@^7.6.0: + version "7.6.0" + resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-7.6.0.tgz#beac8f7a5f676db62d3c33da517ef4c9eb008f8b" + integrity sha512-Nna7rph8V0jC6+JBY4Vk4ndErUmfJfV6NJCaZdurL0omggabiy+QB2HCQtu5c/ACLZ0I7REv7A4QyPIoYzZx0w== + cssesc@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" @@ -13628,7 +13884,7 @@ execa@4.1.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" -execa@^5.0.0, execa@^5.1.1: +execa@5.1.1, execa@^5.0.0, execa@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== @@ -19923,6 +20179,13 @@ portfinder@^1.0.28: debug "^3.2.7" mkdirp "^0.5.6" +postcss-attribute-case-insensitive@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-6.0.2.tgz#e843091859323342e461878d201ee70278809e01" + integrity sha512-IRuCwwAAQbgaLhxQdQcIIK0dCVXg3XDUnzgKD8iwdiYdwU4rMWRWyl/W9/0nA4ihVpq5pyALiHB2veBJ0292pw== + dependencies: + postcss-selector-parser "^6.0.10" + postcss-calc@^8.2.3: version "8.2.4" resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-8.2.4.tgz#77b9c29bfcbe8a07ff6693dc87050828889739a5" @@ -19939,6 +20202,34 @@ postcss-calc@^9.0.0: postcss-selector-parser "^6.0.11" postcss-value-parser "^4.2.0" +postcss-clamp@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/postcss-clamp/-/postcss-clamp-4.1.0.tgz#7263e95abadd8c2ba1bd911b0b5a5c9c93e02363" + integrity sha512-ry4b1Llo/9zz+PKC+030KUnPITTJAHeOwjfAyyB60eT0AorGLdzp52s31OsPRHRf8NchkgFoG2y6fCfn1IV1Ow== + dependencies: + postcss-value-parser "^4.2.0" + +postcss-color-functional-notation@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/postcss-color-functional-notation/-/postcss-color-functional-notation-5.0.2.tgz#6d03c928aa3a13487703af86c301bdcd501e7430" + integrity sha512-M6ygxWOyd6eWf3sd1Lv8xi4SeF4iBPfJvkfMU4ITh8ExJc1qhbvh/U8Cv/uOvBgUVOMDdScvCdlg8+hREQzs7w== + dependencies: + postcss-value-parser "^4.2.0" + +postcss-color-hex-alpha@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/postcss-color-hex-alpha/-/postcss-color-hex-alpha-9.0.2.tgz#6d3ed50342802469880981a1999515d003ff7d79" + integrity sha512-SfPjgr//VQ/DOCf80STIAsdAs7sbIbxATvVmd+Ec7JvR8onz9pjawhq3BJM3Pie40EE3TyB0P6hft16D33Nlyg== + dependencies: + postcss-value-parser "^4.2.0" + +postcss-color-rebeccapurple@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-8.0.2.tgz#c0f2dcf1ef4dd393314920aa181cca8c390a2648" + integrity sha512-xWf/JmAxVoB5bltHpXk+uGRoGFwu4WDAR7210el+iyvTdqiKpDhtcT8N3edXMoVJY0WHFMrKMUieql/wRNiXkw== + dependencies: + postcss-value-parser "^4.2.0" + postcss-colormin@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-5.3.1.tgz#86c27c26ed6ba00d96c79e08f3ffb418d1d1988f" @@ -19975,6 +20266,43 @@ postcss-convert-values@^6.0.0: browserslist "^4.21.4" postcss-value-parser "^4.2.0" +postcss-custom-media@^9.1.3: + version "9.1.3" + resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-9.1.3.tgz#68bb2ae377bb07c19f03f252930cc380af894dce" + integrity sha512-W1C4Fu6KAZ7sKYQCuGMr8gyaE4BtjTQGPLVS4m0WCaWM6l7PgVbvmDeb4ClBc5R/7kdwESYf0hdxGtEPhi9CLA== + dependencies: + "@csstools/cascade-layer-name-parser" "^1.0.2" + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + "@csstools/media-query-list-parser" "^2.0.4" + +postcss-custom-properties@^13.1.5: + version "13.1.5" + resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-13.1.5.tgz#75567e3b4a664f820bcc3ba8b6ae3c8d27db05d1" + integrity sha512-98DXk81zTGqMVkGANysMHbGIg3voH383DYo3/+c+Abzay3nao+vM/f4Jgzsakk9S7BDsEw5DiW7sFy5G4W2wLA== + dependencies: + "@csstools/cascade-layer-name-parser" "^1.0.2" + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + postcss-value-parser "^4.2.0" + +postcss-custom-selectors@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/postcss-custom-selectors/-/postcss-custom-selectors-7.1.3.tgz#047e2bc4726fe8e448c23047c99785fcdbe1ef87" + integrity sha512-GTVscax6O/8s7agFF0HsOoIyjrnAbLjgCUle8tn+0oDGJuVx7p56U7ClSRoC49poxFuMfu2B4Q8GnxSCOeuFKw== + dependencies: + "@csstools/cascade-layer-name-parser" "^1.0.2" + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + postcss-selector-parser "^6.0.4" + +postcss-dir-pseudo-class@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/postcss-dir-pseudo-class/-/postcss-dir-pseudo-class-7.0.2.tgz#71618b7eb4abe067845d11b3c8f322760c9b3e88" + integrity sha512-cMnslilYxBf9k3qejnovrUONZx1rXeUZJw06fgIUBzABJe3D2LiLL5WAER7Imt3nrkaIgG05XZBztueLEf5P8w== + dependencies: + postcss-selector-parser "^6.0.10" + postcss-discard-comments@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz#8df5e81d2925af2780075840c1526f0660e53696" @@ -20015,6 +20343,45 @@ postcss-discard-overridden@^6.0.0: resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-6.0.0.tgz#49c5262db14e975e349692d9024442de7cd8e234" integrity sha512-4VELwssYXDFigPYAZ8vL4yX4mUepF/oCBeeIT4OXsJPYOtvJumyz9WflmJWTfDwCUcpDR+z0zvCWBXgTx35SVw== +postcss-double-position-gradients@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/postcss-double-position-gradients/-/postcss-double-position-gradients-4.0.3.tgz#9f6e0e17a5b98c3aae1174b8256fc2e2d0220dbf" + integrity sha512-Td1+C+kFCadnhRBMMf6D/eiQxjp33eAgwgMcLNYzZPcgXt1iU6vi/qEJ/YObp4nwn3QOtudFBMUOVHoGqmpfiA== + dependencies: + "@csstools/postcss-progressive-custom-properties" "^2.2.0" + postcss-value-parser "^4.2.0" + +postcss-focus-visible@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/postcss-focus-visible/-/postcss-focus-visible-8.0.2.tgz#a7ac26ffe3e9c2bd17d7200d75e2d79ee8110891" + integrity sha512-f/Vd+EC/GaKElknU59esVcRYr/Y3t1ZAQyL4u2xSOgkDy4bMCmG7VP5cGvj3+BTLNE9ETfEuz2nnt4qkZwTTeA== + dependencies: + postcss-selector-parser "^6.0.10" + +postcss-focus-within@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/postcss-focus-within/-/postcss-focus-within-7.0.2.tgz#5d2c866030e66ed22b204c9506de640943310b1c" + integrity sha512-AHAJ89UQBcqBvFgQJE9XasGuwMNkKsGj4D/f9Uk60jFmEBHpAL14DrnSk3Rj+SwZTr/WUG+mh+Rvf8fid/346w== + dependencies: + postcss-selector-parser "^6.0.10" + +postcss-font-variant@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-font-variant/-/postcss-font-variant-5.0.0.tgz#efd59b4b7ea8bb06127f2d031bfbb7f24d32fa66" + integrity sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA== + +postcss-gap-properties@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-gap-properties/-/postcss-gap-properties-4.0.1.tgz#0347d6a84a46bfbe88bedc542cc4b354e04a8338" + integrity sha512-V5OuQGw4lBumPlwHWk/PRfMKjaq/LTGR4WDTemIMCaMevArVfCCA9wBJiL1VjDAd+rzuCIlkRoRvDsSiAaZ4Fg== + +postcss-image-set-function@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/postcss-image-set-function/-/postcss-image-set-function-5.0.2.tgz#088e0f535f43e74d6ea8033ff7b0482e2735ea6e" + integrity sha512-Sszjwo0ubETX0Fi5MvpYzsONwrsjeabjMoc5YqHvURFItXgIu3HdCjcVuVKGMPGzKRhgaknmdM5uVWInWPJmeg== + dependencies: + postcss-value-parser "^4.2.0" + postcss-import@^15.0.0, postcss-import@^15.1.0: version "15.1.0" resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-15.1.0.tgz#41c64ed8cc0e23735a9698b3249ffdbf704adc70" @@ -20033,6 +20400,11 @@ postcss-import@~14.1.0: read-cache "^1.0.0" resolve "^1.1.7" +postcss-initial@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-initial/-/postcss-initial-4.0.1.tgz#529f735f72c5724a0fb30527df6fb7ac54d7de42" + integrity sha512-0ueD7rPqX8Pn1xJIjay0AZeIuDoF+V+VvMt/uOnn+4ezUKhZM/NokDeP6DwMNyIoYByuN/94IQnt5FEkaN59xQ== + postcss-js@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.1.tgz#61598186f3703bab052f1c4f7d805f3991bee9d2" @@ -20040,6 +20412,16 @@ postcss-js@^4.0.1: dependencies: camelcase-css "^2.0.1" +postcss-lab-function@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/postcss-lab-function/-/postcss-lab-function-5.2.2.tgz#a099c24192f07b49aeea2dc6e1f86fe1cfcbcd68" + integrity sha512-O5LrVYzOD3anfPqvSL1HiQ8PpKAav74Gst3pXgZBHSFo6t5sws3dLGTQMnw4hgn1t064SODWAjb9KcC39N820A== + dependencies: + "@csstools/css-color-parser" "^1.2.0" + "@csstools/css-parser-algorithms" "^2.1.1" + "@csstools/css-tokenizer" "^2.1.1" + "@csstools/postcss-progressive-custom-properties" "^2.2.0" + postcss-load-config@^3.0.0: version "3.1.4" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" @@ -20086,6 +20468,13 @@ postcss-loader@^7.0.0: klona "^2.0.6" semver "^7.3.8" +postcss-logical@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/postcss-logical/-/postcss-logical-6.2.0.tgz#85e49cfee3ffda839d4befcab9f70c70a7bb337a" + integrity sha512-aqlfKGaY0nnbgI9jwUikp4gJKBqcH5noU/EdnIVceghaaDPYhZuyJVxlvWNy55tlTG5tunRKCTAX9yljLiFgmw== + dependencies: + postcss-value-parser "^4.2.0" + postcss-merge-longhand@^5.1.7: version "5.1.7" resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.1.7.tgz#24a1bdf402d9ef0e70f568f39bdc0344d568fb16" @@ -20268,6 +20657,14 @@ postcss-nested@^6.0.0, postcss-nested@^6.0.1: dependencies: postcss-selector-parser "^6.0.11" +postcss-nesting@^11.2.1: + version "11.2.2" + resolved "https://registry.yarnpkg.com/postcss-nesting/-/postcss-nesting-11.2.2.tgz#ddedfea5a1fdcd8d753298d82297ad15d5640c0f" + integrity sha512-aOTiUniAB1bcPE6GGiynWRa6PZFPhOTAm5q3q5cem6QeSijIHHkWr6gs65ukCZMXeak8yXeZVbBJET3VM+HlhA== + dependencies: + "@csstools/selector-specificity" "^2.0.0" + postcss-selector-parser "^6.0.10" + postcss-normalize-charset@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz#9302de0b29094b52c259e9b2cf8dc0879879f0ed" @@ -20393,6 +20790,11 @@ postcss-normalize-whitespace@^6.0.0: dependencies: postcss-value-parser "^4.2.0" +postcss-opacity-percentage@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-opacity-percentage/-/postcss-opacity-percentage-2.0.0.tgz#c0a56060cd4586e3f954dbde1efffc2deed53002" + integrity sha512-lyDrCOtntq5Y1JZpBFzIWm2wG9kbEdujpNt4NLannF+J9c8CgFIzPa80YQfdza+Y+yFfzbYj/rfoOsYsooUWTQ== + postcss-ordered-values@^5.1.3: version "5.1.3" resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-5.1.3.tgz#b6fd2bd10f937b23d86bc829c69e7732ce76ea38" @@ -20409,6 +20811,94 @@ postcss-ordered-values@^6.0.0: cssnano-utils "^4.0.0" postcss-value-parser "^4.2.0" +postcss-overflow-shorthand@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-overflow-shorthand/-/postcss-overflow-shorthand-4.0.1.tgz#cb61ca24d8c4e1dbf14d85181b017cfa6953aa34" + integrity sha512-HQZ0qi/9iSYHW4w3ogNqVNr2J49DHJAl7r8O2p0Meip38jsdnRPgiDW7r/LlLrrMBMe3KHkvNtAV2UmRVxzLIg== + dependencies: + postcss-value-parser "^4.2.0" + +postcss-page-break@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/postcss-page-break/-/postcss-page-break-3.0.4.tgz#7fbf741c233621622b68d435babfb70dd8c1ee5f" + integrity sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ== + +postcss-place@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/postcss-place/-/postcss-place-8.0.1.tgz#408d7a27e99192df51c95fe62a3a34def62aa66a" + integrity sha512-Ow2LedN8sL4pq8ubukO77phSVt4QyCm35ZGCYXKvRFayAwcpgB0sjNJglDoTuRdUL32q/ZC1VkPBo0AOEr4Uiw== + dependencies: + postcss-value-parser "^4.2.0" + +postcss-preset-env@^8.4.1: + version "8.4.1" + resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-8.4.1.tgz#ee65281c26f5f7e3d95e081efdd493460271fd09" + integrity sha512-IlcUT8ZSuQFWXJ/F+KvqmkzT85u33rlvd36IzM6qhdnccO7Rs3uBrHY802BFjNcPRawqSCDmPv7KKyCzNxx5Fw== + dependencies: + "@csstools/postcss-cascade-layers" "^3.0.1" + "@csstools/postcss-color-function" "^2.2.2" + "@csstools/postcss-color-mix-function" "^1.0.2" + "@csstools/postcss-font-format-keywords" "^2.0.2" + "@csstools/postcss-gradients-interpolation-method" "^3.0.5" + "@csstools/postcss-hwb-function" "^2.2.2" + "@csstools/postcss-ic-unit" "^2.0.3" + "@csstools/postcss-is-pseudo-class" "^3.2.1" + "@csstools/postcss-logical-float-and-clear" "^1.0.1" + "@csstools/postcss-logical-resize" "^1.0.1" + "@csstools/postcss-logical-viewport-units" "^1.0.3" + "@csstools/postcss-media-minmax" "^1.0.2" + "@csstools/postcss-media-queries-aspect-ratio-number-values" "^1.0.2" + "@csstools/postcss-nested-calc" "^2.0.2" + "@csstools/postcss-normalize-display-values" "^2.0.1" + "@csstools/postcss-oklab-function" "^2.2.2" + "@csstools/postcss-progressive-custom-properties" "^2.2.0" + "@csstools/postcss-relative-color-syntax" "^1.0.0" + "@csstools/postcss-scope-pseudo-class" "^2.0.2" + "@csstools/postcss-stepped-value-functions" "^2.1.1" + "@csstools/postcss-text-decoration-shorthand" "^2.2.4" + "@csstools/postcss-trigonometric-functions" "^2.1.1" + "@csstools/postcss-unset-value" "^2.0.1" + autoprefixer "^10.4.14" + browserslist "^4.21.5" + css-blank-pseudo "^5.0.2" + css-has-pseudo "^5.0.2" + css-prefers-color-scheme "^8.0.2" + cssdb "^7.6.0" + postcss-attribute-case-insensitive "^6.0.2" + postcss-clamp "^4.1.0" + postcss-color-functional-notation "^5.0.2" + postcss-color-hex-alpha "^9.0.2" + postcss-color-rebeccapurple "^8.0.2" + postcss-custom-media "^9.1.3" + postcss-custom-properties "^13.1.5" + postcss-custom-selectors "^7.1.3" + postcss-dir-pseudo-class "^7.0.2" + postcss-double-position-gradients "^4.0.3" + postcss-focus-visible "^8.0.2" + postcss-focus-within "^7.0.2" + postcss-font-variant "^5.0.0" + postcss-gap-properties "^4.0.1" + postcss-image-set-function "^5.0.2" + postcss-initial "^4.0.1" + postcss-lab-function "^5.2.2" + postcss-logical "^6.2.0" + postcss-nesting "^11.2.1" + postcss-opacity-percentage "^2.0.0" + postcss-overflow-shorthand "^4.0.1" + postcss-page-break "^3.0.4" + postcss-place "^8.0.1" + postcss-pseudo-class-any-link "^8.0.2" + postcss-replace-overflow-wrap "^4.0.0" + postcss-selector-not "^7.0.1" + postcss-value-parser "^4.2.0" + +postcss-pseudo-class-any-link@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-8.0.2.tgz#f5738503f2045de0c4dc216eca99bd835f74e42e" + integrity sha512-FYTIuRE07jZ2CW8POvctRgArQJ43yxhr5vLmImdKUvjFCkR09kh8pIdlCwdx/jbFm7MiW4QP58L4oOUv3grQYA== + dependencies: + postcss-selector-parser "^6.0.10" + postcss-reduce-initial@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-5.1.2.tgz#798cd77b3e033eae7105c18c9d371d989e1382d6" @@ -20439,7 +20929,19 @@ postcss-reduce-transforms@^6.0.0: dependencies: postcss-value-parser "^4.2.0" -postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.9: +postcss-replace-overflow-wrap@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-4.0.0.tgz#d2df6bed10b477bf9c52fab28c568b4b29ca4319" + integrity sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw== + +postcss-selector-not@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/postcss-selector-not/-/postcss-selector-not-7.0.1.tgz#8142e90c8eb6c8c5faecb3e9d96d4353d02e94fb" + integrity sha512-1zT5C27b/zeJhchN7fP0kBr16Cc61mu7Si9uWWLoA3Px/D9tIJPKchJCkUH3tPO5D0pCFmGeApAv8XpXBQJ8SQ== + dependencies: + postcss-selector-parser "^6.0.10" + +postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.9: version "6.0.13" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz#d05d8d76b1e8e173257ef9d60b706a8e5e99bf1b" integrity sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==