From 37963556905bacd23cbd5af6f5c640a26a80163f Mon Sep 17 00:00:00 2001
From: Piotr Roslaniec
Date: Thu, 24 Aug 2023 12:08:15 +0200
Subject: [PATCH] draft migration from ethers to viem
---
package.json | 5 +-
src/agents/contracts.ts | 9 +-
src/agents/coordinator.ts | 61 +--
src/agents/subscription-manager.ts | 55 +--
src/characters/alice.ts | 27 +-
src/characters/cbd-recipient.ts | 14 +-
src/characters/pre-recipient.ts | 10 +-
src/conditions/condition-expr.ts | 8 +-
src/conditions/context/context.ts | 8 +-
src/conditions/context/providers.ts | 121 ++---
src/dkg.ts | 22 +-
src/policies/policy.ts | 27 +-
src/sdk/strategy/cbd-strategy.ts | 10 +-
src/sdk/strategy/pre-strategy.ts | 6 +-
src/viem.ts | 71 +++
src/web3.ts | 1 -
test/acceptance/alice-grants.test.ts | 22 +-
test/acceptance/delay-enact.test.ts | 15 +-
test/docs/cbd.test.ts | 46 +-
test/integration/dkg-client.test.ts | 13 +-
test/unit/cbd-strategy.test.ts | 34 +-
test/unit/conditions/base/contract.test.ts | 21 +-
test/unit/conditions/context.test.ts | 26 +-
test/unit/pre-strategy.test.ts | 21 +-
test/utils.ts | 102 ++--
yarn.lock | 532 ++++++++++++---------
26 files changed, 773 insertions(+), 514 deletions(-)
create mode 100644 src/viem.ts
diff --git a/package.json b/package.json
index f292e6aa8..188e0f2a6 100644
--- a/package.json
+++ b/package.json
@@ -58,7 +58,8 @@
"ethers": "^5.4.1",
"joi": "^17.7.0",
"qs": "^6.10.1",
- "semver": "^7.5.2"
+ "semver": "^7.5.2",
+ "viem": "^1.6.7"
},
"devDependencies": {
"@babel/core": "^7.18.10",
@@ -88,7 +89,7 @@
"typechain": "^7.0.0",
"typedoc": "^0.22.11",
"typedoc-plugin-missing-exports": "^0.22.6",
- "typescript": "^4.7.0"
+ "typescript": "^5.0.4"
},
"files": [
"build/main",
diff --git a/src/agents/contracts.ts b/src/agents/contracts.ts
index 0ed03352f..8c6aca87d 100644
--- a/src/agents/contracts.ts
+++ b/src/agents/contracts.ts
@@ -32,10 +32,13 @@ const CONTRACTS: { readonly [key in ChainId]: Contracts } = {
[ChainId.MAINNET]: MAINNET,
};
-export const getContract = (
- chainId: number,
- contract: keyof Contracts
+export const getContractOrFail = (
+ contract: keyof Contracts,
+ chainId?: number
): ChecksumAddress => {
+ if (!chainId) {
+ throw new Error('No chainId provided');
+ }
if (!Object.values(ChainId).includes(chainId)) {
throw new Error(`No contracts found for chainId: ${chainId}`);
}
diff --git a/src/agents/coordinator.ts b/src/agents/coordinator.ts
index 830376c98..bb4782540 100644
--- a/src/agents/coordinator.ts
+++ b/src/agents/coordinator.ts
@@ -1,15 +1,13 @@
import { SessionStaticKey } from '@nucypher/nucypher-core';
-import { ethers } from 'ethers';
+import { PublicClient, WalletClient } from 'viem';
-import {
- Coordinator,
- Coordinator__factory,
-} from '../../types/ethers-contracts';
+import { Coordinator__factory } from '../../types/ethers-contracts';
import { BLS12381 } from '../../types/ethers-contracts/Coordinator';
import { ChecksumAddress } from '../types';
import { fromHexString } from '../utils';
+import { publicClientToProvider, walletClientToSigner } from '../viem';
-import { DEFAULT_WAIT_N_CONFIRMATIONS, getContract } from './contracts';
+import { DEFAULT_WAIT_N_CONFIRMATIONS, getContractOrFail } from './contracts';
export interface CoordinatorRitual {
initiator: string;
@@ -39,10 +37,10 @@ export enum DkgRitualState {
export class DkgCoordinatorAgent {
public static async getParticipants(
- provider: ethers.providers.Provider,
+ publicClient: PublicClient,
ritualId: number
): Promise {
- const Coordinator = await this.connectReadOnly(provider);
+ const Coordinator = await this.connectReadOnly(publicClient);
const participants = await Coordinator.getParticipants(ritualId);
return participants.map((participant) => {
@@ -57,10 +55,10 @@ export class DkgCoordinatorAgent {
}
public static async initializeRitual(
- provider: ethers.providers.Web3Provider,
+ walletClient: WalletClient,
providers: ChecksumAddress[]
): Promise {
- const Coordinator = await this.connectReadWrite(provider);
+ const Coordinator = await this.connectReadWrite(walletClient);
const tx = await Coordinator.initiateRitual(providers);
const txReceipt = await tx.wait(DEFAULT_WAIT_N_CONFIRMATIONS);
const [ritualStartEvent] = txReceipt.events ?? [];
@@ -71,23 +69,23 @@ export class DkgCoordinatorAgent {
}
public static async getRitual(
- provider: ethers.providers.Provider,
+ publicClient: PublicClient,
ritualId: number
): Promise {
- const Coordinator = await this.connectReadOnly(provider);
+ const Coordinator = await this.connectReadOnly(publicClient);
return Coordinator.rituals(ritualId);
}
public static async getRitualState(
- provider: ethers.providers.Web3Provider,
+ publicClient: PublicClient,
ritualId: number
): Promise {
- const Coordinator = await this.connectReadOnly(provider);
+ const Coordinator = await this.connectReadOnly(publicClient);
return await Coordinator.getRitualState(ritualId);
}
public static async onRitualEndEvent(
- provider: ethers.providers.Web3Provider,
+ provider: PublicClient,
ritualId: number,
callback: (successful: boolean) => void
): Promise {
@@ -104,22 +102,25 @@ export class DkgCoordinatorAgent {
});
}
- private static async connectReadOnly(provider: ethers.providers.Provider) {
- return await this.connect(provider);
- }
-
- private static async connectReadWrite(
- web3Provider: ethers.providers.Web3Provider
- ) {
- return await this.connect(web3Provider, web3Provider.getSigner());
+ private static async connectReadOnly(publicClient: PublicClient) {
+ const contractAddress = getContractOrFail(
+ 'COORDINATOR',
+ publicClient.chain?.id
+ );
+ return Coordinator__factory.connect(
+ contractAddress,
+ publicClientToProvider(publicClient)
+ );
}
- private static async connect(
- provider: ethers.providers.Provider,
- signer?: ethers.providers.JsonRpcSigner
- ): Promise {
- const network = await provider.getNetwork();
- const contractAddress = getContract(network.chainId, 'COORDINATOR');
- return Coordinator__factory.connect(contractAddress, signer ?? provider);
+ private static async connectReadWrite(walletClient: WalletClient) {
+ const contractAddress = getContractOrFail(
+ 'COORDINATOR',
+ walletClient.chain?.id
+ );
+ return Coordinator__factory.connect(
+ contractAddress,
+ walletClientToSigner(walletClient)
+ );
}
}
diff --git a/src/agents/subscription-manager.ts b/src/agents/subscription-manager.ts
index ac8a5a3c5..f0dcc5b37 100644
--- a/src/agents/subscription-manager.ts
+++ b/src/agents/subscription-manager.ts
@@ -1,21 +1,15 @@
-import {
- BigNumber,
- ContractTransaction,
- ethers,
- utils as ethersUtils,
-} from 'ethers';
+import { BigNumber, ContractTransaction, utils as ethersUtils } from 'ethers';
+import { PublicClient, WalletClient } from 'viem';
-import {
- SubscriptionManager,
- SubscriptionManager__factory,
-} from '../../types/ethers-contracts';
+import { SubscriptionManager__factory } from '../../types/ethers-contracts';
import { ChecksumAddress } from '../types';
+import { publicClientToProvider, walletClientToSigner } from '../viem';
-import { DEFAULT_WAIT_N_CONFIRMATIONS, getContract } from './contracts';
+import { DEFAULT_WAIT_N_CONFIRMATIONS, getContractOrFail } from './contracts';
export class PreSubscriptionManagerAgent {
public static async createPolicy(
- web3Provider: ethers.providers.Web3Provider,
+ walletClient: WalletClient,
valueInWei: BigNumber,
policyId: Uint8Array,
size: number,
@@ -23,7 +17,7 @@ export class PreSubscriptionManagerAgent {
endTimestamp: number,
ownerAddress: ChecksumAddress
): Promise {
- const SubscriptionManager = await this.connectReadWrite(web3Provider);
+ const SubscriptionManager = await this.connectReadWrite(walletClient);
const overrides = {
value: valueInWei.toString(),
};
@@ -48,12 +42,12 @@ export class PreSubscriptionManagerAgent {
}
public static async getPolicyCost(
- provider: ethers.providers.Provider,
+ publicClient: PublicClient,
size: number,
startTimestamp: number,
endTimestamp: number
): Promise {
- const SubscriptionManager = await this.connectReadOnly(provider);
+ const SubscriptionManager = await this.connectReadOnly(publicClient);
return await SubscriptionManager.getPolicyCost(
size,
startTimestamp,
@@ -61,28 +55,25 @@ export class PreSubscriptionManagerAgent {
);
}
- private static async connectReadOnly(provider: ethers.providers.Provider) {
- return await this.connect(provider);
- }
-
- private static async connectReadWrite(
- web3Provider: ethers.providers.Web3Provider
- ) {
- return await this.connect(web3Provider, web3Provider.getSigner());
+ private static async connectReadOnly(publicClient: PublicClient) {
+ const contractAddress = getContractOrFail(
+ 'COORDINATOR',
+ publicClient.chain?.id
+ );
+ return SubscriptionManager__factory.connect(
+ contractAddress,
+ publicClientToProvider(publicClient)
+ );
}
- private static async connect(
- provider: ethers.providers.Provider,
- signer?: ethers.providers.JsonRpcSigner
- ): Promise {
- const network = await provider.getNetwork();
- const contractAddress = getContract(
- network.chainId,
- 'SUBSCRIPTION_MANAGER'
+ private static async connectReadWrite(walletClient: WalletClient) {
+ const contractAddress = getContractOrFail(
+ 'COORDINATOR',
+ walletClient.chain?.id
);
return SubscriptionManager__factory.connect(
contractAddress,
- signer ?? provider
+ walletClientToSigner(walletClient)
);
}
}
diff --git a/src/characters/alice.ts b/src/characters/alice.ts
index dfe06d02f..8260ce2e2 100644
--- a/src/characters/alice.ts
+++ b/src/characters/alice.ts
@@ -4,7 +4,8 @@ import {
Signer,
VerifiedKeyFrag,
} from '@nucypher/nucypher-core';
-import { ethers } from 'ethers';
+import { PublicClient, WalletClient } from 'viem';
+import { getBlock, getBlockNumber } from 'viem/actions';
import { Keyring } from '../keyring';
import {
@@ -15,6 +16,7 @@ import {
} from '../policies/policy';
import { PorterClient } from '../porter';
import { ChecksumAddress } from '../types';
+import { toPublicClient } from '../viem';
import { RemoteBob } from './bob';
@@ -42,7 +44,7 @@ export class Alice {
}
public async grant(
- web3Provider: ethers.providers.Web3Provider,
+ walletClient: WalletClient,
porterUri: string,
policyParameters: BlockchainPolicyParameters,
includeUrsulas?: readonly ChecksumAddress[],
@@ -54,12 +56,12 @@ export class Alice {
excludeUrsulas,
includeUrsulas
);
- const policy = await this.createPolicy(web3Provider, policyParameters);
- return await policy.enact(web3Provider, ursulas);
+ const policy = await this.createPolicy(walletClient, policyParameters);
+ return await policy.enact(walletClient, ursulas);
}
public async generatePreEnactedPolicy(
- web3Provider: ethers.providers.Web3Provider,
+ walletClient: WalletClient,
porterUri: string,
policyParameters: BlockchainPolicyParameters,
includeUrsulas?: readonly ChecksumAddress[],
@@ -71,7 +73,7 @@ export class Alice {
excludeUrsulas,
includeUrsulas
);
- const policy = await this.createPolicy(web3Provider, policyParameters);
+ const policy = await this.createPolicy(walletClient, policyParameters);
return await policy.generatePreEnactedPolicy(ursulas);
}
@@ -94,11 +96,12 @@ export class Alice {
}
private async createPolicy(
- web3Provider: ethers.providers.Web3Provider,
+ walletClient: WalletClient,
rawParameters: BlockchainPolicyParameters
): Promise {
+ const publicClient = toPublicClient(walletClient);
const { bob, label, threshold, shares, startDate, endDate } =
- await this.validatePolicyParameters(web3Provider, rawParameters);
+ await this.validatePolicyParameters(publicClient, rawParameters);
const { delegatingKey, verifiedKFrags } = this.generateKFrags(
bob,
label,
@@ -119,7 +122,7 @@ export class Alice {
}
private async validatePolicyParameters(
- web3Provider: ethers.providers.Web3Provider,
+ publicClient: PublicClient,
rawParams: BlockchainPolicyParameters
): Promise {
const startDate = rawParams.startDate ?? new Date();
@@ -141,9 +144,9 @@ export class Alice {
);
}
- const blockNumber = await web3Provider.getBlockNumber();
- const block = await web3Provider.getBlock(blockNumber);
- const blockTime = new Date(block.timestamp * 1000);
+ const blockNumber = await getBlockNumber(publicClient);
+ const block = await getBlock(publicClient, { blockNumber });
+ const blockTime = new Date(Number(block.timestamp) * 1000);
if (endDate < blockTime) {
throw new Error(
`End date must be in the future, ${endDate} is earlier than block time ${blockTime}).`
diff --git a/src/characters/cbd-recipient.ts b/src/characters/cbd-recipient.ts
index c37629fdc..90191868e 100644
--- a/src/characters/cbd-recipient.ts
+++ b/src/characters/cbd-recipient.ts
@@ -11,13 +11,14 @@ import {
SessionStaticSecret,
ThresholdDecryptionRequest,
} from '@nucypher/nucypher-core';
-import { ethers } from 'ethers';
+import { WalletClient } from 'viem';
import { DkgCoordinatorAgent, DkgParticipant } from '../agents/coordinator';
import { ConditionExpression } from '../conditions';
import { DkgRitual } from '../dkg';
import { PorterClient } from '../porter';
import { fromJSON, toJSON } from '../utils';
+import { toPublicClient } from '../viem';
export type ThresholdDecrypterJSON = {
porterUri: string;
@@ -44,12 +45,12 @@ export class ThresholdDecrypter {
// Retrieve and decrypt ciphertext using provider and condition expression
public async retrieveAndDecrypt(
- provider: ethers.providers.Web3Provider,
+ walletClient: WalletClient,
conditionExpr: ConditionExpression,
ciphertext: Ciphertext
): Promise {
const decryptionShares = await this.retrieve(
- provider,
+ walletClient,
conditionExpr,
ciphertext
);
@@ -64,15 +65,16 @@ export class ThresholdDecrypter {
// Retrieve decryption shares
public async retrieve(
- provider: ethers.providers.Web3Provider,
+ walletClient: WalletClient,
conditionExpr: ConditionExpression,
ciphertext: Ciphertext
): Promise {
+ const publicClient = toPublicClient(walletClient);
const dkgParticipants = await DkgCoordinatorAgent.getParticipants(
- provider,
+ publicClient,
this.ritualId
);
- const contextStr = await conditionExpr.buildContext(provider).toJson();
+ const contextStr = await conditionExpr.buildContext(walletClient).toJson();
const { sharedSecrets, encryptedRequests } = this.makeDecryptionRequests(
this.ritualId,
ciphertext,
diff --git a/src/characters/pre-recipient.ts b/src/characters/pre-recipient.ts
index f3ae24f5a..b8ce45ae3 100644
--- a/src/characters/pre-recipient.ts
+++ b/src/characters/pre-recipient.ts
@@ -6,7 +6,7 @@ import {
SecretKey,
Signer,
} from '@nucypher/nucypher-core';
-import { ethers } from 'ethers';
+import { WalletClient } from 'viem';
import { ConditionContext, ConditionExpression } from '../conditions';
import { Keyring } from '../keyring';
@@ -64,9 +64,9 @@ export class PreDecrypter {
public async retrieveAndDecrypt(
messageKits: readonly MessageKit[],
- provider: ethers.providers.Web3Provider
+ walletClient: WalletClient
): Promise {
- const policyMessageKits = await this.retrieve(messageKits, provider);
+ const policyMessageKits = await this.retrieve(messageKits, walletClient);
policyMessageKits.forEach((mk: PolicyMessageKit) => {
if (!mk.isDecryptableByReceiver()) {
@@ -91,7 +91,7 @@ export class PreDecrypter {
public async retrieve(
messageKits: readonly MessageKit[],
- provider: ethers.providers.Web3Provider
+ walletClient: WalletClient
): Promise {
const treasureMap = this.encryptedTreasureMap.decrypt(
this.keyring.secretKey,
@@ -106,7 +106,7 @@ export class PreDecrypter {
.reduce((acc: ConditionExpression[], val) => acc.concat(val), [])
.map((condExpr: ConditionExpression) => condExpr.condition);
- const conditionContext = new ConditionContext(conditions, provider);
+ const conditionContext = new ConditionContext(conditions, walletClient);
const policyMessageKits = messageKits.map((mk) =>
PolicyMessageKit.fromMessageKit(
diff --git a/src/conditions/condition-expr.ts b/src/conditions/condition-expr.ts
index 61c446e53..029865245 100644
--- a/src/conditions/condition-expr.ts
+++ b/src/conditions/condition-expr.ts
@@ -1,6 +1,6 @@
import { Conditions as WASMConditions } from '@nucypher/nucypher-core';
-import { ethers } from 'ethers';
import { SemVer } from 'semver';
+import { WalletClient } from 'viem';
import { objectEquals, toBytes, toJSON } from '../utils';
@@ -84,10 +84,8 @@ export class ConditionExpression {
return new WASMConditions(toJSON(this.toObj()));
}
- public buildContext(
- provider: ethers.providers.Web3Provider
- ): ConditionContext {
- return new ConditionContext([this.condition], provider);
+ public buildContext(walletClient: WalletClient): ConditionContext {
+ return new ConditionContext([this.condition], walletClient);
}
public asAad(): Uint8Array {
diff --git a/src/conditions/context/context.ts b/src/conditions/context/context.ts
index fcf9939c3..848912736 100644
--- a/src/conditions/context/context.ts
+++ b/src/conditions/context/context.ts
@@ -1,5 +1,5 @@
import { Conditions as WASMConditions } from '@nucypher/nucypher-core';
-import { ethers } from 'ethers';
+import { WalletClient } from 'viem';
import { fromJSON, toJSON } from '../../utils';
import { Condition } from '../base';
@@ -20,7 +20,7 @@ export class ConditionContext {
private readonly conditions: ReadonlyArray,
// TODO: We don't always need a web3 provider, only in cases where some specific context parameters are used
// TODO: Consider making this optional or introducing a different pattern to handle that
- private readonly web3Provider: ethers.providers.Web3Provider,
+ private readonly walletClient: WalletClient,
public readonly customParameters: Record = {}
) {
Object.keys(customParameters).forEach((key) => {
@@ -35,7 +35,7 @@ export class ConditionContext {
);
}
});
- this.walletAuthProvider = new WalletAuthenticationProvider(web3Provider);
+ this.walletAuthProvider = new WalletAuthenticationProvider(walletClient);
}
public toObj = async (): Promise> => {
@@ -103,6 +103,6 @@ export class ConditionContext {
public withCustomParams = (
params: Record
): ConditionContext => {
- return new ConditionContext(this.conditions, this.web3Provider, params);
+ return new ConditionContext(this.conditions, this.walletClient, params);
};
}
diff --git a/src/conditions/context/providers.ts b/src/conditions/context/providers.ts
index 9b8db518e..9c36ce0de 100644
--- a/src/conditions/context/providers.ts
+++ b/src/conditions/context/providers.ts
@@ -1,7 +1,14 @@
-import { ethers } from 'ethers';
import { utils as ethersUtils } from 'ethers/lib/ethers';
+import { PublicClient, WalletClient } from 'viem';
+import {
+ getBlock,
+ getBlockNumber,
+ requestAddresses,
+ signTypedData,
+} from 'viem/actions';
-import { Eip712TypedData, FormattedTypedData } from '../../web3';
+import { toPublicClient } from '../../viem';
+import { Eip712TypedData } from '../../web3';
export interface TypedSignature {
signature: string;
@@ -17,11 +24,14 @@ interface ChainData {
export class WalletAuthenticationProvider {
private walletSignature?: Record;
+ private readonly publicClient: PublicClient;
- constructor(private readonly web3Provider: ethers.providers.Web3Provider) {}
+ constructor(private readonly walletClient: WalletClient) {
+ this.publicClient = toPublicClient(walletClient);
+ }
public async getOrCreateWalletSignature(): Promise {
- const address = await this.web3Provider.getSigner().getAddress();
+ const address = await this.getAddress();
const storageKey = `wallet-signature-${address}`;
// If we have a signature in localStorage, return it
@@ -59,68 +69,61 @@ export class WalletAuthenticationProvider {
private async createWalletSignature(): Promise {
// Ensure freshness of the signature
const { blockNumber, blockHash, chainId } = await this.getChainData();
- const address = await this.web3Provider.getSigner().getAddress();
+ const address = await this.getAddress();
const signatureText = `I'm the owner of address ${address} as of block number ${blockNumber}`;
- const salt = ethersUtils.hexlify(ethersUtils.randomBytes(32));
+ const salt = ethersUtils.hexlify(
+ ethersUtils.randomBytes(32)
+ ) as `0x${string}`;
+ const [account] = await requestAddresses(this.walletClient);
- const typedData: Eip712TypedData = {
- types: {
- Wallet: [
- { name: 'address', type: 'address' },
- { name: 'signatureText', type: 'string' },
- { name: 'blockNumber', type: 'uint256' },
- { name: 'blockHash', type: 'bytes32' },
- ],
- },
- domain: {
- name: 'cbd',
- version: '1',
- chainId,
- salt,
- },
- message: {
- address,
- signatureText,
- blockNumber,
- blockHash,
- },
+ const types = {
+ Wallet: [
+ { name: 'name', type: 'string' },
+ { name: 'version', type: 'string' },
+ { name: 'chainId', type: 'uint256' },
+ { name: 'salt', type: 'bytes32' },
+ ],
};
- const signature = await this.web3Provider
- .getSigner()
- ._signTypedData(typedData.domain, typedData.types, typedData.message);
-
- const formattedTypedData: FormattedTypedData = {
- ...typedData,
- primaryType: 'Wallet',
- types: {
- ...typedData.types,
- EIP712Domain: [
- {
- name: 'name',
- type: 'string',
- },
- {
- name: 'version',
- type: 'string',
- },
- {
- name: 'chainId',
- type: 'uint256',
- },
- {
- name: 'salt',
- type: 'bytes32',
- },
- ],
- },
+ const domain = {
+ name: 'cbd',
+ version: '1',
+ chainId,
+ salt,
};
- return { signature, typedData: formattedTypedData, address };
+ const message = {
+ address,
+ signatureText,
+ blockNumber,
+ blockHash,
+ };
+ const typedData = {
+ account,
+ types,
+ primaryType: 'Wallet',
+ domain,
+ message,
+ } as const;
+ const signature = await signTypedData(this.walletClient, typedData);
+
+ return { signature, typedData, address };
+ }
+
+ private async getAddress() {
+ const [address] = await requestAddresses(this.publicClient);
+ if (!address) {
+ throw new Error('No address found');
+ }
+ return address;
}
private async getChainData(): Promise {
- const blockNumber = await this.web3Provider.getBlockNumber();
- const blockHash = (await this.web3Provider.getBlock(blockNumber)).hash;
- const chainId = (await this.web3Provider.getNetwork()).chainId;
+ const blockNumber = Number(await getBlockNumber(this.publicClient));
+ const blockHash = (await getBlock(this.publicClient)).hash;
+ const chainId = this.publicClient.chain?.id;
+ if (!chainId) {
+ // TODO: Improve, somehow
+ throw new Error('Chain ID is not set');
+ }
return { blockNumber, blockHash, chainId };
}
}
diff --git a/src/dkg.ts b/src/dkg.ts
index e65095838..fc331a46d 100644
--- a/src/dkg.ts
+++ b/src/dkg.ts
@@ -1,9 +1,10 @@
import { DkgPublicKey } from '@nucypher/nucypher-core';
-import { ethers } from 'ethers';
+import { PublicClient, WalletClient } from 'viem';
import { DkgCoordinatorAgent, DkgRitualState } from './agents/coordinator';
import { ChecksumAddress } from './types';
import { fromHexString, objectEquals } from './utils';
+import { toPublicClient } from './viem';
export type DkgRitualParameters = {
sharesNum: number;
@@ -65,23 +66,24 @@ const assumedThreshold = (sharesNum: number): number =>
export class DkgClient {
public static async initializeRitual(
- web3Provider: ethers.providers.Web3Provider,
+ walletClient: WalletClient,
ursulas: ChecksumAddress[],
waitUntilEnd = false
): Promise {
+ const publicClient = toPublicClient(walletClient);
const ritualId = await DkgCoordinatorAgent.initializeRitual(
- web3Provider,
+ walletClient,
ursulas.sort()
);
if (waitUntilEnd) {
const isSuccessful = await DkgClient.waitUntilRitualEnd(
- web3Provider,
+ publicClient,
ritualId
);
if (!isSuccessful) {
const ritualState = await DkgCoordinatorAgent.getRitualState(
- web3Provider,
+ publicClient,
ritualId
);
throw new Error(
@@ -94,7 +96,7 @@ export class DkgClient {
}
private static waitUntilRitualEnd = async (
- web3Provider: ethers.providers.Web3Provider,
+ publicClient: PublicClient,
ritualId: number
): Promise => {
return new Promise((resolve, reject) => {
@@ -105,19 +107,19 @@ export class DkgClient {
reject();
}
};
- DkgCoordinatorAgent.onRitualEndEvent(web3Provider, ritualId, callback);
+ DkgCoordinatorAgent.onRitualEndEvent(publicClient, ritualId, callback);
});
};
public static async getExistingRitual(
- web3Provider: ethers.providers.Web3Provider,
+ publicClient: PublicClient,
ritualId: number
): Promise {
const ritualState = await DkgCoordinatorAgent.getRitualState(
- web3Provider,
+ publicClient,
ritualId
);
- const ritual = await DkgCoordinatorAgent.getRitual(web3Provider, ritualId);
+ const ritual = await DkgCoordinatorAgent.getRitual(publicClient, ritualId);
const dkgPkBytes = new Uint8Array([
...fromHexString(ritual.publicKey.word0),
...fromHexString(ritual.publicKey.word1),
diff --git a/src/policies/policy.ts b/src/policies/policy.ts
index 00c62003a..be66f49fb 100644
--- a/src/policies/policy.ts
+++ b/src/policies/policy.ts
@@ -6,13 +6,14 @@ import {
TreasureMap,
VerifiedKeyFrag,
} from '@nucypher/nucypher-core';
-import { ethers } from 'ethers';
+import { WalletClient } from 'viem';
import { PreSubscriptionManagerAgent } from '../agents/subscription-manager';
import { Alice } from '../characters/alice';
import { RemoteBob } from '../characters/bob';
import { Ursula } from '../porter';
import { toBytes, toEpoch, zip } from '../utils';
+import { toPublicClient } from '../viem';
import { toCanonicalAddress } from '../web3';
export type EnactedPolicy = {
@@ -41,30 +42,30 @@ export class PreEnactedPolicy implements IPreEnactedPolicy {
public readonly endTimestamp: Date
) {}
- public async enact(
- web3Provider: ethers.providers.Web3Provider
- ): Promise {
- const txHash = await this.publish(web3Provider);
+ public async enact(walletClient: WalletClient): Promise {
+ const txHash = await this.publish(walletClient);
return {
...this,
txHash,
};
}
- private async publish(
- web3Provider: ethers.providers.Web3Provider
- ): Promise {
+ private async publish(walletClient: WalletClient): Promise {
const startTimestamp = toEpoch(this.startTimestamp);
const endTimestamp = toEpoch(this.endTimestamp);
- const ownerAddress = await web3Provider.getSigner().getAddress();
+ const ownerAddress = await walletClient.account?.address;
+ if (!ownerAddress) {
+ throw new Error('No account set');
+ }
+ const publicClient = toPublicClient(walletClient);
const value = await PreSubscriptionManagerAgent.getPolicyCost(
- web3Provider,
+ publicClient,
this.size,
startTimestamp,
endTimestamp
);
const tx = await PreSubscriptionManagerAgent.createPolicy(
- web3Provider,
+ walletClient,
value,
this.id.toBytes(),
this.size,
@@ -107,11 +108,11 @@ export class BlockchainPolicy {
}
public async enact(
- web3Provider: ethers.providers.Web3Provider,
+ walletClient: WalletClient,
ursulas: readonly Ursula[]
): Promise {
const preEnacted = await this.generatePreEnactedPolicy(ursulas);
- return await preEnacted.enact(web3Provider);
+ return await preEnacted.enact(walletClient);
}
public async generatePreEnactedPolicy(
diff --git a/src/sdk/strategy/cbd-strategy.ts b/src/sdk/strategy/cbd-strategy.ts
index f48accc9f..fd7498efa 100644
--- a/src/sdk/strategy/cbd-strategy.ts
+++ b/src/sdk/strategy/cbd-strategy.ts
@@ -1,5 +1,5 @@
import { DkgPublicKey } from '@nucypher/nucypher-core';
-import { ethers } from 'ethers';
+import { PublicClient } from 'viem';
import {
ThresholdDecrypter,
@@ -29,7 +29,7 @@ export class CbdStrategy {
}
public async deploy(
- web3Provider: ethers.providers.Web3Provider,
+ publicClient: PublicClient,
ritualId: number
): Promise {
// TODO(#264): Enable ritual initialization
@@ -44,7 +44,7 @@ export class CbdStrategy {
// // Given that we just initialized the ritual, this should never happen
// throw new Error('Ritual ID is undefined');
// }
- const dkgRitual = await DkgClient.getExistingRitual(web3Provider, ritualId);
+ const dkgRitual = await DkgClient.getExistingRitual(publicClient, ritualId);
return DeployedCbdStrategy.create(dkgRitual, this.cohort.porterUri);
}
@@ -84,11 +84,11 @@ export class DeployedCbdStrategy {
// TODO: This is analogous to create() above, is it useful?
public static async fromRitualId(
- provider: ethers.providers.Web3Provider,
+ publicClient: PublicClient,
porterUri: string,
ritualId: number
): Promise {
- const dkgRitual = await DkgClient.getExistingRitual(provider, ritualId);
+ const dkgRitual = await DkgClient.getExistingRitual(publicClient, ritualId);
return DeployedCbdStrategy.create(dkgRitual, porterUri);
}
diff --git a/src/sdk/strategy/pre-strategy.ts b/src/sdk/strategy/pre-strategy.ts
index 267f0480d..675fbba84 100644
--- a/src/sdk/strategy/pre-strategy.ts
+++ b/src/sdk/strategy/pre-strategy.ts
@@ -1,5 +1,5 @@
import { PublicKey, SecretKey } from '@nucypher/nucypher-core';
-import { ethers } from 'ethers';
+import { WalletClient } from 'viem';
import { Alice } from '../../characters/alice';
import { Bob } from '../../characters/bob';
@@ -62,7 +62,7 @@ export class PreStrategy {
}
public async deploy(
- web3Provider: ethers.providers.Web3Provider,
+ walletClient: WalletClient,
label: string,
threshold = Math.floor(this.cohort.numUrsulas / 2) + 1,
shares = this.cohort.numUrsulas
@@ -85,7 +85,7 @@ export class PreStrategy {
endDate: this.endDate,
};
const policy = await alice.grant(
- web3Provider,
+ walletClient,
porterUri,
policyParams,
this.cohort.ursulaAddresses
diff --git a/src/viem.ts b/src/viem.ts
new file mode 100644
index 000000000..d8b03e1a4
--- /dev/null
+++ b/src/viem.ts
@@ -0,0 +1,71 @@
+import { providers } from 'ethers';
+import {
+ createPublicClient,
+ http,
+ HttpTransport,
+ PublicClient,
+ WalletClient,
+ webSocket,
+} from 'viem';
+
+const transportForTransportType = (type: string) => {
+ switch (type) {
+ case 'http':
+ return http();
+ case 'webSocket':
+ return webSocket();
+ default:
+ throw new Error(`Unknown transport type: ${type}`);
+ }
+};
+
+export const toPublicClient = (client: WalletClient) => {
+ // TODO: What is a proper way to cast WalletClient to PublicClient?
+ return createPublicClient({
+ chain: client.chain,
+ transport: transportForTransportType(client.transport.type),
+ });
+};
+
+// We need to convert from our PublicClient and WalletClient to ethers.js because we
+// rely on typechain to generate our typescript bindings for our contracts, and there
+// is no support for viem in typechain, so we use our legacy ethers.js bindings instead.
+
+// Adapted from: https://wagmi.sh/react/ethers-adapters
+
+export const publicClientToProvider = (publicClient: PublicClient) => {
+ const { chain, transport } = publicClient;
+ if (!chain) {
+ throw new Error('chain is undefined');
+ }
+ const network = {
+ chainId: chain.id,
+ name: chain.name,
+ ensAddress: chain.contracts?.ensRegistry?.address,
+ };
+ if (transport.type === 'fallback')
+ return new providers.FallbackProvider(
+ (transport.transports as ReturnType[]).map(
+ ({ value }) => new providers.JsonRpcProvider(value?.url, network)
+ )
+ );
+ return new providers.JsonRpcProvider(transport.url, network);
+};
+
+export const walletClientToSigner = (walletClient: WalletClient) => {
+ const { account, chain, transport } = walletClient;
+ if (!account) {
+ throw new Error('account is undefined');
+ }
+ if (!chain) {
+ throw new Error('chain is undefined');
+ }
+ const network = {
+ chainId: chain.id,
+ name: chain.name,
+ ensAddress: chain.contracts?.ensRegistry?.address,
+ };
+ const provider = new providers.Web3Provider(transport, network);
+
+ return provider.getSigner(account.address);
+};
diff --git a/src/web3.ts b/src/web3.ts
index 1b5dcd11a..490ae5f79 100644
--- a/src/web3.ts
+++ b/src/web3.ts
@@ -26,7 +26,6 @@ export interface Eip712TypedData {
}
export interface FormattedTypedData extends Eip712TypedData {
- primaryType: 'Wallet';
types: {
EIP712Domain: { name: string; type: string }[];
Wallet: { name: string; type: string }[];
diff --git a/test/acceptance/alice-grants.test.ts b/test/acceptance/alice-grants.test.ts
index 9600e7582..a8406d1be 100644
--- a/test/acceptance/alice-grants.test.ts
+++ b/test/acceptance/alice-grants.test.ts
@@ -16,7 +16,6 @@ import {
fakePorterUri,
fakeRemoteBob,
fakeUrsulas,
- fakeWeb3Provider,
fromBytes,
mockEncryptTreasureMap,
mockGenerateKFrags,
@@ -25,8 +24,26 @@ import {
mockPublishToBlockchain,
mockRetrieveCFragsRequest,
reencryptKFrags,
+ testWalletClient,
} from '../utils';
+// jest.mock('viem', () => ({
+// ...jest.requireActual('viem'), // This will keep the actual implementations of other functions in 'viem'
+// createPublicClient: jest.fn(() => ({
+// getGasPrice: jest.fn().mockResolvedValue('0.00000042'),
+// getBlockNumber: jest.fn().mockResolvedValue(BigInt(1000)),
+// request: jest.fn().mockResolvedValue(''),
+// })),
+// }));
+
+jest.mock('viem/actions', () => ({
+ ...jest.requireActual('viem/actions'),
+ getBlock: jest.fn().mockResolvedValue({
+ timestamp: 1000,
+ }),
+ getBlockNumber: jest.fn().mockResolvedValue(BigInt(1000)),
+}));
+
describe('story: alice shares message with bob through policy', () => {
const message = 'secret-message-from-alice';
const threshold = 2;
@@ -34,7 +51,6 @@ describe('story: alice shares message with bob through policy', () => {
const startDate = new Date();
const endDate = new Date(Date.now() + 60 * 1000);
const mockedUrsulas = fakeUrsulas(shares);
- const web3Provider = fakeWeb3Provider();
// Intermediate variables used for mocking
let encryptedTreasureMap: EncryptedTreasureMap;
@@ -65,7 +81,7 @@ describe('story: alice shares message with bob through policy', () => {
startDate,
endDate,
};
- policy = await alice.grant(web3Provider, fakePorterUri, policyParams);
+ policy = await alice.grant(testWalletClient, fakePorterUri, policyParams);
expect(
bytesEqual(
diff --git a/test/acceptance/delay-enact.test.ts b/test/acceptance/delay-enact.test.ts
index ac0183072..144f83786 100644
--- a/test/acceptance/delay-enact.test.ts
+++ b/test/acceptance/delay-enact.test.ts
@@ -4,13 +4,21 @@ import {
fakePorterUri,
fakeRemoteBob,
fakeUrsulas,
- fakeWeb3Provider,
mockEncryptTreasureMap,
mockGenerateKFrags,
mockGetUrsulas,
mockPublishToBlockchain,
+ testWalletClient,
} from '../utils';
+jest.mock('viem/actions', () => ({
+ ...jest.requireActual('viem/actions'),
+ getBlock: jest.fn().mockResolvedValue({
+ timestamp: 1000,
+ }),
+ getBlockNumber: jest.fn().mockResolvedValue(BigInt(1000)),
+}));
+
describe('story: alice creates a policy but someone else enacts it', () => {
const threshold = 2;
const shares = 3;
@@ -18,7 +26,6 @@ describe('story: alice creates a policy but someone else enacts it', () => {
const endDate = new Date(Date.now() + 60 * 1000); // 60s later
const mockedUrsulas = fakeUrsulas(shares);
const label = 'fake-data-label';
- const web3Provider = fakeWeb3Provider();
it('alice generates a new policy', async () => {
const getUrsulasSpy = mockGetUrsulas(mockedUrsulas);
@@ -38,7 +45,7 @@ describe('story: alice creates a policy but someone else enacts it', () => {
};
const preEnactedPolicy = await alice.generatePreEnactedPolicy(
- web3Provider,
+ testWalletClient,
fakePorterUri,
policyParams
);
@@ -50,7 +57,7 @@ describe('story: alice creates a policy but someone else enacts it', () => {
).toBeTruthy();
expect(preEnactedPolicy.label).toBe(label);
- const enacted = await preEnactedPolicy.enact(web3Provider);
+ const enacted = await preEnactedPolicy.enact(testWalletClient);
expect(enacted.txHash).toBeDefined();
expect(getUrsulasSpy).toHaveBeenCalled();
diff --git a/test/docs/cbd.test.ts b/test/docs/cbd.test.ts
index e657827c7..51348234a 100644
--- a/test/docs/cbd.test.ts
+++ b/test/docs/cbd.test.ts
@@ -1,19 +1,12 @@
import { MessageKit, VerifiedKeyFrag } from '@nucypher/nucypher-core';
-import { providers } from 'ethers';
+import { createWalletClient, http } from 'viem';
+import { polygonMumbai } from 'viem/chains';
-import {
- Cohort,
- conditions,
- getPorterUri,
- PreStrategy,
- SecretKey,
-} from '../../src';
+import { Cohort, conditions, getPorterUri, PreStrategy } from '../../src';
import { Ursula } from '../../src/porter';
import { toBytes } from '../../src/utils';
import {
fakeUrsulas,
- fakeWeb3Provider,
- mockDetectEthereumProvider,
mockEncryptTreasureMap,
mockGenerateKFrags,
mockGetUrsulas,
@@ -28,6 +21,20 @@ const {
ConditionExpression,
} = conditions;
+jest.mock('viem/actions', () => ({
+ ...jest.requireActual('viem/actions'),
+ getBlock: jest.fn().mockResolvedValue({
+ timestamp: 1000,
+ }),
+ getBlockNumber: jest.fn().mockResolvedValue(BigInt(1000)),
+ requestAddresses: jest
+ .fn()
+ .mockResolvedValue(['0x1234567890123456789012345678901234567890']),
+ signTypedData: jest
+ .fn()
+ .mockResolvedValue('0x1234567890123456789012345678901234567890'),
+}));
+
describe('Get Started (CBD PoC)', () => {
function mockRetrieveAndDecrypt(
makeTreasureMapSpy: jest.SpyInstance,
@@ -47,7 +54,6 @@ describe('Get Started (CBD PoC)', () => {
}
it('can run the get started example', async () => {
- const detectEthereumProvider = mockDetectEthereumProvider();
const mockedUrsulas = fakeUrsulas();
const getUrsulasSpy = mockGetUrsulas(mockedUrsulas);
const generateKFragsSpy = mockGenerateKFrags();
@@ -55,12 +61,6 @@ describe('Get Started (CBD PoC)', () => {
const makeTreasureMapSpy = mockMakeTreasureMap();
const encryptTreasureMapSpy = mockEncryptTreasureMap();
- jest
- .spyOn(providers, 'Web3Provider')
- .mockImplementation(() =>
- fakeWeb3Provider(SecretKey.random().toBEBytes())
- );
-
//
// Start of the code example
//
@@ -85,11 +85,11 @@ describe('Get Started (CBD PoC)', () => {
// 4. Build a Strategy
const newStrategy = PreStrategy.create(newCohort);
- const MMprovider = await detectEthereumProvider();
- const mumbai = providers.getNetwork(80001);
-
- const web3Provider = new providers.Web3Provider(MMprovider, mumbai);
- const newDeployed = await newStrategy.deploy(web3Provider, 'test');
+ const walletClient = createWalletClient({
+ chain: polygonMumbai,
+ transport: http(),
+ });
+ const newDeployed = await newStrategy.deploy(walletClient, 'test');
// 5. Encrypt the plaintext & update conditions
const NFTBalanceConfig = {
@@ -118,7 +118,7 @@ describe('Get Started (CBD PoC)', () => {
// 6. Request decryption rights
const decryptedMessage = await newDeployed.decrypter.retrieveAndDecrypt(
[encryptedMessageKit],
- web3Provider
+ walletClient
);
//
diff --git a/test/integration/dkg-client.test.ts b/test/integration/dkg-client.test.ts
index acb8337b6..fcaf0ebbe 100644
--- a/test/integration/dkg-client.test.ts
+++ b/test/integration/dkg-client.test.ts
@@ -1,12 +1,10 @@
-import { SecretKey } from '@nucypher/nucypher-core';
-
import { DkgCoordinatorAgent } from '../../src/agents/coordinator';
import {
fakeCoordinatorRitual,
fakeDkgParticipants,
fakeRitualId,
- fakeWeb3Provider,
mockGetParticipants,
+ testPublicClient,
} from '../utils';
jest.mock('../../src/agents/coordinator', () => ({
@@ -22,19 +20,20 @@ describe('DkgCoordinatorAgent', () => {
});
it('fetches transcripts from the coordinator', async () => {
- const provider = fakeWeb3Provider(SecretKey.random().toBEBytes());
- const ritual = await DkgCoordinatorAgent.getRitual(provider, fakeRitualId);
+ const ritual = await DkgCoordinatorAgent.getRitual(
+ testPublicClient,
+ fakeRitualId
+ );
expect(ritual).toBeDefined();
});
it('fetches participants from the coordinator', async () => {
- const provider = fakeWeb3Provider(SecretKey.random().toBEBytes());
const fakeParticipants = fakeDkgParticipants(fakeRitualId);
const getParticipantsSpy = mockGetParticipants(
fakeParticipants.participants
);
const participants = await DkgCoordinatorAgent.getParticipants(
- provider,
+ testPublicClient,
fakeRitualId
);
expect(getParticipantsSpy).toHaveBeenCalled();
diff --git a/test/unit/cbd-strategy.test.ts b/test/unit/cbd-strategy.test.ts
index d38aeeb45..36bd211a7 100644
--- a/test/unit/cbd-strategy.test.ts
+++ b/test/unit/cbd-strategy.test.ts
@@ -1,35 +1,34 @@
-import { SecretKey, SessionStaticSecret } from '@nucypher/nucypher-core';
+import { SessionStaticSecret } from '@nucypher/nucypher-core';
+import { createWalletClient, http } from 'viem';
+import { polygonMumbai } from 'viem/chains';
import { conditions } from '../../src';
import { FerveoVariant } from '../../src';
import { CbdStrategy, DeployedCbdStrategy } from '../../src';
import { ThresholdDecrypter } from '../../src/characters/cbd-recipient';
import { toBytes } from '../../src/utils';
+import { toPublicClient } from '../../src/viem';
import {
fakeDkgFlow,
fakeDkgParticipants,
fakeDkgRitual,
fakeTDecFlow,
fakeUrsulas,
- fakeWeb3Provider,
makeCohort,
mockCbdDecrypt,
mockGetExistingRitual,
mockGetParticipants,
mockGetUrsulas,
mockRandomSessionStaticSecret,
+ testWalletClient,
} from '../utils';
-import { aliceSecretKeyBytes } from './testVariables';
-
const {
predefined: { ERC721Ownership },
ConditionExpression,
} = conditions;
// Shared test variables
-const aliceSecretKey = SecretKey.fromBEBytes(aliceSecretKeyBytes);
-const aliceProvider = fakeWeb3Provider(aliceSecretKey.toBEBytes());
const ownsNFT = new ERC721Ownership({
contractAddress: '0x1e988ba4692e52Bc50b375bcC8585b95c48AaD77',
parameters: [3591],
@@ -52,10 +51,14 @@ async function makeDeployedCbdStrategy() {
const mockedDkg = fakeDkgFlow(variant, 0, 4, 4);
const mockedDkgRitual = fakeDkgRitual(mockedDkg);
- const web3Provider = fakeWeb3Provider(aliceSecretKey.toBEBytes());
+ const walletClient = createWalletClient({
+ chain: polygonMumbai,
+ transport: http(),
+ });
+ const publicClient = toPublicClient(walletClient);
const getUrsulasSpy = mockGetUrsulas(ursulas);
const getExistingRitualSpy = mockGetExistingRitual(mockedDkgRitual);
- const deployedStrategy = await strategy.deploy(web3Provider, ritualId);
+ const deployedStrategy = await strategy.deploy(publicClient, ritualId);
expect(getUrsulasSpy).toHaveBeenCalled();
expect(getExistingRitualSpy).toHaveBeenCalled();
@@ -93,6 +96,19 @@ describe('CbdStrategy', () => {
});
});
+jest.mock('viem/actions', () => ({
+ ...jest.requireActual('viem/actions'),
+ getBlock: jest.fn().mockResolvedValue({
+ timestamp: 1000,
+ }),
+ getBlockNumber: jest.fn().mockResolvedValue(BigInt(1000)),
+ requestAddresses: jest
+ .fn()
+ .mockResolvedValue(['0x1234567890123456789012345678901234567890']),
+ signTypedData: jest
+ .fn()
+ .mockResolvedValue('0x1234567890123456789012345678901234567890'),
+}));
describe('CbdDeployedStrategy', () => {
afterEach(() => {
jest.restoreAllMocks();
@@ -130,7 +146,7 @@ describe('CbdDeployedStrategy', () => {
const decryptedMessage =
await deployedStrategy.decrypter.retrieveAndDecrypt(
- aliceProvider,
+ testWalletClient,
conditionExpr,
ciphertext
);
diff --git a/test/unit/conditions/base/contract.test.ts b/test/unit/conditions/base/contract.test.ts
index ee988bbb6..700d28e41 100644
--- a/test/unit/conditions/base/contract.test.ts
+++ b/test/unit/conditions/base/contract.test.ts
@@ -1,14 +1,26 @@
-import { SecretKey } from '@nucypher/nucypher-core';
-
import {
ConditionExpression,
CustomContextParam,
} from '../../../../src/conditions';
import { ContractCondition } from '../../../../src/conditions/base';
import { USER_ADDRESS_PARAM } from '../../../../src/conditions/const';
-import { fakeWeb3Provider } from '../../../utils';
+import { testWalletClient } from '../../../utils';
import { testContractConditionObj, testFunctionAbi } from '../../testVariables';
+jest.mock('viem/actions', () => ({
+ ...jest.requireActual('viem/actions'),
+ getBlock: jest.fn().mockResolvedValue({
+ timestamp: 1000,
+ }),
+ getBlockNumber: jest.fn().mockResolvedValue(BigInt(1000)),
+ requestAddresses: jest
+ .fn()
+ .mockResolvedValue(['0x1234567890123456789012345678901234567890']),
+ signTypedData: jest
+ .fn()
+ .mockResolvedValue('0x1234567890123456789012345678901234567890'),
+}));
+
describe('validation', () => {
it('accepts on a valid schema', () => {
const contract = new ContractCondition(testContractConditionObj);
@@ -116,9 +128,8 @@ describe('supports custom function abi', () => {
},
};
const contractCondition = new ContractCondition(contractConditionObj);
- const web3Provider = fakeWeb3Provider(SecretKey.random().toBEBytes());
const conditionExpr = new ConditionExpression(contractCondition);
- const conditionContext = conditionExpr.buildContext(web3Provider);
+ const conditionContext = conditionExpr.buildContext(testWalletClient);
const myCustomParam = ':customParam';
const customParams: Record = {};
customParams[myCustomParam] = 1234;
diff --git a/test/unit/conditions/context.test.ts b/test/unit/conditions/context.test.ts
index 035b704d6..156be9340 100644
--- a/test/unit/conditions/context.test.ts
+++ b/test/unit/conditions/context.test.ts
@@ -1,11 +1,9 @@
-import { SecretKey } from '@nucypher/nucypher-core';
-
import { CustomContextParam } from '../../../src';
import { ConditionExpression } from '../../../src/conditions';
import { ContractCondition, RpcCondition } from '../../../src/conditions/base';
import { USER_ADDRESS_PARAM } from '../../../src/conditions/const';
import { RESERVED_CONTEXT_PARAMS } from '../../../src/conditions/context/context';
-import { fakeWeb3Provider } from '../../utils';
+import { testWalletClient } from '../../utils';
import {
testContractConditionObj,
testFunctionAbi,
@@ -13,7 +11,19 @@ import {
testRpcConditionObj,
} from '../testVariables';
-const web3Provider = fakeWeb3Provider(SecretKey.random().toBEBytes());
+jest.mock('viem/actions', () => ({
+ ...jest.requireActual('viem/actions'),
+ getBlock: jest.fn().mockResolvedValue({
+ timestamp: 1000,
+ }),
+ getBlockNumber: jest.fn().mockResolvedValue(BigInt(1000)),
+ requestAddresses: jest
+ .fn()
+ .mockResolvedValue(['0x1234567890123456789012345678901234567890']),
+ signTypedData: jest
+ .fn()
+ .mockResolvedValue('0x1234567890123456789012345678901234567890'),
+}));
describe('serialization', () => {
it('serializes to json', async () => {
@@ -27,7 +37,7 @@ describe('serialization', () => {
},
});
const conditionContext = new ConditionExpression(rpcCondition).buildContext(
- web3Provider
+ testWalletClient
);
const asJson = await conditionContext.toJson();
expect(asJson).toBeDefined();
@@ -49,7 +59,7 @@ describe('context parameters', () => {
};
const contractCondition = new ContractCondition(contractConditionObj);
const conditionExpr = new ConditionExpression(contractCondition);
- const conditionContext = conditionExpr.buildContext(web3Provider);
+ const conditionContext = conditionExpr.buildContext(testWalletClient);
describe('return value test', () => {
it('accepts on a custom context parameters', async () => {
@@ -96,7 +106,7 @@ describe('context parameters', () => {
});
const conditionContext = new ConditionExpression(
customContractCondition
- ).buildContext(web3Provider);
+ ).buildContext(testWalletClient);
await expect(async () => conditionContext.toObj()).rejects.toThrow(
`Missing custom context parameter(s): ${customParamKey}`
@@ -110,7 +120,7 @@ describe('context parameters', () => {
});
const conditionContext = new ConditionExpression(
customContractCondition
- ).buildContext(web3Provider);
+ ).buildContext(testWalletClient);
const asObj = await conditionContext.toObj();
expect(asObj).toBeDefined();
diff --git a/test/unit/pre-strategy.test.ts b/test/unit/pre-strategy.test.ts
index daee95dae..a446b536d 100644
--- a/test/unit/pre-strategy.test.ts
+++ b/test/unit/pre-strategy.test.ts
@@ -10,7 +10,6 @@ import { Ursula } from '../../src/porter';
import { toBytes } from '../../src/utils';
import {
fakeUrsulas,
- fakeWeb3Provider,
makeCohort,
mockEncryptTreasureMap,
mockGenerateKFrags,
@@ -18,6 +17,7 @@ import {
mockMakeTreasureMap,
mockPublishToBlockchain,
mockRetrieveCFragsRequest,
+ testWalletClient,
} from '../utils';
import { aliceSecretKeyBytes, bobSecretKeyBytes } from './testVariables';
@@ -30,8 +30,6 @@ const {
// Shared test variables
const aliceSecretKey = SecretKey.fromBEBytes(aliceSecretKeyBytes);
const bobSecretKey = SecretKey.fromBEBytes(bobSecretKeyBytes);
-const aliceProvider = fakeWeb3Provider(aliceSecretKey.toBEBytes());
-const bobProvider = fakeWeb3Provider(bobSecretKey.toBEBytes());
const ownsNFT = new ERC721Ownership({
contractAddress: '0x1e988ba4692e52Bc50b375bcC8585b95c48AaD77',
parameters: [3591],
@@ -54,7 +52,7 @@ const makeDeployedPreStrategy = async () => {
const makeTreasureMapSpy = mockMakeTreasureMap();
const encryptTreasureMapSpy = mockEncryptTreasureMap();
- const deployedStrategy = await strategy.deploy(aliceProvider, 'test');
+ const deployedStrategy = await strategy.deploy(testWalletClient, 'test');
expect(generateKFragsSpy).toHaveBeenCalled();
expect(publishToBlockchainSpy).toHaveBeenCalled();
@@ -71,6 +69,19 @@ const makeDeployedPreStrategy = async () => {
return { deployedStrategy, ursulaAddresses, verifiedKFrags };
};
+jest.mock('viem/actions', () => ({
+ ...jest.requireActual('viem/actions'),
+ getBlock: jest.fn().mockResolvedValue({
+ timestamp: 1000,
+ }),
+ getBlockNumber: jest.fn().mockResolvedValue(BigInt(1000)),
+ requestAddresses: jest
+ .fn()
+ .mockResolvedValue(['0x1234567890123456789012345678901234567890']),
+ signTypedData: jest
+ .fn()
+ .mockResolvedValue('0x1234567890123456789012345678901234567890'),
+}));
describe('PreStrategy', () => {
afterEach(() => {
@@ -127,7 +138,7 @@ describe('PreDeployedStrategy', () => {
const decryptedMessage =
await deployedStrategy.decrypter.retrieveAndDecrypt(
[encryptedMessageKit],
- bobProvider
+ testWalletClient
);
expect(getUrsulasSpy).toHaveBeenCalled();
expect(retrieveCFragsSpy).toHaveBeenCalled();
diff --git a/test/utils.ts b/test/utils.ts
index 69fd8186e..b0b035966 100644
--- a/test/utils.ts
+++ b/test/utils.ts
@@ -2,7 +2,6 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
-import { Block } from '@ethersproject/providers';
import {
AggregatedTranscript,
Capsule,
@@ -33,8 +32,9 @@ import {
VerifiedKeyFrag,
} from '@nucypher/nucypher-core';
import axios from 'axios';
-import { ethers, providers, Wallet } from 'ethers';
import { keccak256 } from 'ethers/lib/utils';
+import { createWalletClient, http, parseGwei } from 'viem';
+import { polygonMumbai } from 'viem/chains';
import { Alice, Bob, Cohort, RemoteBob } from '../src';
import {
@@ -54,6 +54,7 @@ import {
} from '../src/porter';
import { ChecksumAddress } from '../src/types';
import { toBytes, toHexString, zip } from '../src/utils';
+import { toPublicClient } from '../src/viem';
export const bytesEqual = (first: Uint8Array, second: Uint8Array): boolean =>
first.length === second.length &&
@@ -81,31 +82,64 @@ export const fakeAlice = (aliceKey = 'fake-secret-key-32-bytes-alice-x') => {
return Alice.fromSecretKey(secretKey);
};
-export const fakeWeb3Provider = (
- secretKeyBytes = SecretKey.random().toBEBytes(),
- blockNumber?: number,
- blockTimestamp?: number
-): ethers.providers.Web3Provider => {
- const block = { timestamp: blockTimestamp ?? 1000 };
- const provider = {
- getBlockNumber: () => Promise.resolve(blockNumber ?? 1000),
- getBlock: () => Promise.resolve(block as Block),
- _isProvider: true,
- getNetwork: () => Promise.resolve({ name: 'mockNetwork', chainId: -1 }),
- };
- const fakeSignerWithProvider = {
- ...new Wallet(secretKeyBytes),
- provider,
- _signTypedData: () => Promise.resolve('fake-typed-signature'),
- getAddress: () =>
- Promise.resolve('0x0000000000000000000000000000000000000000'),
- } as unknown as ethers.providers.JsonRpcSigner;
- return {
- ...provider,
- getSigner: () => fakeSignerWithProvider,
- } as unknown as ethers.providers.Web3Provider;
+export const mockViemActions = {
+ ...jest.requireActual('viem/actions'), // This will keep the actual implementations of other functions in 'viem/actions'
+ getBlock: jest.fn().mockResolvedValue({
+ timestamp: 1000,
+ }),
+ getBlockNumber: jest.fn().mockResolvedValue(BigInt(1000)),
};
+export const mockViem = async (
+ // secretKeyBytes = SecretKey.random().toBEBytes(),
+ blockNumber = 1000
+ // blockTimestamp = 1000
+) => {
+ // const block: GetBlockReturnType = {
+ // timestamp: blockTimestamp,
+ // transactions: [],
+ // };
+
+ return jest.mock('viem', async () => {
+ const _viem = await import('viem');
+ return jest.fn().mockImplementation(() => {
+ return {
+ createPublicClient: (...args: [any]) => {
+ const client = _viem.createPublicClient(...args);
+ client.getGasPrice = async () => parseGwei('0.00000042');
+ client.getBlockNumber = async () => BigInt(blockNumber ?? 1000);
+ // client.getBlock = async () => block;
+ return client;
+ },
+ };
+ });
+ });
+ // const provider = {
+ // getBlockNumber: () => Promise.resolve(blockNumber ?? 1000),
+ // getBlock: () => Promise.resolve(block as Block),
+ // _isProvider: true,
+ // getNetwork: () => Promise.resolve({ name: 'mockNetwork', chainId: -1 }),
+ // };
+ // const fakeSignerWithProvider = {
+ // ...new Wallet(secretKeyBytes),
+ // provider,
+ // _signTypedData: () => Promise.resolve('fake-typed-signature'),
+ // getAddress: () =>
+ // Promise.resolve('0x0000000000000000000000000000000000000000'),
+ // } as unknown as ethers.providers.JsonRpcSigner;
+ // return {
+ // ...provider,
+ // getSigner: () => fakeSignerWithProvider,
+ // } as unknown as ethers.providers.Web3Provider;
+};
+
+export const testWalletClient = createWalletClient({
+ chain: polygonMumbai,
+ transport: http(),
+});
+
+export const testPublicClient = toPublicClient(testWalletClient);
+
const genChecksumAddress = (i: number) =>
'0x' + '0'.repeat(40 - i.toString(16).length) + i.toString(16);
const genEthAddr = (i: number) =>
@@ -208,12 +242,6 @@ export const mockMakeTreasureMap = () => {
return jest.spyOn(BlockchainPolicy.prototype as any, 'makeTreasureMap');
};
-export const mockDetectEthereumProvider = () => {
- return jest.fn(async () => {
- return {} as unknown as providers.ExternalProvider;
- });
-};
-
export const fakeDkgFlow = (
variant: FerveoVariant,
ritualId: number,
@@ -496,12 +524,6 @@ export const fakeDkgRitual = (ritual: {
);
};
-export const mockInitializeRitual = (ritualId: number) => {
- return jest.spyOn(DkgClient, 'initializeRitual').mockImplementation(() => {
- return Promise.resolve(ritualId);
- });
-};
-
export const mockGetExistingRitual = (dkgRitual: DkgRitual) => {
return jest.spyOn(DkgClient, 'getExistingRitual').mockImplementation(() => {
return Promise.resolve(dkgRitual);
@@ -516,9 +538,3 @@ export const makeCohort = async (ursulas: Ursula[]) => {
expect(getUrsulasSpy).toHaveBeenCalled();
return cohort;
};
-
-export const mockGetRitualState = (state = DkgRitualState.FINALIZED) => {
- return jest
- .spyOn(DkgCoordinatorAgent, 'getRitualState')
- .mockImplementation((_provider, _ritualId) => Promise.resolve(state));
-};
diff --git a/yarn.lock b/yarn.lock
index 4e46e2b5b..93c7bf2b3 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -7,6 +7,11 @@
resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf"
integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==
+"@adraffy/ens-normalize@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.9.0.tgz#223572538f6bea336750039bb43a4016dcc8182d"
+ integrity sha512-iowxq3U30sghZotgl4s/oJRci6WPBfNO5YYgk2cIOMCHr3LeGPcsZjCEr+33Q4N+oV3OABDAtA+pyvWjbvBifQ==
+
"@ampproject/remapping@^2.2.0":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630"
@@ -22,12 +27,13 @@
dependencies:
"@babel/highlight" "^7.10.4"
-"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.5":
- version "7.22.5"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.5.tgz#234d98e1551960604f1246e6475891a570ad5658"
- integrity sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==
+"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.10", "@babel/code-frame@^7.22.5":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.10.tgz#1c20e612b768fefa75f6e90d6ecb86329247f0a3"
+ integrity sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==
dependencies:
- "@babel/highlight" "^7.22.5"
+ "@babel/highlight" "^7.22.10"
+ chalk "^2.4.2"
"@babel/compat-data@^7.22.5", "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9":
version "7.22.9"
@@ -35,32 +41,32 @@
integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==
"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.18.10", "@babel/core@^7.7.2", "@babel/core@^7.8.0":
- version "7.22.9"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.9.tgz#bd96492c68822198f33e8a256061da3cf391f58f"
- integrity sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.10.tgz#aad442c7bcd1582252cb4576747ace35bc122f35"
+ integrity sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw==
dependencies:
"@ampproject/remapping" "^2.2.0"
- "@babel/code-frame" "^7.22.5"
- "@babel/generator" "^7.22.9"
- "@babel/helper-compilation-targets" "^7.22.9"
+ "@babel/code-frame" "^7.22.10"
+ "@babel/generator" "^7.22.10"
+ "@babel/helper-compilation-targets" "^7.22.10"
"@babel/helper-module-transforms" "^7.22.9"
- "@babel/helpers" "^7.22.6"
- "@babel/parser" "^7.22.7"
+ "@babel/helpers" "^7.22.10"
+ "@babel/parser" "^7.22.10"
"@babel/template" "^7.22.5"
- "@babel/traverse" "^7.22.8"
- "@babel/types" "^7.22.5"
+ "@babel/traverse" "^7.22.10"
+ "@babel/types" "^7.22.10"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.2"
json5 "^2.2.2"
semver "^6.3.1"
-"@babel/generator@^7.22.7", "@babel/generator@^7.22.9", "@babel/generator@^7.7.2":
- version "7.22.9"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d"
- integrity sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==
+"@babel/generator@^7.22.10", "@babel/generator@^7.7.2":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.10.tgz#c92254361f398e160645ac58831069707382b722"
+ integrity sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==
dependencies:
- "@babel/types" "^7.22.5"
+ "@babel/types" "^7.22.10"
"@jridgewell/gen-mapping" "^0.3.2"
"@jridgewell/trace-mapping" "^0.3.17"
jsesc "^2.5.1"
@@ -73,16 +79,16 @@
"@babel/types" "^7.22.5"
"@babel/helper-builder-binary-assignment-operator-visitor@^7.22.5":
- version "7.22.5"
- resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.5.tgz#a3f4758efdd0190d8927fcffd261755937c71878"
- integrity sha512-m1EP3lVOPptR+2DwD125gziZNcmoNSHGmJROKoy87loWUQyJaVXDgpmruWqDARZSmtYQ+Dl25okU8+qhVzuykw==
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.10.tgz#573e735937e99ea75ea30788b57eb52fab7468c9"
+ integrity sha512-Av0qubwDQxC56DoUReVDeLfMEjYYSN1nZrTUrWkXd7hpU73ymRANkbuDm3yni9npkn+RXy9nNbEJZEzXr7xrfQ==
dependencies:
- "@babel/types" "^7.22.5"
+ "@babel/types" "^7.22.10"
-"@babel/helper-compilation-targets@^7.22.5", "@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.22.9":
- version "7.22.9"
- resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz#f9d0a7aaaa7cd32a3f31c9316a69f5a9bcacb892"
- integrity sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==
+"@babel/helper-compilation-targets@^7.22.10", "@babel/helper-compilation-targets@^7.22.5", "@babel/helper-compilation-targets@^7.22.6":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz#01d648bbc25dd88f513d862ee0df27b7d4e67024"
+ integrity sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==
dependencies:
"@babel/compat-data" "^7.22.9"
"@babel/helper-validator-option" "^7.22.5"
@@ -91,9 +97,9 @@
semver "^6.3.1"
"@babel/helper-create-class-features-plugin@^7.22.5":
- version "7.22.9"
- resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.9.tgz#c36ea240bb3348f942f08b0fbe28d6d979fab236"
- integrity sha512-Pwyi89uO4YrGKxL/eNJ8lfEH55DnRloGPOseaA8NFNL6jAUnn+KccaISiFazCj5IolPPDjGSdzQzXVzODVRqUQ==
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.10.tgz#dd2612d59eac45588021ac3d6fa976d08f4e95a3"
+ integrity sha512-5IBb77txKYQPpOEdUdIhBx8VrZyDCQ+H82H0+5dX1TmuscP5vJKEE3cKurjtIw/vFwzbVH48VweE78kVDBrqjA==
dependencies:
"@babel/helper-annotate-as-pure" "^7.22.5"
"@babel/helper-environment-visitor" "^7.22.5"
@@ -182,7 +188,7 @@
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295"
integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==
-"@babel/helper-remap-async-to-generator@^7.22.5":
+"@babel/helper-remap-async-to-generator@^7.22.5", "@babel/helper-remap-async-to-generator@^7.22.9":
version "7.22.9"
resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.9.tgz#53a25b7484e722d7efb9c350c75c032d4628de82"
integrity sha512-8WWC4oR4Px+tr+Fp0X3RHDVfINGpF3ad1HIbrc8A77epiR6eMMc6jsgozkzT2uDiOOdoS9cLIQ+XD2XvI2WSmQ==
@@ -237,36 +243,36 @@
integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==
"@babel/helper-wrap-function@^7.22.9":
- version "7.22.9"
- resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.22.9.tgz#189937248c45b0182c1dcf32f3444ca153944cb9"
- integrity sha512-sZ+QzfauuUEfxSEjKFmi3qDSHgLsTPK/pEpoD/qonZKOtTPTLbf59oabPQ4rKekt9lFcj/hTZaOhWwFYrgjk+Q==
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.22.10.tgz#d845e043880ed0b8c18bd194a12005cb16d2f614"
+ integrity sha512-OnMhjWjuGYtdoO3FmsEFWvBStBAe2QOgwOLsLNDjN+aaiMD8InJk1/O3HSD8lkqTjCgg5YI34Tz15KNNA3p+nQ==
dependencies:
"@babel/helper-function-name" "^7.22.5"
"@babel/template" "^7.22.5"
- "@babel/types" "^7.22.5"
+ "@babel/types" "^7.22.10"
-"@babel/helpers@^7.22.6":
- version "7.22.6"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.6.tgz#8e61d3395a4f0c5a8060f309fb008200969b5ecd"
- integrity sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==
+"@babel/helpers@^7.22.10":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.10.tgz#ae6005c539dfbcb5cd71fb51bfc8a52ba63bc37a"
+ integrity sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw==
dependencies:
"@babel/template" "^7.22.5"
- "@babel/traverse" "^7.22.6"
- "@babel/types" "^7.22.5"
+ "@babel/traverse" "^7.22.10"
+ "@babel/types" "^7.22.10"
-"@babel/highlight@^7.10.4", "@babel/highlight@^7.22.5":
- version "7.22.5"
- resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031"
- integrity sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==
+"@babel/highlight@^7.10.4", "@babel/highlight@^7.22.10":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.10.tgz#02a3f6d8c1cb4521b2fd0ab0da8f4739936137d7"
+ integrity sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==
dependencies:
"@babel/helper-validator-identifier" "^7.22.5"
- chalk "^2.0.0"
+ chalk "^2.4.2"
js-tokens "^4.0.0"
-"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.5", "@babel/parser@^7.22.7":
- version "7.22.7"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.7.tgz#df8cf085ce92ddbdbf668a7f186ce848c9036cae"
- integrity sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==
+"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.10", "@babel/parser@^7.22.5":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.10.tgz#e37634f9a12a1716136c44624ef54283cabd3f55"
+ integrity sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.22.5":
version "7.22.5"
@@ -289,14 +295,6 @@
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703"
integrity sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==
-"@babel/plugin-proposal-unicode-property-regex@^7.4.4":
- version "7.18.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e"
- integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==
- dependencies:
- "@babel/helper-create-regexp-features-plugin" "^7.18.6"
- "@babel/helper-plugin-utils" "^7.18.6"
-
"@babel/plugin-syntax-async-generators@^7.8.4":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d"
@@ -445,14 +443,14 @@
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"
-"@babel/plugin-transform-async-generator-functions@^7.22.7":
- version "7.22.7"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.7.tgz#053e76c0a903b72b573cb1ab7d6882174d460a1b"
- integrity sha512-7HmE7pk/Fmke45TODvxvkxRMV9RazV+ZZzhOL9AG8G29TLrr3jkjwF7uJfxZ30EoXpO+LJkq4oA8NjO2DTnEDg==
+"@babel/plugin-transform-async-generator-functions@^7.22.10":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.10.tgz#45946cd17f915b10e65c29b8ed18a0a50fc648c8"
+ integrity sha512-eueE8lvKVzq5wIObKK/7dvoeKJ+xc6TvRn6aysIjS6pSCeLy7S/eVi7pEQknZqyqvzaNKdDtem8nUNTBgDVR2g==
dependencies:
"@babel/helper-environment-visitor" "^7.22.5"
"@babel/helper-plugin-utils" "^7.22.5"
- "@babel/helper-remap-async-to-generator" "^7.22.5"
+ "@babel/helper-remap-async-to-generator" "^7.22.9"
"@babel/plugin-syntax-async-generators" "^7.8.4"
"@babel/plugin-transform-async-to-generator@^7.22.5":
@@ -471,10 +469,10 @@
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"
-"@babel/plugin-transform-block-scoping@^7.22.5":
- version "7.22.5"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.5.tgz#8bfc793b3a4b2742c0983fadc1480d843ecea31b"
- integrity sha512-EcACl1i5fSQ6bt+YGuU/XGCeZKStLmyVGytWkpyhCLeQVA0eu6Wtiw92V+I1T/hnezUv7j74dA/Ro69gWcU+hg==
+"@babel/plugin-transform-block-scoping@^7.22.10":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.10.tgz#88a1dccc3383899eb5e660534a76a22ecee64faa"
+ integrity sha512-1+kVpGAOOI1Albt6Vse7c8pHzcZQdQKW+wJH+g8mCaszOdDVwRXa/slHPqIw+oJAJANTKDMuM2cBdV0Dg618Vg==
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"
@@ -518,14 +516,14 @@
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/template" "^7.22.5"
-"@babel/plugin-transform-destructuring@^7.22.5":
- version "7.22.5"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.5.tgz#d3aca7438f6c26c78cdd0b0ba920a336001b27cc"
- integrity sha512-GfqcFuGW8vnEqTUBM7UtPd5A4q797LTvvwKxXTgRsFjoqaJiEg9deBG6kWeQYkVEL569NpnmpC0Pkr/8BLKGnQ==
+"@babel/plugin-transform-destructuring@^7.22.10":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.10.tgz#38e2273814a58c810b6c34ea293be4973c4eb5e2"
+ integrity sha512-dPJrL0VOyxqLM9sritNbMSGx/teueHF/htMKrPT7DNxccXxRDPYqlgPFFdr8u+F+qUZOkZoXue/6rL5O5GduEw==
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"
-"@babel/plugin-transform-dotall-regex@^7.22.5", "@babel/plugin-transform-dotall-regex@^7.4.4":
+"@babel/plugin-transform-dotall-regex@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.22.5.tgz#dbb4f0e45766eb544e193fb00e65a1dd3b2a4165"
integrity sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==
@@ -703,10 +701,10 @@
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/plugin-syntax-optional-catch-binding" "^7.8.3"
-"@babel/plugin-transform-optional-chaining@^7.22.5", "@babel/plugin-transform-optional-chaining@^7.22.6":
- version "7.22.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.6.tgz#4bacfe37001fe1901117672875e931d439811564"
- integrity sha512-Vd5HiWml0mDVtcLHIoEU5sw6HOUW/Zk0acLs/SAeuLzkGNOPc9DB4nkUajemhCmTIz3eiaKREZn2hQQqF79YTg==
+"@babel/plugin-transform-optional-chaining@^7.22.10", "@babel/plugin-transform-optional-chaining@^7.22.5":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.10.tgz#076d28a7e074392e840d4ae587d83445bac0372a"
+ integrity sha512-MMkQqZAZ+MGj+jGTG3OTuhKeBpNcO+0oCEbrGNEaOmiEn+1MzRyQlYsruGiU8RTK3zV6XwrVJTmwiDOyYK6J9g==
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/helper-skip-transparent-expression-wrappers" "^7.22.5"
@@ -744,13 +742,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"
-"@babel/plugin-transform-regenerator@^7.22.5":
- version "7.22.5"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.5.tgz#cd8a68b228a5f75fa01420e8cc2fc400f0fc32aa"
- integrity sha512-rR7KePOE7gfEtNTh9Qw+iO3Q/e4DEsoQ+hdvM6QUDH7JRJ5qxq5AA52ZzBWbI5i9lfNuvySgOGP8ZN7LAmaiPw==
+"@babel/plugin-transform-regenerator@^7.22.10":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.10.tgz#8ceef3bd7375c4db7652878b0241b2be5d0c3cca"
+ integrity sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"
- regenerator-transform "^0.15.1"
+ regenerator-transform "^0.15.2"
"@babel/plugin-transform-reserved-words@^7.22.5":
version "7.22.5"
@@ -795,10 +793,10 @@
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"
-"@babel/plugin-transform-unicode-escapes@^7.22.5":
- version "7.22.5"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.5.tgz#ce0c248522b1cb22c7c992d88301a5ead70e806c"
- integrity sha512-biEmVg1IYB/raUO5wT1tgfacCef15Fbzhkx493D3urBI++6hpJ+RFG4SrWMn0NEZLfvilqKf3QDrRVZHo08FYg==
+"@babel/plugin-transform-unicode-escapes@^7.22.10":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.10.tgz#c723f380f40a2b2f57a62df24c9005834c8616d9"
+ integrity sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"
@@ -827,12 +825,12 @@
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/preset-env@^7.15.6":
- version "7.22.9"
- resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.22.9.tgz#57f17108eb5dfd4c5c25a44c1977eba1df310ac7"
- integrity sha512-wNi5H/Emkhll/bqPjsjQorSykrlfY5OWakd6AulLvMEytpKasMVUpVy8RL4qBIBs5Ac6/5i0/Rv0b/Fg6Eag/g==
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.22.10.tgz#3263b9fe2c8823d191d28e61eac60a79f9ce8a0f"
+ integrity sha512-riHpLb1drNkpLlocmSyEg4oYJIQFeXAK/d7rI6mbD0XsvoTOOweXDmQPG/ErxsEhWk3rl3Q/3F6RFQlVFS8m0A==
dependencies:
"@babel/compat-data" "^7.22.9"
- "@babel/helper-compilation-targets" "^7.22.9"
+ "@babel/helper-compilation-targets" "^7.22.10"
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/helper-validator-option" "^7.22.5"
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.22.5"
@@ -857,15 +855,15 @@
"@babel/plugin-syntax-top-level-await" "^7.14.5"
"@babel/plugin-syntax-unicode-sets-regex" "^7.18.6"
"@babel/plugin-transform-arrow-functions" "^7.22.5"
- "@babel/plugin-transform-async-generator-functions" "^7.22.7"
+ "@babel/plugin-transform-async-generator-functions" "^7.22.10"
"@babel/plugin-transform-async-to-generator" "^7.22.5"
"@babel/plugin-transform-block-scoped-functions" "^7.22.5"
- "@babel/plugin-transform-block-scoping" "^7.22.5"
+ "@babel/plugin-transform-block-scoping" "^7.22.10"
"@babel/plugin-transform-class-properties" "^7.22.5"
"@babel/plugin-transform-class-static-block" "^7.22.5"
"@babel/plugin-transform-classes" "^7.22.6"
"@babel/plugin-transform-computed-properties" "^7.22.5"
- "@babel/plugin-transform-destructuring" "^7.22.5"
+ "@babel/plugin-transform-destructuring" "^7.22.10"
"@babel/plugin-transform-dotall-regex" "^7.22.5"
"@babel/plugin-transform-duplicate-keys" "^7.22.5"
"@babel/plugin-transform-dynamic-import" "^7.22.5"
@@ -888,38 +886,36 @@
"@babel/plugin-transform-object-rest-spread" "^7.22.5"
"@babel/plugin-transform-object-super" "^7.22.5"
"@babel/plugin-transform-optional-catch-binding" "^7.22.5"
- "@babel/plugin-transform-optional-chaining" "^7.22.6"
+ "@babel/plugin-transform-optional-chaining" "^7.22.10"
"@babel/plugin-transform-parameters" "^7.22.5"
"@babel/plugin-transform-private-methods" "^7.22.5"
"@babel/plugin-transform-private-property-in-object" "^7.22.5"
"@babel/plugin-transform-property-literals" "^7.22.5"
- "@babel/plugin-transform-regenerator" "^7.22.5"
+ "@babel/plugin-transform-regenerator" "^7.22.10"
"@babel/plugin-transform-reserved-words" "^7.22.5"
"@babel/plugin-transform-shorthand-properties" "^7.22.5"
"@babel/plugin-transform-spread" "^7.22.5"
"@babel/plugin-transform-sticky-regex" "^7.22.5"
"@babel/plugin-transform-template-literals" "^7.22.5"
"@babel/plugin-transform-typeof-symbol" "^7.22.5"
- "@babel/plugin-transform-unicode-escapes" "^7.22.5"
+ "@babel/plugin-transform-unicode-escapes" "^7.22.10"
"@babel/plugin-transform-unicode-property-regex" "^7.22.5"
"@babel/plugin-transform-unicode-regex" "^7.22.5"
"@babel/plugin-transform-unicode-sets-regex" "^7.22.5"
- "@babel/preset-modules" "^0.1.5"
- "@babel/types" "^7.22.5"
- babel-plugin-polyfill-corejs2 "^0.4.4"
- babel-plugin-polyfill-corejs3 "^0.8.2"
- babel-plugin-polyfill-regenerator "^0.5.1"
+ "@babel/preset-modules" "0.1.6-no-external-plugins"
+ "@babel/types" "^7.22.10"
+ babel-plugin-polyfill-corejs2 "^0.4.5"
+ babel-plugin-polyfill-corejs3 "^0.8.3"
+ babel-plugin-polyfill-regenerator "^0.5.2"
core-js-compat "^3.31.0"
semver "^6.3.1"
-"@babel/preset-modules@^0.1.5":
- version "0.1.6"
- resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.6.tgz#31bcdd8f19538437339d17af00d177d854d9d458"
- integrity sha512-ID2yj6K/4lKfhuU3+EX4UvNbIt7eACFbHmNUjzA+ep+B5971CknnA/9DEWKbRokfbbtblxxxXFJJrH47UEAMVg==
+"@babel/preset-modules@0.1.6-no-external-plugins":
+ version "0.1.6-no-external-plugins"
+ resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz#ccb88a2c49c817236861fee7826080573b8a923a"
+ integrity sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
- "@babel/plugin-proposal-unicode-property-regex" "^7.4.4"
- "@babel/plugin-transform-dotall-regex" "^7.4.4"
"@babel/types" "^7.4.4"
esutils "^2.0.2"
@@ -929,11 +925,11 @@
integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==
"@babel/runtime@^7.8.4":
- version "7.22.6"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.6.tgz#57d64b9ae3cff1d67eb067ae117dac087f5bd438"
- integrity sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.10.tgz#ae3e9631fd947cb7e3610d3e9d8fef5f76696682"
+ integrity sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==
dependencies:
- regenerator-runtime "^0.13.11"
+ regenerator-runtime "^0.14.0"
"@babel/template@^7.22.5", "@babel/template@^7.3.3":
version "7.22.5"
@@ -944,26 +940,26 @@
"@babel/parser" "^7.22.5"
"@babel/types" "^7.22.5"
-"@babel/traverse@^7.22.6", "@babel/traverse@^7.22.8", "@babel/traverse@^7.7.2":
- version "7.22.8"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.8.tgz#4d4451d31bc34efeae01eac222b514a77aa4000e"
- integrity sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==
+"@babel/traverse@^7.22.10", "@babel/traverse@^7.7.2":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.10.tgz#20252acb240e746d27c2e82b4484f199cf8141aa"
+ integrity sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==
dependencies:
- "@babel/code-frame" "^7.22.5"
- "@babel/generator" "^7.22.7"
+ "@babel/code-frame" "^7.22.10"
+ "@babel/generator" "^7.22.10"
"@babel/helper-environment-visitor" "^7.22.5"
"@babel/helper-function-name" "^7.22.5"
"@babel/helper-hoist-variables" "^7.22.5"
"@babel/helper-split-export-declaration" "^7.22.6"
- "@babel/parser" "^7.22.7"
- "@babel/types" "^7.22.5"
+ "@babel/parser" "^7.22.10"
+ "@babel/types" "^7.22.10"
debug "^4.1.0"
globals "^11.1.0"
-"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
- version "7.22.5"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe"
- integrity sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==
+"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.5", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
+ version "7.22.10"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.10.tgz#4a9e76446048f2c66982d1a989dd12b8a2d2dc03"
+ integrity sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==
dependencies:
"@babel/helper-string-parser" "^7.22.5"
"@babel/helper-validator-identifier" "^7.22.5"
@@ -988,15 +984,15 @@
integrity sha512-LIgYXuCSO5Gvtc0t9bebAMSwd68ewzmqLypqI2Kke1rqOqqDbMpYcYfoPfFlv9eyLIh4jocHWwCK5FS7z9icUA==
"@commitlint/load@>6.1.1":
- version "17.6.7"
- resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-17.6.7.tgz#c63b18ca8942a8fc095ec7a7ff7aa52f3854f6ba"
- integrity sha512-QZ2rJTbX55BQdYrCm/p6+hh/pFBgC9nTJxfsrK6xRPe2thiQzHN0AQDBqBwAirn6gIkHrjIbCbtAE6kiDYLjrw==
+ version "17.7.1"
+ resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-17.7.1.tgz#0723b11723a20043a304a74960602dead89b5cdd"
+ integrity sha512-S/QSOjE1ztdogYj61p6n3UbkUvweR17FQ0zDbNtoTLc+Hz7vvfS7ehoTMQ27hPSjVBpp7SzEcOQu081RLjKHJQ==
dependencies:
"@commitlint/config-validator" "^17.6.7"
"@commitlint/execute-rule" "^17.4.0"
"@commitlint/resolve-extends" "^17.6.7"
"@commitlint/types" "^17.4.4"
- "@types/node" "*"
+ "@types/node" "20.4.7"
chalk "^4.1.0"
cosmiconfig "^8.0.0"
cosmiconfig-typescript-loader "^4.0.0"
@@ -1033,6 +1029,27 @@
dependencies:
"@jridgewell/trace-mapping" "0.3.9"
+"@depay/solana-web3.js@^1.25.1":
+ version "1.25.1"
+ resolved "https://registry.yarnpkg.com/@depay/solana-web3.js/-/solana-web3.js-1.25.1.tgz#2f4725007ff4cfc14af2606eb3d333e68097e13f"
+ integrity sha512-tKCHHQVoZV85wZ8r3ZuxuQlejBcVolIUf52Bq2Pne3KR1BpxYJF2/9XRTH9qCrLZMQsgsQHikQEH5eglDCKJkA==
+ dependencies:
+ bs58 "^5.0.0"
+
+"@depay/web3-blockchains@^8.4.2":
+ version "8.4.2"
+ resolved "https://registry.yarnpkg.com/@depay/web3-blockchains/-/web3-blockchains-8.4.2.tgz#3f5f072f337acc334e5f0f097627dd85af85848c"
+ integrity sha512-kvzTy0R7zBqL6w2CSRGm3SO1K9QuYpuOCa0BTMt4O7ATqxFg+uXor3uWjS8oWvlQwOdqLl8WT7aaKT8OD63KXw==
+
+"@depay/web3-mock@^14.16.2":
+ version "14.16.2"
+ resolved "https://registry.yarnpkg.com/@depay/web3-mock/-/web3-mock-14.16.2.tgz#a97dcd022f0fa3c3b23e6e1f29f90c20580bb8ae"
+ integrity sha512-Zf1oqve/mLXaslZNSp0qLE9CBnfzGgJ3m86lVBrCMKJxFi0lV8NKGVhRDIzWCfxv3e5Zx3/dNOgyoaxAvj3RIw==
+ dependencies:
+ "@depay/solana-web3.js" "^1.25.1"
+ "@depay/web3-blockchains" "^8.4.2"
+ ethers "^5.7.1"
+
"@eslint/eslintrc@^0.4.3":
version "0.4.3"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
@@ -1626,12 +1643,7 @@
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/trace-mapping" "^0.3.9"
-"@jridgewell/resolve-uri@3.1.0":
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
- integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==
-
-"@jridgewell/resolve-uri@^3.0.3":
+"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721"
integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==
@@ -1641,12 +1653,7 @@
resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72"
integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==
-"@jridgewell/sourcemap-codec@1.4.14":
- version "1.4.14"
- resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24"
- integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
-
-"@jridgewell/sourcemap-codec@^1.4.10":
+"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14":
version "1.4.15"
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32"
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
@@ -1660,12 +1667,36 @@
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9":
- version "0.3.18"
- resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6"
- integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==
+ version "0.3.19"
+ resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811"
+ integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==
dependencies:
- "@jridgewell/resolve-uri" "3.1.0"
- "@jridgewell/sourcemap-codec" "1.4.14"
+ "@jridgewell/resolve-uri" "^3.1.0"
+ "@jridgewell/sourcemap-codec" "^1.4.14"
+
+"@noble/curves@1.1.0":
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.1.0.tgz#f13fc667c89184bc04cccb9b11e8e7bae27d8c3d"
+ integrity sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==
+ dependencies:
+ "@noble/hashes" "1.3.1"
+
+"@noble/curves@~1.0.0":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.0.0.tgz#e40be8c7daf088aaf291887cbc73f43464a92932"
+ integrity sha512-2upgEu0iLiDVDZkNLeFV2+ht0BAVgQnEmCk6JsOch9Rp8xfkMCbvbAZlA2pBHQc73dbl+vFOXfqkf4uemdn0bw==
+ dependencies:
+ "@noble/hashes" "1.3.0"
+
+"@noble/hashes@1.3.0":
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.0.tgz#085fd70f6d7d9d109671090ccae1d3bec62554a1"
+ integrity sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg==
+
+"@noble/hashes@1.3.1", "@noble/hashes@~1.3.0":
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9"
+ integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
@@ -1693,6 +1724,28 @@
resolved "https://registry.yarnpkg.com/@nucypher/nucypher-core/-/nucypher-core-0.11.0.tgz#696663586d0dd70eacfd433a75adc045fba7c24f"
integrity sha512-vr44+Vo1xKH17MHW+bQtm/fzEejVcZ9grSbHVS+KqkTytKbWb8ulX3Uc5AI0gli1FxwNwM5UbfqGE2IRai0dfQ==
+"@scure/base@~1.1.0":
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938"
+ integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==
+
+"@scure/bip32@1.3.0":
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.0.tgz#6c8d980ef3f290987736acd0ee2e0f0d50068d87"
+ integrity sha512-bcKpo1oj54hGholplGLpqPHRbIsnbixFtc06nwuNM5/dwSXOq/AAYoIBRsBmnZJSdfeNW5rnff7NTAz3ZCqR9Q==
+ dependencies:
+ "@noble/curves" "~1.0.0"
+ "@noble/hashes" "~1.3.0"
+ "@scure/base" "~1.1.0"
+
+"@scure/bip39@1.2.0":
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.0.tgz#a207e2ef96de354de7d0002292ba1503538fc77b"
+ integrity sha512-SX/uKq52cuxm4YFXWFaVByaSHJh2w3BnokVSeUJVCv6K7WulT9u2BuNRBhuFl8vAuYnzx9bEu9WgpcNYTrYieg==
+ dependencies:
+ "@noble/hashes" "~1.3.0"
+ "@scure/base" "~1.1.0"
+
"@sideway/address@^4.1.3":
version "4.1.4"
resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0"
@@ -1863,9 +1916,14 @@
integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==
"@types/node@*":
- version "20.4.5"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.5.tgz#9dc0a5cb1ccce4f7a731660935ab70b9c00a5d69"
- integrity sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==
+ version "20.5.3"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.5.3.tgz#fa52c147f405d56b2f1dd8780d840aa87ddff629"
+ integrity sha512-ITI7rbWczR8a/S6qjAW7DMqxqFMjjTo61qZVWJ1ubPvbIQsL5D/TvwjYEalM8Kthpe3hTzOGrF2TGbAu2uyqeA==
+
+"@types/node@20.4.7":
+ version "20.4.7"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.7.tgz#74d323a93f1391a63477b27b9aec56669c98b2ab"
+ integrity sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==
"@types/normalize-package-data@^2.4.0":
version "2.4.1"
@@ -1892,6 +1950,13 @@
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c"
integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==
+"@types/ws@^8.5.4":
+ version "8.5.5"
+ resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.5.tgz#af587964aa06682702ee6dcbc7be41a80e4b28eb"
+ integrity sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==
+ dependencies:
+ "@types/node" "*"
+
"@types/yargs-parser@*":
version "21.0.0"
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b"
@@ -1981,6 +2046,11 @@
"@typescript-eslint/types" "4.33.0"
eslint-visitor-keys "^2.0.0"
+"@wagmi/chains@1.7.0":
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/@wagmi/chains/-/chains-1.7.0.tgz#8f6ad81cf867e1788417f7c978ca92bc083ecaf6"
+ integrity sha512-TKVeHv0GqP5sV1yQ8BDGYToAFezPnCexbbBpeH14x7ywi5a1dDStPffpt9x+ytE6LJWkZ6pAMs/HNWXBQ5Nqmw==
+
JSONStream@^1.0.4:
version "1.3.5"
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0"
@@ -1994,6 +2064,11 @@ abab@^2.0.3, abab@^2.0.5:
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291"
integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==
+abitype@0.9.3:
+ version "0.9.3"
+ resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.9.3.tgz#294d25288ee683d72baf4e1fed757034e3c8c277"
+ integrity sha512-dz4qCQLurx97FQhnb/EIYTk/ldQ+oafEDUqC0VVIeQS1Q48/YWt/9YNfMmp9SLFqN41ktxny3c8aYxHjmFIB/w==
+
acorn-globals@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45"
@@ -2293,7 +2368,7 @@ babel-plugin-jest-hoist@^27.5.1:
"@types/babel__core" "^7.0.0"
"@types/babel__traverse" "^7.0.6"
-babel-plugin-polyfill-corejs2@^0.4.4:
+babel-plugin-polyfill-corejs2@^0.4.5:
version "0.4.5"
resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.5.tgz#8097b4cb4af5b64a1d11332b6fb72ef5e64a054c"
integrity sha512-19hwUH5FKl49JEsvyTcoHakh6BE0wgXLLptIyKZ3PijHc/Ci521wygORCUCCred+E/twuqRyAkE02BAWPmsHOg==
@@ -2302,7 +2377,7 @@ babel-plugin-polyfill-corejs2@^0.4.4:
"@babel/helper-define-polyfill-provider" "^0.4.2"
semver "^6.3.1"
-babel-plugin-polyfill-corejs3@^0.8.2:
+babel-plugin-polyfill-corejs3@^0.8.3:
version "0.8.3"
resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.3.tgz#b4f719d0ad9bb8e0c23e3e630c0c8ec6dd7a1c52"
integrity sha512-z41XaniZL26WLrvjy7soabMXrfPWARN25PZoriDEiLMxAp50AUW3t35BGQUMg5xK3UrpVTtagIDklxYa+MhiNA==
@@ -2310,7 +2385,7 @@ babel-plugin-polyfill-corejs3@^0.8.2:
"@babel/helper-define-polyfill-provider" "^0.4.2"
core-js-compat "^3.31.0"
-babel-plugin-polyfill-regenerator@^0.5.1:
+babel-plugin-polyfill-regenerator@^0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.2.tgz#80d0f3e1098c080c8b5a65f41e9427af692dc326"
integrity sha512-tAlOptU0Xj34V1Y2PNTL4Y0FOJMDB6bZmoW39FeCQIhigGLkqu3Fj6uiXpxIf6Ij274ENdYx64y6Au+ZKlb1IA==
@@ -2348,6 +2423,11 @@ balanced-match@^1.0.0:
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
+base-x@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a"
+ integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==
+
base64-js@^1.3.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
@@ -2409,7 +2489,7 @@ browser-process-hrtime@^1.0.0:
resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626"
integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==
-browserslist@^4.21.9:
+browserslist@^4.21.10, browserslist@^4.21.9:
version "4.21.10"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.10.tgz#dbbac576628c13d3b2231332cb2ec5a46e015bb0"
integrity sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==
@@ -2426,6 +2506,13 @@ bs-logger@0.x:
dependencies:
fast-json-stable-stringify "2.x"
+bs58@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/bs58/-/bs58-5.0.0.tgz#865575b4d13c09ea2a84622df6c8cbeb54ffc279"
+ integrity sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==
+ dependencies:
+ base-x "^4.0.0"
+
bser@2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05"
@@ -2484,11 +2571,11 @@ camelcase@^6.2.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
caniuse-lite@^1.0.30001517:
- version "1.0.30001518"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001518.tgz#b3ca93904cb4699c01218246c4d77a71dbe97150"
- integrity sha512-rup09/e3I0BKjncL+FesTayKtPrdwKhUufQFd3riFw1hHg8JmIFoInYfB102cFcY/pPgGmdyl/iy+jgiDi2vdA==
+ version "1.0.30001522"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001522.tgz#44b87a406c901269adcdb834713e23582dd71856"
+ integrity sha512-TKiyTVZxJGhsTszLuzb+6vUZSjVOAhClszBr2Ta2k9IwtNBT/4dzmL6aywt0HCgEZlmwJzXJd8yNiob6HgwTRg==
-chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2:
+chalk@^2.4.1, chalk@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
@@ -2844,11 +2931,11 @@ convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0:
integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==
core-js-compat@^3.31.0:
- version "3.32.0"
- resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.32.0.tgz#f41574b6893ab15ddb0ac1693681bd56c8550a90"
- integrity sha512-7a9a3D1k4UCVKnLhrgALyFcP7YCsLOQIxPd0dKjf/6GuPcgyiGP70ewWdCGrSK7evyhymi0qO4EqCmSJofDeYw==
+ version "3.32.1"
+ resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.32.1.tgz#55f9a7d297c0761a8eb1d31b593e0f5b6ffae964"
+ integrity sha512-GSvKDv4wE0bPnQtjklV101juQ85g6H3rm5PDP20mqlS5j0kXF3pP97YvAu5hl+uFHqMictp3b2VxOHljWMAtuA==
dependencies:
- browserslist "^4.21.9"
+ browserslist "^4.21.10"
core-util-is@~1.0.0:
version "1.0.3"
@@ -3115,9 +3202,9 @@ dotgitignore@^2.1.0:
minimatch "^3.0.4"
electron-to-chromium@^1.4.477:
- version "1.4.480"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.480.tgz#40e32849ca50bc23ce29c1516c5adb3fddac919d"
- integrity sha512-IXTgg+bITkQv/FLP9FjX6f9KFCs5hQWeh5uNSKxB9mqYj/JXhHDbu+ekS43LVvbkL3eW6/oZy4+r9Om6lan1Uw==
+ version "1.4.499"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.499.tgz#dc36b67f4c8e273524e8d2080c5203a6a76987b6"
+ integrity sha512-0NmjlYBLKVHva4GABWAaHuPJolnDuL0AhV3h1hES6rcLCWEIbRL6/8TghfsVwkx6TEroQVdliX7+aLysUpKvjw==
elliptic@6.5.4:
version "6.5.4"
@@ -3286,13 +3373,13 @@ eslint-config-prettier@^6.11.0:
get-stdin "^6.0.0"
eslint-import-resolver-node@^0.3.7:
- version "0.3.7"
- resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7"
- integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==
+ version "0.3.9"
+ resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac"
+ integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==
dependencies:
debug "^3.2.7"
- is-core-module "^2.11.0"
- resolve "^1.22.1"
+ is-core-module "^2.13.0"
+ resolve "^1.22.4"
eslint-module-utils@^2.8.0:
version "2.8.0"
@@ -3310,9 +3397,9 @@ eslint-plugin-eslint-comments@^3.2.0:
ignore "^5.0.5"
eslint-plugin-import@^2.22.0:
- version "2.28.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.28.0.tgz#8d66d6925117b06c4018d491ae84469eb3cb1005"
- integrity sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q==
+ version "2.28.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz#63b8b5b3c409bfc75ebaf8fb206b07ab435482c4"
+ integrity sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==
dependencies:
array-includes "^3.1.6"
array.prototype.findlastindex "^1.2.2"
@@ -3323,13 +3410,12 @@ eslint-plugin-import@^2.22.0:
eslint-import-resolver-node "^0.3.7"
eslint-module-utils "^2.8.0"
has "^1.0.3"
- is-core-module "^2.12.1"
+ is-core-module "^2.13.0"
is-glob "^4.0.3"
minimatch "^3.1.2"
object.fromentries "^2.0.6"
object.groupby "^1.0.0"
object.values "^1.1.6"
- resolve "^1.22.3"
semver "^6.3.1"
tsconfig-paths "^3.14.2"
@@ -3454,7 +3540,7 @@ esutils@^2.0.2:
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
-ethers@^5.4.1:
+ethers@^5.4.1, ethers@^5.7.1:
version "5.7.2"
resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e"
integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==
@@ -3758,9 +3844,9 @@ fs.realpath@^1.0.0:
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
fsevents@^2.3.2:
- version "2.3.2"
- resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
- integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
+ integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
function-bind@^1.1.1:
version "1.1.1"
@@ -3955,9 +4041,9 @@ globals@^11.1.0:
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
globals@^13.6.0, globals@^13.9.0:
- version "13.20.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82"
- integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==
+ version "13.21.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-13.21.0.tgz#163aae12f34ef502f5153cfbdd3600f36c63c571"
+ integrity sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==
dependencies:
type-fest "^0.20.2"
@@ -4279,10 +4365,10 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7:
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==
-is-core-module@^2.11.0, is-core-module@^2.12.0, is-core-module@^2.12.1, is-core-module@^2.5.0:
- version "2.12.1"
- resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd"
- integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==
+is-core-module@^2.13.0, is-core-module@^2.5.0:
+ version "2.13.0"
+ resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db"
+ integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==
dependencies:
has "^1.0.3"
@@ -4477,6 +4563,11 @@ isexe@^2.0.0:
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
+isomorphic-ws@5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf"
+ integrity sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==
+
istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3"
@@ -6009,15 +6100,15 @@ regenerate@^1.4.2:
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==
-regenerator-runtime@^0.13.11:
- version "0.13.11"
- resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
- integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==
+regenerator-runtime@^0.14.0:
+ version "0.14.0"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45"
+ integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==
-regenerator-transform@^0.15.1:
- version "0.15.1"
- resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56"
- integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==
+regenerator-transform@^0.15.2:
+ version "0.15.2"
+ resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.2.tgz#5bbae58b522098ebdf09bca2f83838929001c7a4"
+ integrity sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==
dependencies:
"@babel/runtime" "^7.8.4"
@@ -6106,21 +6197,12 @@ resolve.exports@^1.1.0:
resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999"
integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ==
-resolve@^1.10.0, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.1:
- version "1.22.2"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f"
- integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==
- dependencies:
- is-core-module "^2.11.0"
- path-parse "^1.0.7"
- supports-preserve-symlinks-flag "^1.0.0"
-
-resolve@^1.22.3:
- version "1.22.3"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.3.tgz#4b4055349ffb962600972da1fdc33c46a4eb3283"
- integrity sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==
+resolve@^1.10.0, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.4:
+ version "1.22.4"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34"
+ integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==
dependencies:
- is-core-module "^2.12.0"
+ is-core-module "^2.13.0"
path-parse "^1.0.7"
supports-preserve-symlinks-flag "^1.0.0"
@@ -6781,9 +6863,9 @@ tslib@^1.8.1:
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tslib@^2.1.0:
- version "2.6.1"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410"
- integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==
+ version "2.6.2"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
+ integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
tsutils@^3.21.0:
version "3.21.0"
@@ -6917,16 +6999,11 @@ typedoc@^0.22.11:
minimatch "^5.1.0"
shiki "^0.10.1"
-"typescript@^4.6.4 || ^5.0.0":
+"typescript@^4.6.4 || ^5.0.0", typescript@^5.0.4:
version "5.1.6"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274"
integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==
-typescript@^4.7.0:
- version "4.9.5"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
- integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
-
typical@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4"
@@ -7029,9 +7106,9 @@ v8-compile-cache-lib@^3.0.1:
integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==
v8-compile-cache@^2.0.3:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
- integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz#cdada8bec61e15865f05d097c5f4fd30e94dc128"
+ integrity sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==
v8-to-istanbul@^8.1.0:
version "8.1.1"
@@ -7050,6 +7127,22 @@ validate-npm-package-license@^3.0.1:
spdx-correct "^3.0.0"
spdx-expression-parse "^3.0.0"
+viem@^1.6.7:
+ version "1.6.7"
+ resolved "https://registry.yarnpkg.com/viem/-/viem-1.6.7.tgz#2445ea47aae96f5bfc3b79ed08df20ce9530ca7a"
+ integrity sha512-w2OMJqKcQrzPQnmMFxe4ex+md8wSwfle6L3LvEi25CBvDKhkuljVrsWY19UzG05ssQhiZ+cdxU3YMBrX817Qiw==
+ dependencies:
+ "@adraffy/ens-normalize" "1.9.0"
+ "@noble/curves" "1.1.0"
+ "@noble/hashes" "1.3.0"
+ "@scure/bip32" "1.3.0"
+ "@scure/bip39" "1.2.0"
+ "@types/ws" "^8.5.4"
+ "@wagmi/chains" "1.7.0"
+ abitype "0.9.3"
+ isomorphic-ws "5.0.0"
+ ws "8.12.0"
+
vscode-oniguruma@^1.6.1:
version "1.7.0"
resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b"
@@ -7212,6 +7305,11 @@ ws@7.4.6:
resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c"
integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==
+ws@8.12.0:
+ version "8.12.0"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-8.12.0.tgz#485074cc392689da78e1828a9ff23585e06cddd8"
+ integrity sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig==
+
ws@^7.4.6:
version "7.5.9"
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591"