Add APY command

This commit is contained in:
Tornado Contrib 2024-11-17 00:42:59 +00:00
parent b2f31b4e43
commit b8ebf21cb4
Signed by: tornadocontrib
GPG Key ID: 60B4DF1A076C64B1
6 changed files with 7448 additions and 1561 deletions

8487
dist/cli.js vendored

File diff suppressed because one or more lines are too long

@ -1,5 +1,4 @@
import { BatchBlockOnProgress, BatchEventOnProgress, BaseTornadoService, BaseEncryptedNotesService, BaseGovernanceService, BaseRegistryService, BaseTornadoServiceConstructor, BaseEncryptedNotesServiceConstructor, BaseGovernanceServiceConstructor, BaseRegistryServiceConstructor, BaseEchoServiceConstructor, BaseEchoService, CachedRelayers } from '@tornado/core';
import type { BaseEvents, DepositsEvents, WithdrawalsEvents, EncryptedNotesEvents, RegistersEvents, AllGovernanceEvents, EchoEvents } from '@tornado/core';
import { BatchBlockOnProgress, BatchEventOnProgress, BaseTornadoService, BaseEncryptedNotesService, BaseGovernanceService, BaseRegistryService, BaseRevenueService, BaseTornadoServiceConstructor, BaseEncryptedNotesServiceConstructor, BaseGovernanceServiceConstructor, BaseRegistryServiceConstructor, BaseRevenueServiceConstructor, BaseEchoServiceConstructor, BaseEchoService, CachedRelayers, BaseEvents, DepositsEvents, WithdrawalsEvents, EncryptedNotesEvents, AllRelayerRegistryEvents, AllGovernanceEvents, EchoEvents, StakeBurnedEvents } from '@tornado/core';
import { TreeCache } from './treeCache';
export type NodeServiceConstructor = {
cacheDirectory: string;
@ -18,7 +17,6 @@ export declare class NodeTornadoService extends BaseTornadoService {
updateEventProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
updateTransactionProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
updateBlockProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
getEventsFromDB(): Promise<BaseEvents<DepositsEvents | WithdrawalsEvents>>;
getEventsFromCache(): Promise<import("@tornado/core").CachedEvents<DepositsEvents | WithdrawalsEvents>>;
validateEvents<S>({ events, lastBlock, hasNewEvents, }: BaseEvents<DepositsEvents | WithdrawalsEvents> & {
@ -32,7 +30,6 @@ export declare class NodeEchoService extends BaseEchoService {
userDirectory: string;
constructor(serviceConstructor: NodeEchoServiceConstructor);
updateEventProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
getEventsFromDB(): Promise<BaseEvents<EchoEvents>>;
getEventsFromCache(): Promise<import("@tornado/core").CachedEvents<EchoEvents>>;
saveEvents({ events, lastBlock }: BaseEvents<EchoEvents>): Promise<void>;
@ -43,7 +40,6 @@ export declare class NodeEncryptedNotesService extends BaseEncryptedNotesService
userDirectory: string;
constructor(serviceConstructor: NodeEncryptedNotesServiceConstructor);
updateEventProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
getEventsFromDB(): Promise<BaseEvents<EncryptedNotesEvents>>;
getEventsFromCache(): Promise<import("@tornado/core").CachedEvents<EncryptedNotesEvents>>;
saveEvents({ events, lastBlock }: BaseEvents<EncryptedNotesEvents>): Promise<void>;
@ -54,7 +50,6 @@ export declare class NodeGovernanceService extends BaseGovernanceService {
userDirectory: string;
constructor(serviceConstructor: NodeGovernanceServiceConstructor);
updateEventProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
updateTransactionProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
getEventsFromDB(): Promise<BaseEvents<AllGovernanceEvents>>;
getEventsFromCache(): Promise<import("@tornado/core").CachedEvents<AllGovernanceEvents>>;
@ -66,11 +61,22 @@ export declare class NodeRegistryService extends BaseRegistryService {
userDirectory: string;
constructor(serviceConstructor: NodeRegistryServiceConstructor);
updateEventProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
getEventsFromDB(): Promise<BaseEvents<RegistersEvents>>;
getEventsFromCache(): Promise<import("@tornado/core").CachedEvents<RegistersEvents>>;
saveEvents({ events, lastBlock }: BaseEvents<RegistersEvents>): Promise<void>;
getEventsFromDB(): Promise<BaseEvents<AllRelayerRegistryEvents>>;
getEventsFromCache(): Promise<import("@tornado/core").CachedEvents<AllRelayerRegistryEvents>>;
saveEvents({ events, lastBlock }: BaseEvents<AllRelayerRegistryEvents>): Promise<void>;
getRelayersFromDB(): Promise<CachedRelayers>;
getRelayersFromCache(): Promise<CachedRelayers>;
saveRelayers({ lastBlock, timestamp, relayers }: CachedRelayers): Promise<void>;
}
export type NodeRevenueServiceConstructor = BaseRevenueServiceConstructor & NodeServiceConstructor;
export declare class NodeRevenueService extends BaseRevenueService {
cacheDirectory: string;
userDirectory: string;
constructor(serviceConstructor: NodeRevenueServiceConstructor);
updateEventProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
updateTransactionProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
updateBlockProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
getEventsFromDB(): Promise<BaseEvents<StakeBurnedEvents>>;
getEventsFromCache(): Promise<import("@tornado/core").CachedEvents<StakeBurnedEvents>>;
saveEvents({ events, lastBlock }: BaseEvents<StakeBurnedEvents>): Promise<void>;
}

@ -30,7 +30,8 @@
"sign": "ts-node src/cli.ts sign",
"broadcast": "ts-node src/cli.ts broadcast",
"proposals": "ts-node src/cli.ts proposals",
"delegates": "ts-node src/cli.ts delegates"
"delegates": "ts-node src/cli.ts delegates",
"apy": "ts-node src/cli.ts apy"
},
"author": "",
"license": "MIT",
@ -53,7 +54,7 @@
"optionalDependencies": {},
"devDependencies": {
"@colors/colors": "^1.6.0",
"@tornado/core": "git+https://git.tornado.ws/tornadocontrib/tornado-core.git#f411159f15566cb0cfe46d07b1c2c4eb23af2e1f",
"@tornado/core": "git+https://git.tornado.ws/tornadocontrib/tornado-core.git#092989ebaa2fcd84eff7d4aed66433e77c790c60",
"@typechain/ethers-v6": "^0.5.1",
"@types/figlet": "^1.7.0",
"@typescript-eslint/eslint-plugin": "^8.11.0",

@ -14,6 +14,8 @@ import {
Aggregator__factory,
Governance__factory,
Echoer__factory,
TORN__factory,
GovernanceVaultUpgrade__factory,
} from '@tornado/contracts';
import {
JsonRpcProvider,
@ -88,6 +90,7 @@ import {
NodeEncryptedNotesService,
NodeGovernanceService,
TreeCache,
NodeRevenueService,
} from './services';
const EXEC_NAME = 'tornado-cli';
@ -226,7 +229,10 @@ export async function getProgramOptions(options: commonProgramOptions): Promise<
};
}
export function getProgramProvider(rpcUrl: string = '', providerOptions: getProviderOptions): Promise<JsonRpcProvider> {
export async function getProgramProvider(
rpcUrl: string = '',
providerOptions: getProviderOptions,
): Promise<JsonRpcProvider> {
const { netId } = providerOptions;
const config = getConfig(netId);
@ -235,7 +241,11 @@ export function getProgramProvider(rpcUrl: string = '', providerOptions: getProv
rpcUrl = Object.values(config.rpcUrls)[0]?.url || '';
}
return getProvider(rpcUrl, providerOptions);
const provider = await getProvider(rpcUrl, providerOptions);
console.log(`\nConnected with the ${config.networkName} RPC: ${provider._getConnection().url}\n`);
return provider;
}
export function getProgramSigner({
@ -271,7 +281,7 @@ export async function getProgramRelayer({
invalidRelayers: RelayerError[];
relayerClient: RelayerClient;
}> {
const { ethRpc, relayer } = options;
const { rpc, ethRpc, relayer } = options;
const netConfig = getConfig(netId);
@ -283,7 +293,9 @@ export async function getProgramRelayer({
constants: { REGISTRY_BLOCK },
} = ethConfig;
const provider = await getProgramProvider(ethRpc, {
const rpcUrl = netId === RELAYER_NETWORK ? rpc : ethRpc;
const provider = await getProgramProvider(rpcUrl, {
netId: RELAYER_NETWORK,
...fetchDataOptions,
});
@ -380,7 +392,7 @@ export async function getTovarishRelayer({
invalidRelayers: RelayerError[];
relayerClient: TovarishClient;
}> {
const { ethRpc, relayer } = options;
const { rpc, ethRpc, relayer } = options;
const netConfig = getConfig(netId);
@ -392,7 +404,9 @@ export async function getTovarishRelayer({
constants: { REGISTRY_BLOCK },
} = ethConfig;
const provider = await getProgramProvider(ethRpc, {
const rpcUrl = netId === RELAYER_NETWORK ? rpc : ethRpc;
const provider = await getProgramProvider(rpcUrl, {
netId: RELAYER_NETWORK,
...fetchDataOptions,
});
@ -1175,9 +1189,7 @@ export function tornadoProgram() {
let { fee, refund, proof, args } = await getProof();
const withdrawOverrides = {
from: !walletWithdrawal
? relayerClient?.selectedRelayer?.rewardAccount
: (signer?.address as string),
// from: !walletWithdrawal ? relayerClient?.selectedRelayer?.rewardAccount : (signer?.address as string),
value: args[5] || 0,
};
@ -1507,13 +1519,27 @@ export function tornadoProgram() {
relayerEnsSubdomains: getRelayerEnsSubdomains(),
deployedBlock: REGISTRY_BLOCK,
fetchDataOptions,
// Exclude tovarish relayer from updating registry events and use RPC directly
// tovarishClient,
tovarishClient,
cacheDirectory: EVENTS_DIR,
userDirectory: SAVED_DIR,
});
await registryService.updateEvents();
await registryService.updateRelayers();
const revenueService = new NodeRevenueService({
netId,
provider,
RelayerRegistry: RelayerRegistry__factory.connect(registryContract, provider),
deployedBlock: REGISTRY_BLOCK,
fetchDataOptions,
tovarishClient,
cacheDirectory: EVENTS_DIR,
userDirectory: SAVED_DIR,
});
await revenueService.updateEvents();
}
const echoService = new NodeEchoService({
@ -2537,6 +2563,124 @@ export function tornadoProgram() {
process.exit(0);
});
program
.command('apy')
.description('Calculate TORN Staking APY from last 30 days revenue')
.action(async (cmdOptions: commonProgramOptions) => {
const { options, fetchDataOptions } = await getProgramOptions(cmdOptions);
const { rpc, disableTovarish } = options;
const netId = RELAYER_NETWORK;
const provider = await getProgramProvider(rpc, {
netId,
...fetchDataOptions,
});
const config = getConfig(netId);
const {
tornContract,
governanceContract,
registryContract,
constants: { REGISTRY_BLOCK },
} = config;
const tovarishClient = !disableTovarish
? (
await getTovarishRelayer({
options,
fetchDataOptions,
netId,
})
).relayerClient
: undefined;
if (tovarishClient?.selectedRelayer) {
console.log(`\nConnected with Tovarish Relayer ${tovarishClient.selectedRelayer.url}\n`);
}
const revenueService = new NodeRevenueService({
netId,
provider,
RelayerRegistry: RelayerRegistry__factory.connect(registryContract as string, provider),
deployedBlock: REGISTRY_BLOCK,
fetchDataOptions,
tovarishClient,
cacheDirectory: EVENTS_DIR,
userDirectory: SAVED_DIR,
});
const Governance = GovernanceVaultUpgrade__factory.connect(governanceContract as string, provider);
const TORN = TORN__factory.connect(tornContract as string, provider);
const [stakedBalance, { events }] = await Promise.all([
Governance.userVault().then((vault) => TORN.balanceOf(vault)),
revenueService.updateEvents(),
]);
// Recent 30 days events
const recentEvents = events
.filter(({ timestamp }) => timestamp > Math.floor(Date.now() / 1000) - 30 * 86400)
.reverse();
const weeklyRevenue = recentEvents
.filter(({ timestamp }) => timestamp > Math.floor(Date.now() / 1000) - 7 * 86400)
.reduce((acc, { amountBurned }) => acc + BigInt(amountBurned), 0n);
const monthlyRevenue = recentEvents.reduce((acc, { amountBurned }) => acc + BigInt(amountBurned), 0n);
const weeklyYield = (Number(weeklyRevenue * 52n) / Number(stakedBalance)) * 100;
const monthlyYield = (Number(monthlyRevenue * 12n) / Number(stakedBalance)) * 100;
const statsTable = new Table();
statsTable.push(
[{ colSpan: 2, content: 'APY Stats', hAlign: 'center' }],
[
'Yield (from 7d income):',
`${weeklyYield.toFixed(5)}% (${Number(formatEther(weeklyRevenue)).toFixed(3)} TORN)`,
],
[
'Yield (from 30d income):',
`${monthlyYield.toFixed(5)}% (${Number(formatEther(monthlyRevenue)).toFixed(3)} TORN)`,
],
['Total Staked:', `${Number(formatEther(stakedBalance)).toFixed(3)} TORN`],
);
const apyTable = new Table();
apyTable.push(
[{ colSpan: 6, content: 'Recent Burns', hAlign: 'center' }],
['Block', 'Instance', 'Relayer', 'Relayer Fees', 'TORN Distributed', 'Timestamp'],
...recentEvents
.slice(0, 30)
.map(({ blockNumber, relayerAddress, amountBurned, instanceAddress, relayerFee, timestamp }) => {
const { amount, currency } = getInstanceByAddress(config, instanceAddress) as {
amount: string;
currency: string;
};
const { decimals } = config.tokens[currency];
return [
blockNumber,
`${amount} ${currency.toUpperCase()}`,
relayerAddress,
`${Number(formatUnits(relayerFee, decimals)).toFixed(5)} ${currency.toUpperCase()}`,
`${Number(formatEther(amountBurned)).toFixed(3)} TORN`,
moment.unix(timestamp).fromNow(),
];
}),
);
console.log('\n\n' + statsTable.toString() + '\n');
console.log('\n\n' + apyTable.toString() + '\n');
process.exit(0);
});
// common options
program.commands.forEach((cmd) => {
cmd.option('-r, --rpc <RPC_URL>', 'The RPC that CLI should interact with', parseUrl);

@ -9,25 +9,26 @@ import {
BaseEncryptedNotesService,
BaseGovernanceService,
BaseRegistryService,
BaseRevenueService,
BaseTornadoServiceConstructor,
BaseEncryptedNotesServiceConstructor,
BaseGovernanceServiceConstructor,
BaseRegistryServiceConstructor,
BaseRevenueServiceConstructor,
BaseEchoServiceConstructor,
BaseEchoService,
CachedRelayers,
toFixedHex,
} from '@tornado/core';
import type {
BaseEvents,
DepositsEvents,
WithdrawalsEvents,
EncryptedNotesEvents,
RegistersEvents,
AllRelayerRegistryEvents,
AllGovernanceEvents,
EchoEvents,
BaseEventsService,
MinimalEvents,
StakeBurnedEvents,
} from '@tornado/core';
import type { MerkleTree } from '@tornado/fixed-merkle-tree';
import { TreeCache } from './treeCache';
@ -161,19 +162,6 @@ export class NodeTornadoService extends BaseTornadoService {
}
}
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]) {
if (toBlock) {
console.log(`fromBlock - ${fromBlock}`);
console.log(`toBlock - ${toBlock}`);
if (count) {
console.log(`downloaded ${type} events from graph node count - ${count}`);
console.log('____________________________________________');
console.log(`Fetched ${type} events from graph node ${fromBlock} to ${toBlock}\n`);
}
}
}
async getEventsFromDB() {
return await getEventsFromDB<DepositsEvents | WithdrawalsEvents>(this);
}
@ -264,19 +252,6 @@ export class NodeEchoService extends BaseEchoService {
}
}
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]) {
if (toBlock) {
console.log(`fromBlock - ${fromBlock}`);
console.log(`toBlock - ${toBlock}`);
if (count) {
console.log(`downloaded ${type} events from graph node count - ${count}`);
console.log('____________________________________________');
console.log(`Fetched ${type} events from graph node ${fromBlock} to ${toBlock}\n`);
}
}
}
async getEventsFromDB() {
return await getEventsFromDB<EchoEvents>(this);
}
@ -335,19 +310,6 @@ export class NodeEncryptedNotesService extends BaseEncryptedNotesService {
}
}
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]) {
if (toBlock) {
console.log(`fromBlock - ${fromBlock}`);
console.log(`toBlock - ${toBlock}`);
if (count) {
console.log(`downloaded ${type} events from graph node count - ${count}`);
console.log('____________________________________________');
console.log(`Fetched ${type} events from graph node ${fromBlock} to ${toBlock}\n`);
}
}
}
async getEventsFromDB() {
return await getEventsFromDB<EncryptedNotesEvents>(this);
}
@ -406,19 +368,6 @@ export class NodeGovernanceService extends BaseGovernanceService {
}
}
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]) {
if (toBlock) {
console.log(`fromBlock - ${fromBlock}`);
console.log(`toBlock - ${toBlock}`);
if (count) {
console.log(`downloaded ${type} events from graph node count - ${count}`);
console.log('____________________________________________');
console.log(`Fetched ${type} events from graph node ${fromBlock} to ${toBlock}\n`);
}
}
}
updateTransactionProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]) {
if (totalIndex) {
console.log(`Fetched ${currentIndex} governance txs of ${totalIndex}`);
@ -483,32 +432,19 @@ export class NodeRegistryService extends BaseRegistryService {
}
}
updateGraphProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]) {
if (toBlock) {
console.log(`fromBlock - ${fromBlock}`);
console.log(`toBlock - ${toBlock}`);
if (count) {
console.log(`downloaded ${type} events from graph node count - ${count}`);
console.log('____________________________________________');
console.log(`Fetched ${type} events from graph node ${fromBlock} to ${toBlock}\n`);
}
}
}
async getEventsFromDB() {
return await getEventsFromDB<RegistersEvents>(this);
return await getEventsFromDB<AllRelayerRegistryEvents>(this);
}
async getEventsFromCache() {
return await getEventsFromCache<RegistersEvents>(this);
return await getEventsFromCache<AllRelayerRegistryEvents>(this);
}
async saveEvents({ events, lastBlock }: BaseEvents<RegistersEvents>) {
async saveEvents({ events, lastBlock }: BaseEvents<AllRelayerRegistryEvents>) {
const eventTable = new Table();
eventTable.push(
[{ colSpan: 2, content: 'Registered Relayers', hAlign: 'center' }],
[{ colSpan: 2, content: 'Relayer Registry', hAlign: 'center' }],
['Network', `${this.netId} chain`],
['Events', `${events.length} events`],
[{ colSpan: 2, content: 'Latest events' }],
@ -522,7 +458,7 @@ export class NodeRegistryService extends BaseRegistryService {
}),
);
await saveEvents<RegistersEvents>(this, { events, lastBlock }, eventTable);
await saveEvents<AllRelayerRegistryEvents>(this, { events, lastBlock }, eventTable);
}
async getRelayersFromDB(): Promise<CachedRelayers> {
@ -600,3 +536,73 @@ export class NodeRegistryService extends BaseRegistryService {
}
}
}
export type NodeRevenueServiceConstructor = BaseRevenueServiceConstructor & NodeServiceConstructor;
export class NodeRevenueService extends BaseRevenueService {
cacheDirectory: string;
userDirectory: string;
constructor(serviceConstructor: NodeRevenueServiceConstructor) {
super(serviceConstructor);
const { cacheDirectory, userDirectory } = serviceConstructor;
this.cacheDirectory = cacheDirectory;
this.userDirectory = userDirectory;
}
updateEventProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]) {
if (toBlock) {
console.log(`fromBlock - ${fromBlock}`);
console.log(`toBlock - ${toBlock}`);
if (count) {
console.log(`downloaded ${type} events count - ${count}`);
console.log('____________________________________________');
console.log(`Fetched ${type} events from ${fromBlock} to ${toBlock}\n`);
}
}
}
updateTransactionProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]) {
if (totalIndex) {
console.log(`Fetched ${currentIndex} txs of ${totalIndex}`);
}
}
updateBlockProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]) {
if (totalIndex) {
console.log(`Fetched ${currentIndex} blocks of ${totalIndex}`);
}
}
async getEventsFromDB() {
return await getEventsFromDB<StakeBurnedEvents>(this);
}
async getEventsFromCache() {
return await getEventsFromCache<StakeBurnedEvents>(this);
}
async saveEvents({ events, lastBlock }: BaseEvents<StakeBurnedEvents>) {
const eventTable = new Table();
eventTable.push(
[{ colSpan: 2, content: 'Stake Burned', hAlign: 'center' }],
['Network', `${this.netId} chain`],
['Events', `${events.length} events`],
[{ colSpan: 2, content: 'Latest events' }],
...events
.slice(events.length - 10)
.reverse()
.map(({ blockNumber }, index) => {
const eventIndex = events.length - index;
return [eventIndex, blockNumber];
}),
);
await saveEvents<StakeBurnedEvents>(this, { events, lastBlock }, eventTable);
}
}

171
yarn.lock

@ -52,6 +52,16 @@
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
"@ensdomains/content-hash@2.5.7":
version "2.5.7"
resolved "https://registry.yarnpkg.com/@ensdomains/content-hash/-/content-hash-2.5.7.tgz#180e4ceb6e585a05d69ba307619d4a0cf12948f1"
integrity sha512-WNdGKCeubMIAfyPYTMlKeX6cgXKIEo42OcWPOLBiclzJwMibkVqpaGgWKVH9dniJq7bLXLa2tQ0k/F1pt6gUxA==
dependencies:
cids "^1.1.5"
js-base64 "^3.6.0"
multicodec "^3.2.0"
multihashes "^2.0.0"
"@esbuild/aix-ppc64@0.21.5":
version "0.21.5"
resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f"
@ -680,6 +690,11 @@
semver "^7.5.4"
uuid "^9.0.1"
"@multiformats/base-x@^4.0.1":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@multiformats/base-x/-/base-x-4.0.1.tgz#95ff0fa58711789d53aefb2590a8b7a4e715d121"
integrity sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==
"@noble/curves@1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35"
@ -785,10 +800,11 @@
"@openzeppelin/contracts-v3" "npm:@openzeppelin/contracts@3.2.0-rc.0"
ethers "^6.13.4"
"@tornado/core@git+https://git.tornado.ws/tornadocontrib/tornado-core.git#f411159f15566cb0cfe46d07b1c2c4eb23af2e1f":
"@tornado/core@git+https://git.tornado.ws/tornadocontrib/tornado-core.git#092989ebaa2fcd84eff7d4aed66433e77c790c60":
version "1.0.19"
resolved "git+https://git.tornado.ws/tornadocontrib/tornado-core.git#f411159f15566cb0cfe46d07b1c2c4eb23af2e1f"
resolved "git+https://git.tornado.ws/tornadocontrib/tornado-core.git#092989ebaa2fcd84eff7d4aed66433e77c790c60"
dependencies:
"@ensdomains/content-hash" "2.5.7"
"@metamask/eth-sig-util" "^8.0.0"
"@tornado/contracts" "git+https://git.tornado.ws/tornadocontrib/tornado-contracts.git#1b1d707878c16a3dc60d295299d4f0e7ce6ba831"
"@tornado/fixed-merkle-tree" "^0.7.3"
@ -1139,6 +1155,11 @@
resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d"
integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==
"@zxing/text-encoding@0.9.0":
version "0.9.0"
resolved "https://registry.yarnpkg.com/@zxing/text-encoding/-/text-encoding-0.9.0.tgz#fb50ffabc6c7c66a0c96b4c03e3d9be74864b70b"
integrity sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==
acorn-import-attributes@^1.9.5:
version "1.9.5"
resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef"
@ -1367,6 +1388,18 @@ 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@^3.0.8:
version "3.0.10"
resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.10.tgz#62de58653f8762b5d6f8d9fe30fa75f7b2585a75"
integrity sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==
dependencies:
safe-buffer "^5.0.1"
base64-js@^1.3.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
bech32@1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9"
@ -1481,6 +1514,14 @@ buffer-from@^1.0.0:
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
buffer@^5.5.0, buffer@^5.6.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
dependencies:
base64-js "^1.3.1"
ieee754 "^1.1.13"
call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9"
@ -1554,6 +1595,16 @@ chrome-trace-event@^1.0.2:
resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz#05bffd7ff928465093314708c93bdfa9bd1f0f5b"
integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==
cids@^1.1.5:
version "1.1.9"
resolved "https://registry.yarnpkg.com/cids/-/cids-1.1.9.tgz#402c26db5c07059377bcd6fb82f2a24e7f2f4a4f"
integrity sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==
dependencies:
multibase "^4.0.1"
multicodec "^3.0.1"
multihashes "^4.0.1"
uint8arrays "^3.0.0"
circomlibjs@0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/circomlibjs/-/circomlibjs-0.1.7.tgz#9f5a7d9a23323744b11ee456b05b0cd81f48b554"
@ -2801,6 +2852,11 @@ idb@^8.0.0:
resolved "https://registry.yarnpkg.com/idb/-/idb-8.0.0.tgz#33d7ed894ed36e23bcb542fb701ad579bfaad41f"
integrity sha512-l//qvlAKGmQO31Qn7xdzagVPPaHTxXx199MhrAFuVBTPqydcPYBWjkrbv4Y0ktB+GmWOiwHl237UUOrLmQxLvw==
ieee754@^1.1.13:
version "1.2.1"
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
ignore@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
@ -2891,6 +2947,14 @@ ip-address@^9.0.5:
jsbn "1.1.0"
sprintf-js "^1.1.3"
is-arguments@^1.0.4:
version "1.1.1"
resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b"
integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==
dependencies:
call-bind "^1.0.2"
has-tostringtag "^1.0.0"
is-array-buffer@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98"
@ -2969,6 +3033,13 @@ is-fullwidth-code-point@^3.0.0:
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
is-generator-function@^1.0.7:
version "1.0.10"
resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72"
integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==
dependencies:
has-tostringtag "^1.0.0"
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
@ -3039,7 +3110,7 @@ is-symbol@^1.0.2, is-symbol@^1.0.3:
dependencies:
has-symbols "^1.0.2"
is-typed-array@^1.1.13:
is-typed-array@^1.1.13, is-typed-array@^1.1.3:
version "1.1.13"
resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229"
integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==
@ -3077,6 +3148,11 @@ jest-worker@^27.4.5:
merge-stream "^2.0.0"
supports-color "^8.0.0"
js-base64@^3.6.0:
version "3.7.7"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.7.tgz#e51b84bf78fbf5702b9541e2cb7bfcb893b43e79"
integrity sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==
js-sha3@0.8.0, js-sha3@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840"
@ -3371,6 +3447,54 @@ ms@^2.1.1, ms@^2.1.3:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
multibase@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/multibase/-/multibase-2.0.0.tgz#e20a2a14813fa435dc69c702909209ac0741919e"
integrity sha512-xIrqUVsinSlFjqj+OtEgCJ6MRl5hXjHMBPWsUt1ZGSRMx8rzm+7hCLE4wDeSA3COomlUC9zHCoUlvWjvAMtfDg==
dependencies:
base-x "^3.0.8"
buffer "^5.5.0"
web-encoding "^1.0.2"
multibase@^4.0.1:
version "4.0.6"
resolved "https://registry.yarnpkg.com/multibase/-/multibase-4.0.6.tgz#6e624341483d6123ca1ede956208cb821b440559"
integrity sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==
dependencies:
"@multiformats/base-x" "^4.0.1"
multicodec@^3.0.1, multicodec@^3.2.0:
version "3.2.1"
resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-3.2.1.tgz#82de3254a0fb163a107c1aab324f2a91ef51efb2"
integrity sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==
dependencies:
uint8arrays "^3.0.0"
varint "^6.0.0"
multiformats@^9.4.2:
version "9.9.0"
resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37"
integrity sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==
multihashes@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-2.0.0.tgz#4fa599d2d726ec6de33bf1e6f6d9f04b2351ace9"
integrity sha512-Mp94Y+7h3oWQx8JickVghlWR6VhRPDnlv/KZEUyNP0ISSkNEe3kQkWoyIGt1B45D6cTLoulg+MP6bugVewx32Q==
dependencies:
buffer "^5.6.0"
multibase "^2.0.0"
varint "^5.0.0"
web-encoding "^1.0.2"
multihashes@^4.0.1:
version "4.0.3"
resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-4.0.3.tgz#426610539cd2551edbf533adeac4c06b3b90fb05"
integrity sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==
dependencies:
multibase "^4.0.1"
uint8arrays "^3.0.0"
varint "^5.0.2"
mute-stream@0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
@ -3859,7 +3983,7 @@ safe-array-concat@^1.1.2:
has-symbols "^1.0.3"
isarray "^2.0.5"
safe-buffer@^5.1.0, safe-buffer@^5.2.0, safe-buffer@~5.2.0:
safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.2.0, safe-buffer@~5.2.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
@ -4446,6 +4570,13 @@ typical@^5.2.0:
resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066"
integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==
uint8arrays@^3.0.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0"
integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==
dependencies:
multiformats "^9.4.2"
unbox-primitive@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e"
@ -4486,6 +4617,17 @@ util-deprecate@^1.0.1:
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
util@^0.12.3:
version "0.12.5"
resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc"
integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==
dependencies:
inherits "^2.0.3"
is-arguments "^1.0.4"
is-generator-function "^1.0.7"
is-typed-array "^1.1.3"
which-typed-array "^1.1.2"
uuid@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30"
@ -4496,6 +4638,16 @@ v8-compile-cache-lib@^3.0.1:
resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"
integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==
varint@^5.0.0, varint@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4"
integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==
varint@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0"
integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==
wasmbuilder@0.0.16:
version "0.0.16"
resolved "https://registry.yarnpkg.com/wasmbuilder/-/wasmbuilder-0.0.16.tgz#f34c1f2c047d2f6e1065cbfec5603988f16d8549"
@ -4531,6 +4683,15 @@ watchpack@^2.4.1:
glob-to-regexp "^0.4.1"
graceful-fs "^4.1.2"
web-encoding@^1.0.2:
version "1.1.5"
resolved "https://registry.yarnpkg.com/web-encoding/-/web-encoding-1.1.5.tgz#fc810cf7667364a6335c939913f5051d3e0c4864"
integrity sha512-HYLeVCdJ0+lBYV2FvNZmv3HJ2Nt0QYXqZojk3d9FJOLkwnuhzM9tmamh8d7HPM8QqjKH8DeHkFTx+CFlWpZZDA==
dependencies:
util "^0.12.3"
optionalDependencies:
"@zxing/text-encoding" "0.9.0"
web-worker@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/web-worker/-/web-worker-1.2.0.tgz#5d85a04a7fbc1e7db58f66595d7a3ac7c9c180da"
@ -4640,7 +4801,7 @@ which-module@^2.0.0:
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409"
integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==
which-typed-array@^1.1.14, which-typed-array@^1.1.15:
which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.2:
version "1.1.15"
resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d"
integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==