From b37d23d04e5c44073d369893b8f1eefdc0ef06a3 Mon Sep 17 00:00:00 2001 From: anson Date: Wed, 5 Nov 2025 17:05:41 +0000 Subject: [PATCH 01/19] fix(artillery): align init helpers, state cache, and docs --- README.md | 44 ++++++++++++++++++++++++++ packages/artillery/src/StateManager.ts | 17 +++++++--- packages/artillery/src/init.ts | 7 ++-- 3 files changed, 61 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d73f77775..2d0998e23 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,50 @@ DIRECTORY_NAME=naga-local NETWORK=naga-local pnpm run test:e2e all ``` +# Artillery Load Testing + +Use the standalone Artillery project under `packages/artillery` to exercise Lit endpoints with realistic workloads. + +## Preparation + +```bash +# from the repo root +pnpm install + +# pick your target network: naga-dev | naga-staging | naga-test | naga-local +export NETWORK=naga-staging +export LOG_LEVEL=info # optional: debug | debug2 | silent +``` + +If you want Artillery Cloud reports, set `ARTILLERY_KEY=` in `.env` before running a scenario. + +## One-time initialisation + +Master account, auth data and PKP info are written to this file: +`packages/artillery/artillery-state.json`. + +```bash +pnpm nx run artillery:init +``` + +(optional) Check master balances before blasting a load test: + +```bash +pnpm nx run artillery:balance-status +``` + +## Run a workload + +Each scenario is exposed as an Nx target. Use the `run:` prefixed name: + +```bash +pnpm nx run artillery:run:pkp-sign # PKP signing focus +pnpm nx run artillery:run:encrypt-decrypt # Encryption/decryption focus +pnpm nx run artillery:run:execute # Lit Action execution +pnpm nx run artillery:run:mix # Mixed workload +pnpm nx run artillery:run:sign-session-key # Session key signing +``` + # Manual Publishing ```bash diff --git a/packages/artillery/src/StateManager.ts b/packages/artillery/src/StateManager.ts index 2b870fc6a..4f06d0a0c 100644 --- a/packages/artillery/src/StateManager.ts +++ b/packages/artillery/src/StateManager.ts @@ -24,7 +24,7 @@ export const readFile = async (): Promise => { // If content is empty object, write base state if (Object.keys(content).length === 0) { - await fs.writeFile(FILE_NAME, JSON.stringify(StateObject, null, 2)); + await fs.writeFile(FILE_NAME, stringify(StateObject)); return StateObject; } @@ -42,7 +42,7 @@ export const readFile = async (): Promise => { // create the file if it doesn't exist export const createFile = async () => { - await fs.writeFile(FILE_NAME, JSON.stringify(StateObject, null, 2)); + await fs.writeFile(FILE_NAME, stringify(StateObject)); }; // Type-safe field paths - dynamically derived from State type @@ -93,7 +93,7 @@ export const updateField = async ( state[rootKey] !== null ) { (state[rootKey] as any)[nestedKey] = value; - await fs.writeFile(FILE_NAME, JSON.stringify(state, null, 2)); + await fs.writeFile(FILE_NAME, stringify(state)); } else { throw new Error(`Invalid path: ${path}`); } @@ -123,7 +123,7 @@ export const getOrUpdate = async ( // Otherwise, update with default value and return it (state as any)[path] = defaultValue; - await fs.writeFile(FILE_NAME, JSON.stringify(state, null, 2)); + await fs.writeFile(FILE_NAME, stringify(state)); return defaultValue; } else { // Nested property @@ -144,10 +144,17 @@ export const getOrUpdate = async ( // Otherwise, update with default value and return it (state[rootKey] as any)[nestedKey] = defaultValue; - await fs.writeFile(FILE_NAME, JSON.stringify(state, null, 2)); + await fs.writeFile(FILE_NAME, stringify(state)); return defaultValue; } else { throw new Error(`Invalid path: ${path}`); } } }; + +const stringify = (value: unknown) => + JSON.stringify( + value, + (_, val) => (typeof val === 'bigint' ? val.toString() : val), + 2 + ); diff --git a/packages/artillery/src/init.ts b/packages/artillery/src/init.ts index 01c309dcd..f5c1b063d 100644 --- a/packages/artillery/src/init.ts +++ b/packages/artillery/src/init.ts @@ -6,8 +6,11 @@ import { } from '@lit-protocol/auth'; import * as StateManager from './StateManager'; import { createLitClient } from '@lit-protocol/lit-client'; -import { getOrCreatePkp } from '@lit-protocol/e2e/src/helper/pkp-utils'; -import * as NetworkManager from '@lit-protocol/e2e/src/helper/NetworkManager'; +import { + getOrCreatePkp, + getLitNetworkModule, + getViemPublicClient, +} from '@lit-protocol/e2e'; import * as AccountManager from '../src/AccountManager'; const _network = process.env['NETWORK']; From 7c9bc64ffe7f19e572a05757db3b214ae72ca938 Mon Sep 17 00:00:00 2001 From: anson Date: Wed, 5 Nov 2025 17:27:18 +0000 Subject: [PATCH 02/19] docs: update README with instructions for syncing contracts and configuring local network testing --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 2d0998e23..c6a6a1992 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,23 @@ export NETWORK=naga-staging export LOG_LEVEL=info # optional: debug | debug2 | silent ``` +For live networks that read ABI data from the `networks` repo (for example `naga-staging`), run the sync script before firing Artillery so the contracts and addresses are up to date: + +```bash +pnpm run sync:contracts # requires GH_API_KEY in your environment +``` + +Testing a custom local network? Point the runner at your generated `networkContext.json` and RPC URL. (/lit-assets/blockchain/contracts/networkContext.json) + +```ts +const networkModule = nagaLocal + .withLocalContext({ + networkContextPath: '/Users//Projects/lit-assets/blockchain/contracts/networkContext.json', + networkName: 'naga-local', + }) + .withOverrides({ rpcUrl: process.env.LOCAL_RPC_URL }); +``` + If you want Artillery Cloud reports, set `ARTILLERY_KEY=` in `.env` before running a scenario. ## One-time initialisation From facbbeb88ededd92496df27f6bd065aa22a8df8d Mon Sep 17 00:00:00 2001 From: anson Date: Wed, 5 Nov 2025 17:44:03 +0000 Subject: [PATCH 03/19] fmt --- tsconfig.base.json | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/tsconfig.base.json b/tsconfig.base.json index bbbf0fe05..3e4cc5d31 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -10,7 +10,11 @@ "importHelpers": true, "target": "ES2022", "module": "ES2022", - "lib": ["ES2022", "dom", "ES2021.String"], + "lib": [ + "ES2022", + "dom", + "ES2021.String" + ], "skipLibCheck": true, "skipDefaultLibCheck": true, "baseUrl": ".", @@ -18,10 +22,20 @@ "allowSyntheticDefaultImports": true, "resolveJsonModule": true, "paths": { - "@lit-protocol/*": ["packages/*/src"], - "@lit-protocol/contracts": ["packages/contracts/dist/index"], - "@lit-protocol/contracts/*": ["packages/contracts/dist/*"] + "@lit-protocol/*": [ + "packages/*/src" + ], + "@lit-protocol/contracts": [ + "packages/contracts/dist/index" + ], + "@lit-protocol/contracts/*": [ + "packages/contracts/dist/*" + ] } }, - "exclude": ["node_modules", "tmp", "dist"] -} + "exclude": [ + "node_modules", + "tmp", + "dist" + ] +} \ No newline at end of file From 09840cac5bf52450f22414e5f5f54042d7b00512 Mon Sep 17 00:00:00 2001 From: anson Date: Wed, 5 Nov 2025 17:49:34 +0000 Subject: [PATCH 04/19] fmt --- README.md | 5 +++-- tsconfig.base.json | 26 ++++++-------------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index c6a6a1992..4b176de29 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ NETWORK=naga-local pnpm run test:e2e all # Artillery Load Testing -Use the standalone Artillery project under `packages/artillery` to exercise Lit endpoints with realistic workloads. +Use the standalone Artillery project under `packages/artillery` ## Preparation @@ -125,7 +125,8 @@ Testing a custom local network? Point the runner at your generated `networkConte ```ts const networkModule = nagaLocal .withLocalContext({ - networkContextPath: '/Users//Projects/lit-assets/blockchain/contracts/networkContext.json', + networkContextPath: + '/Users//Projects/lit-assets/blockchain/contracts/networkContext.json', networkName: 'naga-local', }) .withOverrides({ rpcUrl: process.env.LOCAL_RPC_URL }); diff --git a/tsconfig.base.json b/tsconfig.base.json index 3e4cc5d31..bbbf0fe05 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -10,11 +10,7 @@ "importHelpers": true, "target": "ES2022", "module": "ES2022", - "lib": [ - "ES2022", - "dom", - "ES2021.String" - ], + "lib": ["ES2022", "dom", "ES2021.String"], "skipLibCheck": true, "skipDefaultLibCheck": true, "baseUrl": ".", @@ -22,20 +18,10 @@ "allowSyntheticDefaultImports": true, "resolveJsonModule": true, "paths": { - "@lit-protocol/*": [ - "packages/*/src" - ], - "@lit-protocol/contracts": [ - "packages/contracts/dist/index" - ], - "@lit-protocol/contracts/*": [ - "packages/contracts/dist/*" - ] + "@lit-protocol/*": ["packages/*/src"], + "@lit-protocol/contracts": ["packages/contracts/dist/index"], + "@lit-protocol/contracts/*": ["packages/contracts/dist/*"] } }, - "exclude": [ - "node_modules", - "tmp", - "dist" - ] -} \ No newline at end of file + "exclude": ["node_modules", "tmp", "dist"] +} From c16d12921fcdda0edb2c44423add3e9bd5d6eeb7 Mon Sep 17 00:00:00 2001 From: anson Date: Wed, 5 Nov 2025 18:17:46 +0000 Subject: [PATCH 05/19] chore(networks, naga-staging): sync contracts --- packages/contracts/dist/prod/naga-staging.cjs | 709 ++++++++++++------ packages/contracts/dist/prod/naga-staging.js | 709 ++++++++++++------ .../contracts/dist/prod/naga-staging.json | 709 ++++++++++++------ packages/contracts/dist/prod/naga-staging.ts | 709 ++++++++++++------ .../dist/signatures/naga-staging.cjs | 34 +- .../dist/signatures/naga-staging.d.ts | 34 +- .../contracts/dist/signatures/naga-staging.js | 34 +- 7 files changed, 2034 insertions(+), 904 deletions(-) diff --git a/packages/contracts/dist/prod/naga-staging.cjs b/packages/contracts/dist/prod/naga-staging.cjs index 7cb2af8bd..a37f96ca0 100644 --- a/packages/contracts/dist/prod/naga-staging.cjs +++ b/packages/contracts/dist/prod/naga-staging.cjs @@ -7,8 +7,8 @@ module.exports = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x781C6d227dA4D058890208B68DDA1da8f6EBbE54", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x9b8Ed3FD964Bc38dDc32CF637439e230CD50e3Dd", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -716,6 +716,11 @@ module.exports = { "name": "CannotModifyUnfrozen", "type": "error" }, + { + "inputs": [], + "name": "CannotMoveToLockedValidatorStateBeforeEpochEnds", + "type": "error" + }, { "inputs": [], "name": "CannotStakeZero", @@ -1433,6 +1438,11 @@ module.exports = { "internalType": "uint256", "name": "minThresholdToClampAt", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "voteToAdvanceTimeOut", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.GlobalConfig", @@ -2633,6 +2643,132 @@ module.exports = { "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "string", + "name": "identifier", + "type": "string" + } + ], + "name": "getKeySet", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "minimumThreshold", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "monetaryValue", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "completeIsolation", + "type": "bool" + }, + { + "internalType": "string", + "name": "identifier", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "uint256[]", + "name": "realms", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "curves", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "counts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "recoveryPartyMembers", + "type": "address[]" + } + ], + "internalType": "struct LibStakingStorage.KeySetConfig", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "keySets", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "minimumThreshold", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "monetaryValue", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "completeIsolation", + "type": "bool" + }, + { + "internalType": "string", + "name": "identifier", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "uint256[]", + "name": "realms", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "curves", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "counts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "recoveryPartyMembers", + "type": "address[]" + } + ], + "internalType": "struct LibStakingStorage.KeySetConfig[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -2693,6 +2829,47 @@ module.exports = { "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "string", + "name": "identifier", + "type": "string" + }, + { + "components": [ + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "keyType", + "type": "uint256" + } + ], + "internalType": "struct IPubkeyRouter.RootKey[]", + "name": "newRootKeys", + "type": "tuple[]" + } + ], + "name": "verifyKeySetCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "ActiveValidatorsCannotLeave", @@ -3309,6 +3486,19 @@ module.exports = { "name": "StakingTokenSet", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "realmId", + "type": "uint256" + } + ], + "name": "VoteToAdvanceTimeOutElapsed", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -3373,25 +3563,6 @@ module.exports = { "stateMutability": "pure", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "attestedAddress", - "type": "address" - } - ], - "name": "getAttestedPubKey", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -4094,6 +4265,11 @@ module.exports = { "internalType": "uint256", "name": "startTime", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastAdvanceVoteTime", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.Epoch", @@ -4285,6 +4461,11 @@ module.exports = { "internalType": "uint256", "name": "startTime", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastAdvanceVoteTime", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.Epoch", @@ -4442,6 +4623,25 @@ module.exports = { "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "attestedAddress", + "type": "address" + } + ], + "name": "getAttestedPubKey", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -4490,72 +4690,6 @@ module.exports = { "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "string", - "name": "identifier", - "type": "string" - } - ], - "name": "getKeySet", - "outputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "minimumThreshold", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "monetaryValue", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "completeIsolation", - "type": "bool" - }, - { - "internalType": "string", - "name": "identifier", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256[]", - "name": "realms", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "curves", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "counts", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "recoveryPartyMembers", - "type": "address[]" - } - ], - "internalType": "struct LibStakingStorage.KeySetConfig", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "getKeyTypes", @@ -5962,6 +6096,11 @@ module.exports = { "internalType": "uint256", "name": "minThresholdToClampAt", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "voteToAdvanceTimeOut", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.GlobalConfig", @@ -6142,73 +6281,13 @@ module.exports = { "name": "validator", "type": "address" } - ], - "name": "isValidatorBanned", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "keySets", - "outputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "minimumThreshold", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "monetaryValue", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "completeIsolation", - "type": "bool" - }, - { - "internalType": "string", - "name": "identifier", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256[]", - "name": "realms", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "curves", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "counts", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "recoveryPartyMembers", - "type": "address[]" - } - ], - "internalType": "struct LibStakingStorage.KeySetConfig[]", + ], + "name": "isValidatorBanned", + "outputs": [ + { + "internalType": "bool", "name": "", - "type": "tuple[]" + "type": "bool" } ], "stateMutability": "view", @@ -6784,47 +6863,6 @@ module.exports = { ], "stateMutability": "view", "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "identifier", - "type": "string" - }, - { - "components": [ - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "keyType", - "type": "uint256" - } - ], - "internalType": "struct IPubkeyRouter.RootKey[]", - "name": "newRootKeys", - "type": "tuple[]" - } - ], - "name": "verifyKeySetCounts", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" } ] } @@ -6835,8 +6873,8 @@ module.exports = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x2001821a222713becB50B5976691AD723D6b640c", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xbD866A743E52825E6FeEF341fc857ad5A1d28ed2", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "anonymous": false, @@ -6974,7 +7012,7 @@ module.exports = { { "network": "naga-staging", "address_hash": "0x5E8db2E7af793f4095c4843C8cBD87C5D8604838", - "inserted_at": "2025-09-17T01:07:56Z", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -8027,8 +8065,8 @@ module.exports = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x280E5c534629FBdD4dC61c85695143B6ACc4790b", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xE37847746012c756d5D91d37B311eeB8e59684e9", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -8781,6 +8819,78 @@ module.exports = { "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "ethAddresses", + "type": "address[]" + } + ], + "name": "getPkpInfoFromEthAddresses", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "getPkpInfoFromTokenIds", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getPkpNftAddress", @@ -9089,8 +9199,8 @@ module.exports = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x991d56EdC98a0DAeb93E91F70588598f79875701", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x92d2a4Acb70E498a486E0523AD42fF3F6d3D3642", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -9835,6 +9945,170 @@ module.exports = { "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "ethAddresses", + "type": "address[]" + } + ], + "name": "getPkpInfoFromEthAddresses", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pageIndex", + "type": "uint256" + } + ], + "name": "getPkpInfoFromOwnerAddress", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pageIndex", + "type": "uint256" + } + ], + "name": "getPkpInfoFromOwnerTokenId", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "getPkpInfoFromTokenIds", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getPkpNftMetadataAddress", @@ -10353,8 +10627,8 @@ module.exports = { "contracts": [ { "network": "naga-staging", - "address_hash": "0xe51357Cc58E8a718423CBa09b87879Ff7B18d279", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xe97fFbc4eDa5CdF70375D4b8f87e476D40b628EC", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -11368,8 +11642,8 @@ module.exports = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x5632B35374DD73205B5aeBBcA3ecB02B3dc8B5fe", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x1E382ef3957218423C6e1a992a4cE6294861cC93", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -12703,8 +12977,8 @@ module.exports = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x3346125bdaE8FDda08aaf14A67A7DdE465e8b7A6", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xA5c9163C3E127b5F956CE3e1b1D7429988aF2248", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -12867,8 +13141,8 @@ module.exports = { "contracts": [ { "network": "naga-staging", - "address_hash": "0xab292EC22a0b596F115725607Ada3F28980eAB36", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x7a286929c167e6FA0298C05Dec2433F4723Eb86C", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [], @@ -13104,8 +13378,8 @@ module.exports = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x700DB831292541C640c5Dbb9AaE1697faE188513", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x13fC0864A37B38D3C2A7d5E9C08D5124B9Cec4bF", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -13740,8 +14014,8 @@ module.exports = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x658F5ED32aE5EFBf79F7Ba36A9FA770FeA7662c8", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x23Be686cAFCe69C5Fb075E2be7a4505598E338E8", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -14796,8 +15070,8 @@ module.exports = { "contracts": [ { "network": "naga-staging", - "address_hash": "0xB76744dC73AFC416e8cDbB7023ca89C862B86F05", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x651d3282E1F083036Bb136dBbe7df17aCC39A330", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -15195,11 +15469,6 @@ module.exports = { "name": "CallerNotOwner", "type": "error" }, - { - "inputs": [], - "name": "MustBeLessThan100", - "type": "error" - }, { "inputs": [], "name": "MustBeNonzero", diff --git a/packages/contracts/dist/prod/naga-staging.js b/packages/contracts/dist/prod/naga-staging.js index 7b94e7aa6..a2c26875b 100644 --- a/packages/contracts/dist/prod/naga-staging.js +++ b/packages/contracts/dist/prod/naga-staging.js @@ -5,8 +5,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x781C6d227dA4D058890208B68DDA1da8f6EBbE54", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x9b8Ed3FD964Bc38dDc32CF637439e230CD50e3Dd", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -714,6 +714,11 @@ export const nagaStaging = { "name": "CannotModifyUnfrozen", "type": "error" }, + { + "inputs": [], + "name": "CannotMoveToLockedValidatorStateBeforeEpochEnds", + "type": "error" + }, { "inputs": [], "name": "CannotStakeZero", @@ -1431,6 +1436,11 @@ export const nagaStaging = { "internalType": "uint256", "name": "minThresholdToClampAt", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "voteToAdvanceTimeOut", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.GlobalConfig", @@ -2631,6 +2641,132 @@ export const nagaStaging = { "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "string", + "name": "identifier", + "type": "string" + } + ], + "name": "getKeySet", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "minimumThreshold", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "monetaryValue", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "completeIsolation", + "type": "bool" + }, + { + "internalType": "string", + "name": "identifier", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "uint256[]", + "name": "realms", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "curves", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "counts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "recoveryPartyMembers", + "type": "address[]" + } + ], + "internalType": "struct LibStakingStorage.KeySetConfig", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "keySets", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "minimumThreshold", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "monetaryValue", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "completeIsolation", + "type": "bool" + }, + { + "internalType": "string", + "name": "identifier", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "uint256[]", + "name": "realms", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "curves", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "counts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "recoveryPartyMembers", + "type": "address[]" + } + ], + "internalType": "struct LibStakingStorage.KeySetConfig[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -2691,6 +2827,47 @@ export const nagaStaging = { "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "string", + "name": "identifier", + "type": "string" + }, + { + "components": [ + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "keyType", + "type": "uint256" + } + ], + "internalType": "struct IPubkeyRouter.RootKey[]", + "name": "newRootKeys", + "type": "tuple[]" + } + ], + "name": "verifyKeySetCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "ActiveValidatorsCannotLeave", @@ -3307,6 +3484,19 @@ export const nagaStaging = { "name": "StakingTokenSet", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "realmId", + "type": "uint256" + } + ], + "name": "VoteToAdvanceTimeOutElapsed", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -3371,25 +3561,6 @@ export const nagaStaging = { "stateMutability": "pure", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "attestedAddress", - "type": "address" - } - ], - "name": "getAttestedPubKey", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -4092,6 +4263,11 @@ export const nagaStaging = { "internalType": "uint256", "name": "startTime", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastAdvanceVoteTime", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.Epoch", @@ -4283,6 +4459,11 @@ export const nagaStaging = { "internalType": "uint256", "name": "startTime", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastAdvanceVoteTime", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.Epoch", @@ -4440,6 +4621,25 @@ export const nagaStaging = { "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "attestedAddress", + "type": "address" + } + ], + "name": "getAttestedPubKey", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -4488,72 +4688,6 @@ export const nagaStaging = { "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "string", - "name": "identifier", - "type": "string" - } - ], - "name": "getKeySet", - "outputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "minimumThreshold", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "monetaryValue", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "completeIsolation", - "type": "bool" - }, - { - "internalType": "string", - "name": "identifier", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256[]", - "name": "realms", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "curves", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "counts", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "recoveryPartyMembers", - "type": "address[]" - } - ], - "internalType": "struct LibStakingStorage.KeySetConfig", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "getKeyTypes", @@ -5960,6 +6094,11 @@ export const nagaStaging = { "internalType": "uint256", "name": "minThresholdToClampAt", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "voteToAdvanceTimeOut", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.GlobalConfig", @@ -6140,73 +6279,13 @@ export const nagaStaging = { "name": "validator", "type": "address" } - ], - "name": "isValidatorBanned", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "keySets", - "outputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "minimumThreshold", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "monetaryValue", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "completeIsolation", - "type": "bool" - }, - { - "internalType": "string", - "name": "identifier", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256[]", - "name": "realms", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "curves", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "counts", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "recoveryPartyMembers", - "type": "address[]" - } - ], - "internalType": "struct LibStakingStorage.KeySetConfig[]", + ], + "name": "isValidatorBanned", + "outputs": [ + { + "internalType": "bool", "name": "", - "type": "tuple[]" + "type": "bool" } ], "stateMutability": "view", @@ -6782,47 +6861,6 @@ export const nagaStaging = { ], "stateMutability": "view", "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "identifier", - "type": "string" - }, - { - "components": [ - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "keyType", - "type": "uint256" - } - ], - "internalType": "struct IPubkeyRouter.RootKey[]", - "name": "newRootKeys", - "type": "tuple[]" - } - ], - "name": "verifyKeySetCounts", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" } ] } @@ -6833,8 +6871,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x2001821a222713becB50B5976691AD723D6b640c", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xbD866A743E52825E6FeEF341fc857ad5A1d28ed2", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "anonymous": false, @@ -6972,7 +7010,7 @@ export const nagaStaging = { { "network": "naga-staging", "address_hash": "0x5E8db2E7af793f4095c4843C8cBD87C5D8604838", - "inserted_at": "2025-09-17T01:07:56Z", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -8025,8 +8063,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x280E5c534629FBdD4dC61c85695143B6ACc4790b", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xE37847746012c756d5D91d37B311eeB8e59684e9", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -8779,6 +8817,78 @@ export const nagaStaging = { "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "ethAddresses", + "type": "address[]" + } + ], + "name": "getPkpInfoFromEthAddresses", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "getPkpInfoFromTokenIds", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getPkpNftAddress", @@ -9087,8 +9197,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x991d56EdC98a0DAeb93E91F70588598f79875701", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x92d2a4Acb70E498a486E0523AD42fF3F6d3D3642", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -9833,6 +9943,170 @@ export const nagaStaging = { "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "ethAddresses", + "type": "address[]" + } + ], + "name": "getPkpInfoFromEthAddresses", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pageIndex", + "type": "uint256" + } + ], + "name": "getPkpInfoFromOwnerAddress", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pageIndex", + "type": "uint256" + } + ], + "name": "getPkpInfoFromOwnerTokenId", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "getPkpInfoFromTokenIds", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getPkpNftMetadataAddress", @@ -10351,8 +10625,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0xe51357Cc58E8a718423CBa09b87879Ff7B18d279", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xe97fFbc4eDa5CdF70375D4b8f87e476D40b628EC", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -11366,8 +11640,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x5632B35374DD73205B5aeBBcA3ecB02B3dc8B5fe", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x1E382ef3957218423C6e1a992a4cE6294861cC93", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -12701,8 +12975,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x3346125bdaE8FDda08aaf14A67A7DdE465e8b7A6", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xA5c9163C3E127b5F956CE3e1b1D7429988aF2248", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -12865,8 +13139,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0xab292EC22a0b596F115725607Ada3F28980eAB36", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x7a286929c167e6FA0298C05Dec2433F4723Eb86C", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [], @@ -13102,8 +13376,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x700DB831292541C640c5Dbb9AaE1697faE188513", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x13fC0864A37B38D3C2A7d5E9C08D5124B9Cec4bF", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -13738,8 +14012,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x658F5ED32aE5EFBf79F7Ba36A9FA770FeA7662c8", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x23Be686cAFCe69C5Fb075E2be7a4505598E338E8", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -14794,8 +15068,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0xB76744dC73AFC416e8cDbB7023ca89C862B86F05", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x651d3282E1F083036Bb136dBbe7df17aCC39A330", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -15193,11 +15467,6 @@ export const nagaStaging = { "name": "CallerNotOwner", "type": "error" }, - { - "inputs": [], - "name": "MustBeLessThan100", - "type": "error" - }, { "inputs": [], "name": "MustBeNonzero", diff --git a/packages/contracts/dist/prod/naga-staging.json b/packages/contracts/dist/prod/naga-staging.json index 311336f02..2759f9248 100644 --- a/packages/contracts/dist/prod/naga-staging.json +++ b/packages/contracts/dist/prod/naga-staging.json @@ -5,8 +5,8 @@ "contracts": [ { "network": "naga-staging", - "address_hash": "0x781C6d227dA4D058890208B68DDA1da8f6EBbE54", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x9b8Ed3FD964Bc38dDc32CF637439e230CD50e3Dd", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -714,6 +714,11 @@ "name": "CannotModifyUnfrozen", "type": "error" }, + { + "inputs": [], + "name": "CannotMoveToLockedValidatorStateBeforeEpochEnds", + "type": "error" + }, { "inputs": [], "name": "CannotStakeZero", @@ -1431,6 +1436,11 @@ "internalType": "uint256", "name": "minThresholdToClampAt", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "voteToAdvanceTimeOut", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.GlobalConfig", @@ -2631,6 +2641,132 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "string", + "name": "identifier", + "type": "string" + } + ], + "name": "getKeySet", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "minimumThreshold", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "monetaryValue", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "completeIsolation", + "type": "bool" + }, + { + "internalType": "string", + "name": "identifier", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "uint256[]", + "name": "realms", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "curves", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "counts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "recoveryPartyMembers", + "type": "address[]" + } + ], + "internalType": "struct LibStakingStorage.KeySetConfig", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "keySets", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "minimumThreshold", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "monetaryValue", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "completeIsolation", + "type": "bool" + }, + { + "internalType": "string", + "name": "identifier", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "uint256[]", + "name": "realms", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "curves", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "counts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "recoveryPartyMembers", + "type": "address[]" + } + ], + "internalType": "struct LibStakingStorage.KeySetConfig[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -2691,6 +2827,47 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "string", + "name": "identifier", + "type": "string" + }, + { + "components": [ + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "keyType", + "type": "uint256" + } + ], + "internalType": "struct IPubkeyRouter.RootKey[]", + "name": "newRootKeys", + "type": "tuple[]" + } + ], + "name": "verifyKeySetCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "ActiveValidatorsCannotLeave", @@ -3307,6 +3484,19 @@ "name": "StakingTokenSet", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "realmId", + "type": "uint256" + } + ], + "name": "VoteToAdvanceTimeOutElapsed", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -3371,25 +3561,6 @@ "stateMutability": "pure", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "attestedAddress", - "type": "address" - } - ], - "name": "getAttestedPubKey", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -4092,6 +4263,11 @@ "internalType": "uint256", "name": "startTime", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastAdvanceVoteTime", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.Epoch", @@ -4283,6 +4459,11 @@ "internalType": "uint256", "name": "startTime", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastAdvanceVoteTime", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.Epoch", @@ -4440,6 +4621,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "attestedAddress", + "type": "address" + } + ], + "name": "getAttestedPubKey", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -4488,72 +4688,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "string", - "name": "identifier", - "type": "string" - } - ], - "name": "getKeySet", - "outputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "minimumThreshold", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "monetaryValue", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "completeIsolation", - "type": "bool" - }, - { - "internalType": "string", - "name": "identifier", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256[]", - "name": "realms", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "curves", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "counts", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "recoveryPartyMembers", - "type": "address[]" - } - ], - "internalType": "struct LibStakingStorage.KeySetConfig", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "getKeyTypes", @@ -5960,6 +6094,11 @@ "internalType": "uint256", "name": "minThresholdToClampAt", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "voteToAdvanceTimeOut", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.GlobalConfig", @@ -6140,73 +6279,13 @@ "name": "validator", "type": "address" } - ], - "name": "isValidatorBanned", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "keySets", - "outputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "minimumThreshold", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "monetaryValue", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "completeIsolation", - "type": "bool" - }, - { - "internalType": "string", - "name": "identifier", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256[]", - "name": "realms", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "curves", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "counts", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "recoveryPartyMembers", - "type": "address[]" - } - ], - "internalType": "struct LibStakingStorage.KeySetConfig[]", + ], + "name": "isValidatorBanned", + "outputs": [ + { + "internalType": "bool", "name": "", - "type": "tuple[]" + "type": "bool" } ], "stateMutability": "view", @@ -6782,47 +6861,6 @@ ], "stateMutability": "view", "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "identifier", - "type": "string" - }, - { - "components": [ - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "keyType", - "type": "uint256" - } - ], - "internalType": "struct IPubkeyRouter.RootKey[]", - "name": "newRootKeys", - "type": "tuple[]" - } - ], - "name": "verifyKeySetCounts", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" } ] } @@ -6833,8 +6871,8 @@ "contracts": [ { "network": "naga-staging", - "address_hash": "0x2001821a222713becB50B5976691AD723D6b640c", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xbD866A743E52825E6FeEF341fc857ad5A1d28ed2", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "anonymous": false, @@ -6972,7 +7010,7 @@ { "network": "naga-staging", "address_hash": "0x5E8db2E7af793f4095c4843C8cBD87C5D8604838", - "inserted_at": "2025-09-17T01:07:56Z", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -8025,8 +8063,8 @@ "contracts": [ { "network": "naga-staging", - "address_hash": "0x280E5c534629FBdD4dC61c85695143B6ACc4790b", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xE37847746012c756d5D91d37B311eeB8e59684e9", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -8779,6 +8817,78 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "ethAddresses", + "type": "address[]" + } + ], + "name": "getPkpInfoFromEthAddresses", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "getPkpInfoFromTokenIds", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getPkpNftAddress", @@ -9087,8 +9197,8 @@ "contracts": [ { "network": "naga-staging", - "address_hash": "0x991d56EdC98a0DAeb93E91F70588598f79875701", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x92d2a4Acb70E498a486E0523AD42fF3F6d3D3642", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -9833,6 +9943,170 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "ethAddresses", + "type": "address[]" + } + ], + "name": "getPkpInfoFromEthAddresses", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pageIndex", + "type": "uint256" + } + ], + "name": "getPkpInfoFromOwnerAddress", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pageIndex", + "type": "uint256" + } + ], + "name": "getPkpInfoFromOwnerTokenId", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "getPkpInfoFromTokenIds", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getPkpNftMetadataAddress", @@ -10351,8 +10625,8 @@ "contracts": [ { "network": "naga-staging", - "address_hash": "0xe51357Cc58E8a718423CBa09b87879Ff7B18d279", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xe97fFbc4eDa5CdF70375D4b8f87e476D40b628EC", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -11366,8 +11640,8 @@ "contracts": [ { "network": "naga-staging", - "address_hash": "0x5632B35374DD73205B5aeBBcA3ecB02B3dc8B5fe", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x1E382ef3957218423C6e1a992a4cE6294861cC93", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -12701,8 +12975,8 @@ "contracts": [ { "network": "naga-staging", - "address_hash": "0x3346125bdaE8FDda08aaf14A67A7DdE465e8b7A6", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xA5c9163C3E127b5F956CE3e1b1D7429988aF2248", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -12865,8 +13139,8 @@ "contracts": [ { "network": "naga-staging", - "address_hash": "0xab292EC22a0b596F115725607Ada3F28980eAB36", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x7a286929c167e6FA0298C05Dec2433F4723Eb86C", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [], @@ -13102,8 +13376,8 @@ "contracts": [ { "network": "naga-staging", - "address_hash": "0x700DB831292541C640c5Dbb9AaE1697faE188513", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x13fC0864A37B38D3C2A7d5E9C08D5124B9Cec4bF", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -13738,8 +14012,8 @@ "contracts": [ { "network": "naga-staging", - "address_hash": "0x658F5ED32aE5EFBf79F7Ba36A9FA770FeA7662c8", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x23Be686cAFCe69C5Fb075E2be7a4505598E338E8", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -14794,8 +15068,8 @@ "contracts": [ { "network": "naga-staging", - "address_hash": "0xB76744dC73AFC416e8cDbB7023ca89C862B86F05", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x651d3282E1F083036Bb136dBbe7df17aCC39A330", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -15193,11 +15467,6 @@ "name": "CallerNotOwner", "type": "error" }, - { - "inputs": [], - "name": "MustBeLessThan100", - "type": "error" - }, { "inputs": [], "name": "MustBeNonzero", diff --git a/packages/contracts/dist/prod/naga-staging.ts b/packages/contracts/dist/prod/naga-staging.ts index 6f4367047..c5ae737d7 100644 --- a/packages/contracts/dist/prod/naga-staging.ts +++ b/packages/contracts/dist/prod/naga-staging.ts @@ -5,8 +5,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x781C6d227dA4D058890208B68DDA1da8f6EBbE54", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x9b8Ed3FD964Bc38dDc32CF637439e230CD50e3Dd", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -714,6 +714,11 @@ export const nagaStaging = { "name": "CannotModifyUnfrozen", "type": "error" }, + { + "inputs": [], + "name": "CannotMoveToLockedValidatorStateBeforeEpochEnds", + "type": "error" + }, { "inputs": [], "name": "CannotStakeZero", @@ -1431,6 +1436,11 @@ export const nagaStaging = { "internalType": "uint256", "name": "minThresholdToClampAt", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "voteToAdvanceTimeOut", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.GlobalConfig", @@ -2631,6 +2641,132 @@ export const nagaStaging = { "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "string", + "name": "identifier", + "type": "string" + } + ], + "name": "getKeySet", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "minimumThreshold", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "monetaryValue", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "completeIsolation", + "type": "bool" + }, + { + "internalType": "string", + "name": "identifier", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "uint256[]", + "name": "realms", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "curves", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "counts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "recoveryPartyMembers", + "type": "address[]" + } + ], + "internalType": "struct LibStakingStorage.KeySetConfig", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "keySets", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "minimumThreshold", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "monetaryValue", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "completeIsolation", + "type": "bool" + }, + { + "internalType": "string", + "name": "identifier", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "uint256[]", + "name": "realms", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "curves", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "counts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "recoveryPartyMembers", + "type": "address[]" + } + ], + "internalType": "struct LibStakingStorage.KeySetConfig[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -2691,6 +2827,47 @@ export const nagaStaging = { "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "string", + "name": "identifier", + "type": "string" + }, + { + "components": [ + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "keyType", + "type": "uint256" + } + ], + "internalType": "struct IPubkeyRouter.RootKey[]", + "name": "newRootKeys", + "type": "tuple[]" + } + ], + "name": "verifyKeySetCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "ActiveValidatorsCannotLeave", @@ -3307,6 +3484,19 @@ export const nagaStaging = { "name": "StakingTokenSet", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "realmId", + "type": "uint256" + } + ], + "name": "VoteToAdvanceTimeOutElapsed", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -3371,25 +3561,6 @@ export const nagaStaging = { "stateMutability": "pure", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "attestedAddress", - "type": "address" - } - ], - "name": "getAttestedPubKey", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -4092,6 +4263,11 @@ export const nagaStaging = { "internalType": "uint256", "name": "startTime", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastAdvanceVoteTime", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.Epoch", @@ -4283,6 +4459,11 @@ export const nagaStaging = { "internalType": "uint256", "name": "startTime", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastAdvanceVoteTime", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.Epoch", @@ -4440,6 +4621,25 @@ export const nagaStaging = { "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "attestedAddress", + "type": "address" + } + ], + "name": "getAttestedPubKey", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -4488,72 +4688,6 @@ export const nagaStaging = { "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "string", - "name": "identifier", - "type": "string" - } - ], - "name": "getKeySet", - "outputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "minimumThreshold", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "monetaryValue", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "completeIsolation", - "type": "bool" - }, - { - "internalType": "string", - "name": "identifier", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256[]", - "name": "realms", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "curves", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "counts", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "recoveryPartyMembers", - "type": "address[]" - } - ], - "internalType": "struct LibStakingStorage.KeySetConfig", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "getKeyTypes", @@ -5960,6 +6094,11 @@ export const nagaStaging = { "internalType": "uint256", "name": "minThresholdToClampAt", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "voteToAdvanceTimeOut", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.GlobalConfig", @@ -6140,73 +6279,13 @@ export const nagaStaging = { "name": "validator", "type": "address" } - ], - "name": "isValidatorBanned", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "keySets", - "outputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "minimumThreshold", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "monetaryValue", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "completeIsolation", - "type": "bool" - }, - { - "internalType": "string", - "name": "identifier", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256[]", - "name": "realms", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "curves", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "counts", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "recoveryPartyMembers", - "type": "address[]" - } - ], - "internalType": "struct LibStakingStorage.KeySetConfig[]", + ], + "name": "isValidatorBanned", + "outputs": [ + { + "internalType": "bool", "name": "", - "type": "tuple[]" + "type": "bool" } ], "stateMutability": "view", @@ -6782,47 +6861,6 @@ export const nagaStaging = { ], "stateMutability": "view", "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "identifier", - "type": "string" - }, - { - "components": [ - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "keyType", - "type": "uint256" - } - ], - "internalType": "struct IPubkeyRouter.RootKey[]", - "name": "newRootKeys", - "type": "tuple[]" - } - ], - "name": "verifyKeySetCounts", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" } ] } @@ -6833,8 +6871,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x2001821a222713becB50B5976691AD723D6b640c", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xbD866A743E52825E6FeEF341fc857ad5A1d28ed2", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "anonymous": false, @@ -6972,7 +7010,7 @@ export const nagaStaging = { { "network": "naga-staging", "address_hash": "0x5E8db2E7af793f4095c4843C8cBD87C5D8604838", - "inserted_at": "2025-09-17T01:07:56Z", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -8025,8 +8063,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x280E5c534629FBdD4dC61c85695143B6ACc4790b", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xE37847746012c756d5D91d37B311eeB8e59684e9", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -8779,6 +8817,78 @@ export const nagaStaging = { "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "ethAddresses", + "type": "address[]" + } + ], + "name": "getPkpInfoFromEthAddresses", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "getPkpInfoFromTokenIds", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getPkpNftAddress", @@ -9087,8 +9197,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x991d56EdC98a0DAeb93E91F70588598f79875701", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x92d2a4Acb70E498a486E0523AD42fF3F6d3D3642", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -9833,6 +9943,170 @@ export const nagaStaging = { "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "ethAddresses", + "type": "address[]" + } + ], + "name": "getPkpInfoFromEthAddresses", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pageIndex", + "type": "uint256" + } + ], + "name": "getPkpInfoFromOwnerAddress", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pageIndex", + "type": "uint256" + } + ], + "name": "getPkpInfoFromOwnerTokenId", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "getPkpInfoFromTokenIds", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "address", + "name": "ethAddress", + "type": "address" + } + ], + "internalType": "struct LibPubkeyRouterStorage.PkpInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getPkpNftMetadataAddress", @@ -10351,8 +10625,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0xe51357Cc58E8a718423CBa09b87879Ff7B18d279", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xe97fFbc4eDa5CdF70375D4b8f87e476D40b628EC", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -11366,8 +11640,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x5632B35374DD73205B5aeBBcA3ecB02B3dc8B5fe", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x1E382ef3957218423C6e1a992a4cE6294861cC93", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -12701,8 +12975,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x3346125bdaE8FDda08aaf14A67A7DdE465e8b7A6", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0xA5c9163C3E127b5F956CE3e1b1D7429988aF2248", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -12865,8 +13139,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0xab292EC22a0b596F115725607Ada3F28980eAB36", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x7a286929c167e6FA0298C05Dec2433F4723Eb86C", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [], @@ -13102,8 +13376,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x700DB831292541C640c5Dbb9AaE1697faE188513", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x13fC0864A37B38D3C2A7d5E9C08D5124B9Cec4bF", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -13738,8 +14012,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0x658F5ED32aE5EFBf79F7Ba36A9FA770FeA7662c8", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x23Be686cAFCe69C5Fb075E2be7a4505598E338E8", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -14794,8 +15068,8 @@ export const nagaStaging = { "contracts": [ { "network": "naga-staging", - "address_hash": "0xB76744dC73AFC416e8cDbB7023ca89C862B86F05", - "inserted_at": "2025-09-17T01:07:56Z", + "address_hash": "0x651d3282E1F083036Bb136dBbe7df17aCC39A330", + "inserted_at": "2025-11-04T01:39:03Z", "ABI": [ { "inputs": [ @@ -15193,11 +15467,6 @@ export const nagaStaging = { "name": "CallerNotOwner", "type": "error" }, - { - "inputs": [], - "name": "MustBeLessThan100", - "type": "error" - }, { "inputs": [], "name": "MustBeNonzero", diff --git a/packages/contracts/dist/signatures/naga-staging.cjs b/packages/contracts/dist/signatures/naga-staging.cjs index 2aa12ebd5..3b4f3c5df 100644 --- a/packages/contracts/dist/signatures/naga-staging.cjs +++ b/packages/contracts/dist/signatures/naga-staging.cjs @@ -5,7 +5,7 @@ const signatures = { "Staking": { - "address": "0x781C6d227dA4D058890208B68DDA1da8f6EBbE54", + "address": "0x9b8Ed3FD964Bc38dDc32CF637439e230CD50e3Dd", "methods": { "getActiveUnkickedValidatorStructsAndCounts": { "inputs": [ @@ -58,6 +58,11 @@ const signatures = { "internalType": "uint256", "name": "startTime", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastAdvanceVoteTime", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.Epoch", @@ -956,6 +961,19 @@ const signatures = { "name": "StakingTokenSet", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "realmId", + "type": "uint256" + } + ], + "name": "VoteToAdvanceTimeOutElapsed", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -1032,7 +1050,7 @@ const signatures = { ] }, "PubkeyRouter": { - "address": "0x280E5c534629FBdD4dC61c85695143B6ACc4790b", + "address": "0xE37847746012c756d5D91d37B311eeB8e59684e9", "methods": { "deriveEthAddressFromPubkey": { "inputs": [ @@ -1343,7 +1361,7 @@ const signatures = { ] }, "PKPNFT": { - "address": "0x991d56EdC98a0DAeb93E91F70588598f79875701", + "address": "0x92d2a4Acb70E498a486E0523AD42fF3F6d3D3642", "methods": { "claimAndMint": { "inputs": [ @@ -1733,7 +1751,7 @@ const signatures = { ] }, "PKPHelper": { - "address": "0xe51357Cc58E8a718423CBa09b87879Ff7B18d279", + "address": "0xe97fFbc4eDa5CdF70375D4b8f87e476D40b628EC", "methods": { "claimAndMintNextAndAddAuthMethodsWithTypes": { "inputs": [ @@ -2016,7 +2034,7 @@ const signatures = { ] }, "PKPPermissions": { - "address": "0x5632B35374DD73205B5aeBBcA3ecB02B3dc8B5fe", + "address": "0x1E382ef3957218423C6e1a992a4cE6294861cC93", "methods": { "addPermittedAction": { "inputs": [ @@ -2634,7 +2652,7 @@ const signatures = { ] }, "PaymentDelegation": { - "address": "0x700DB831292541C640c5Dbb9AaE1697faE188513", + "address": "0x13fC0864A37B38D3C2A7d5E9C08D5124B9Cec4bF", "methods": { "delegatePayments": { "inputs": [ @@ -2935,7 +2953,7 @@ const signatures = { ] }, "Ledger": { - "address": "0x658F5ED32aE5EFBf79F7Ba36A9FA770FeA7662c8", + "address": "0x23Be686cAFCe69C5Fb075E2be7a4505598E338E8", "methods": { "withdraw": { "inputs": [ @@ -3354,7 +3372,7 @@ const signatures = { ] }, "PriceFeed": { - "address": "0xB76744dC73AFC416e8cDbB7023ca89C862B86F05", + "address": "0x651d3282E1F083036Bb136dBbe7df17aCC39A330", "methods": { "getNodesForRequest": { "inputs": [ diff --git a/packages/contracts/dist/signatures/naga-staging.d.ts b/packages/contracts/dist/signatures/naga-staging.d.ts index 139c06c6c..ee805588f 100644 --- a/packages/contracts/dist/signatures/naga-staging.d.ts +++ b/packages/contracts/dist/signatures/naga-staging.d.ts @@ -5,7 +5,7 @@ export const signatures = { "Staking": { - "address": "0x781C6d227dA4D058890208B68DDA1da8f6EBbE54", + "address": "0x9b8Ed3FD964Bc38dDc32CF637439e230CD50e3Dd", "methods": { "getActiveUnkickedValidatorStructsAndCounts": { "inputs": [ @@ -58,6 +58,11 @@ export const signatures = { "internalType": "uint256", "name": "startTime", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastAdvanceVoteTime", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.Epoch", @@ -956,6 +961,19 @@ export const signatures = { "name": "StakingTokenSet", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "realmId", + "type": "uint256" + } + ], + "name": "VoteToAdvanceTimeOutElapsed", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -1032,7 +1050,7 @@ export const signatures = { ] }, "PubkeyRouter": { - "address": "0x280E5c534629FBdD4dC61c85695143B6ACc4790b", + "address": "0xE37847746012c756d5D91d37B311eeB8e59684e9", "methods": { "deriveEthAddressFromPubkey": { "inputs": [ @@ -1343,7 +1361,7 @@ export const signatures = { ] }, "PKPNFT": { - "address": "0x991d56EdC98a0DAeb93E91F70588598f79875701", + "address": "0x92d2a4Acb70E498a486E0523AD42fF3F6d3D3642", "methods": { "claimAndMint": { "inputs": [ @@ -1733,7 +1751,7 @@ export const signatures = { ] }, "PKPHelper": { - "address": "0xe51357Cc58E8a718423CBa09b87879Ff7B18d279", + "address": "0xe97fFbc4eDa5CdF70375D4b8f87e476D40b628EC", "methods": { "claimAndMintNextAndAddAuthMethodsWithTypes": { "inputs": [ @@ -2016,7 +2034,7 @@ export const signatures = { ] }, "PKPPermissions": { - "address": "0x5632B35374DD73205B5aeBBcA3ecB02B3dc8B5fe", + "address": "0x1E382ef3957218423C6e1a992a4cE6294861cC93", "methods": { "addPermittedAction": { "inputs": [ @@ -2634,7 +2652,7 @@ export const signatures = { ] }, "PaymentDelegation": { - "address": "0x700DB831292541C640c5Dbb9AaE1697faE188513", + "address": "0x13fC0864A37B38D3C2A7d5E9C08D5124B9Cec4bF", "methods": { "delegatePayments": { "inputs": [ @@ -2935,7 +2953,7 @@ export const signatures = { ] }, "Ledger": { - "address": "0x658F5ED32aE5EFBf79F7Ba36A9FA770FeA7662c8", + "address": "0x23Be686cAFCe69C5Fb075E2be7a4505598E338E8", "methods": { "withdraw": { "inputs": [ @@ -3354,7 +3372,7 @@ export const signatures = { ] }, "PriceFeed": { - "address": "0xB76744dC73AFC416e8cDbB7023ca89C862B86F05", + "address": "0x651d3282E1F083036Bb136dBbe7df17aCC39A330", "methods": { "getNodesForRequest": { "inputs": [ diff --git a/packages/contracts/dist/signatures/naga-staging.js b/packages/contracts/dist/signatures/naga-staging.js index ea43e368f..67224fbc6 100644 --- a/packages/contracts/dist/signatures/naga-staging.js +++ b/packages/contracts/dist/signatures/naga-staging.js @@ -5,7 +5,7 @@ export const signatures = { "Staking": { - "address": "0x781C6d227dA4D058890208B68DDA1da8f6EBbE54", + "address": "0x9b8Ed3FD964Bc38dDc32CF637439e230CD50e3Dd", "methods": { "getActiveUnkickedValidatorStructsAndCounts": { "inputs": [ @@ -58,6 +58,11 @@ export const signatures = { "internalType": "uint256", "name": "startTime", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastAdvanceVoteTime", + "type": "uint256" } ], "internalType": "struct LibStakingStorage.Epoch", @@ -956,6 +961,19 @@ export const signatures = { "name": "StakingTokenSet", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "realmId", + "type": "uint256" + } + ], + "name": "VoteToAdvanceTimeOutElapsed", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -1032,7 +1050,7 @@ export const signatures = { ] }, "PubkeyRouter": { - "address": "0x280E5c534629FBdD4dC61c85695143B6ACc4790b", + "address": "0xE37847746012c756d5D91d37B311eeB8e59684e9", "methods": { "deriveEthAddressFromPubkey": { "inputs": [ @@ -1343,7 +1361,7 @@ export const signatures = { ] }, "PKPNFT": { - "address": "0x991d56EdC98a0DAeb93E91F70588598f79875701", + "address": "0x92d2a4Acb70E498a486E0523AD42fF3F6d3D3642", "methods": { "claimAndMint": { "inputs": [ @@ -1733,7 +1751,7 @@ export const signatures = { ] }, "PKPHelper": { - "address": "0xe51357Cc58E8a718423CBa09b87879Ff7B18d279", + "address": "0xe97fFbc4eDa5CdF70375D4b8f87e476D40b628EC", "methods": { "claimAndMintNextAndAddAuthMethodsWithTypes": { "inputs": [ @@ -2016,7 +2034,7 @@ export const signatures = { ] }, "PKPPermissions": { - "address": "0x5632B35374DD73205B5aeBBcA3ecB02B3dc8B5fe", + "address": "0x1E382ef3957218423C6e1a992a4cE6294861cC93", "methods": { "addPermittedAction": { "inputs": [ @@ -2634,7 +2652,7 @@ export const signatures = { ] }, "PaymentDelegation": { - "address": "0x700DB831292541C640c5Dbb9AaE1697faE188513", + "address": "0x13fC0864A37B38D3C2A7d5E9C08D5124B9Cec4bF", "methods": { "delegatePayments": { "inputs": [ @@ -2935,7 +2953,7 @@ export const signatures = { ] }, "Ledger": { - "address": "0x658F5ED32aE5EFBf79F7Ba36A9FA770FeA7662c8", + "address": "0x23Be686cAFCe69C5Fb075E2be7a4505598E338E8", "methods": { "withdraw": { "inputs": [ @@ -3354,7 +3372,7 @@ export const signatures = { ] }, "PriceFeed": { - "address": "0xB76744dC73AFC416e8cDbB7023ca89C862B86F05", + "address": "0x651d3282E1F083036Bb136dBbe7df17aCC39A330", "methods": { "getNodesForRequest": { "inputs": [ From ff3f665fc3f52770dacd2667b503f042163a2522 Mon Sep 17 00:00:00 2001 From: anson Date: Thu, 6 Nov 2025 16:50:14 +0000 Subject: [PATCH 06/19] fix(artillery): update commands to use ARTILLERY_KEY from .env and handle key recording --- packages/artillery/README.md | 6 ++++-- packages/artillery/project.json | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/artillery/README.md b/packages/artillery/README.md index 5f5c6b34c..f9489f009 100644 --- a/packages/artillery/README.md +++ b/packages/artillery/README.md @@ -73,6 +73,8 @@ nx run artillery:sign-session-key Generating a report required an API key, you can add that to the root `.env` file. You can find your key at [https://app.artillery.io/](https://app.artillery.io/oivpr8dw4i00f) -```jsx -ARTILLERY_KEY = xxx; +```bash +ARTILLERY_KEY=xxx ``` + +> â„šī¸ The Nx run targets pass `ARTILLERY_KEY` to `artillery run` via `--key`, so no extra flags are needed when running the scripts. diff --git a/packages/artillery/project.json b/packages/artillery/project.json index 824478ee4..34b837c52 100644 --- a/packages/artillery/project.json +++ b/packages/artillery/project.json @@ -22,35 +22,35 @@ "executor": "nx:run-commands", "options": { "cwd": "{projectRoot}", - "command": "artillery run configs/pkp-sign.yml" + "command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/pkp-sign.yml; else artillery run configs/pkp-sign.yml; fi'" } }, "run:encrypt-decrypt": { "executor": "nx:run-commands", "options": { "cwd": "{projectRoot}", - "command": "artillery run configs/encrypt-decrypt.yml" + "command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/encrypt-decrypt.yml; else artillery run configs/encrypt-decrypt.yml; fi'" } }, "run:execute": { "executor": "nx:run-commands", "options": { "cwd": "{projectRoot}", - "command": "artillery run configs/execute.yml" + "command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/execute.yml; else artillery run configs/execute.yml; fi'" } }, "run:mix": { "executor": "nx:run-commands", "options": { "cwd": "{projectRoot}", - "command": "artillery run configs/mix.yml" + "command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/mix.yml; else artillery run configs/mix.yml; fi'" } }, "run:sign-session-key": { "executor": "nx:run-commands", "options": { "cwd": "{projectRoot}", - "command": "artillery run configs/sign-session-key.yml" + "command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/sign-session-key.yml; else artillery run configs/sign-session-key.yml; fi'" } } }, From daae8cf4048c4954da6460694f3e37180faa6afa Mon Sep 17 00:00:00 2001 From: Howard Tam Date: Wed, 5 Nov 2025 11:19:55 -0800 Subject: [PATCH 07/19] Add naga-staging --- packages/e2e/src/helper/createEnvVars.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/e2e/src/helper/createEnvVars.ts b/packages/e2e/src/helper/createEnvVars.ts index 1e2c0bb38..0f52852fb 100644 --- a/packages/e2e/src/helper/createEnvVars.ts +++ b/packages/e2e/src/helper/createEnvVars.ts @@ -1,4 +1,9 @@ -const supportedNetworks = ['naga-local', 'naga-test', 'naga-dev'] as const; +const supportedNetworks = [ + 'naga-local', + 'naga-test', + 'naga-staging', + 'naga-dev', +] as const; type EnvName = 'local' | 'live'; export type EnvVars = { @@ -71,7 +76,11 @@ export function createEnvVars(): EnvVars { } // -- live networks - if (network === 'naga-dev' || network === 'naga-test') { + if ( + network === 'naga-dev' || + network === 'naga-test' || + network === 'naga-staging' + ) { const liveRpcUrl = process.env['LIT_YELLOWSTONE_PRIVATE_RPC_URL']; if (liveRpcUrl) { From bc098d07e363f4335941748c4fbfb316c7b88b36 Mon Sep 17 00:00:00 2001 From: Howard Tam Date: Wed, 5 Nov 2025 11:35:34 -0800 Subject: [PATCH 08/19] Changes from PR#924 --- packages/artillery/configs/sign-session-key.yml | 8 +++----- packages/artillery/src/init.ts | 2 +- packages/artillery/src/processors/multi-endpoints.ts | 12 ++++++++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/artillery/configs/sign-session-key.yml b/packages/artillery/configs/sign-session-key.yml index 28c46a8f8..d9dbb32f7 100644 --- a/packages/artillery/configs/sign-session-key.yml +++ b/packages/artillery/configs/sign-session-key.yml @@ -4,17 +4,15 @@ config: # Over 60s, ramp up to creating 50 vusers per second - duration: 60 arrivalRate: 5 - # rampTo: 50 - rampTo: 10 + rampTo: 150 name: 'Ramp Up' # Over 300s, create 50 vusers per second - duration: 300 - # arrivalRate: 50 - arrivalRate: 10 + arrivalRate: 150 name: 'Sustained Sign Session Key' # Over 60s, ramp down to creating 5 vusers per second - duration: 60 - arrivalRate: 5 + arrivalRate: 20 name: 'Ramp Down' processor: '../src/processors/multi-endpoints.ts' diff --git a/packages/artillery/src/init.ts b/packages/artillery/src/init.ts index f5c1b063d..f7b31b304 100644 --- a/packages/artillery/src/init.ts +++ b/packages/artillery/src/init.ts @@ -17,7 +17,7 @@ const _network = process.env['NETWORK']; // CONFIGURATIONS const REJECT_BALANCE_THRESHOLD = 0; -const LEDGER_MINIMUM_BALANCE = 20000; +const LEDGER_MINIMUM_BALANCE = 10000; (async () => { // -- Start diff --git a/packages/artillery/src/processors/multi-endpoints.ts b/packages/artillery/src/processors/multi-endpoints.ts index 7a17c8aa5..a1d17e660 100644 --- a/packages/artillery/src/processors/multi-endpoints.ts +++ b/packages/artillery/src/processors/multi-endpoints.ts @@ -112,7 +112,7 @@ const createAuthContextFromState = async () => { ['access-control-condition-decryption', '*'], ], capabilityAuthSigs: [], - expiration: new Date(Date.now() + 1000 * 60 * 15).toISOString(), + expiration: new Date(Date.now() + 1000 * 60 * 30).toISOString(), }, litClient: litClient, }); @@ -166,7 +166,15 @@ export async function runPkpSignTest() { ); // Throw the error to let Artillery handle it - throw error; + // Handle specific errors to aggregate them + if ( + error instanceof Error && + error.message.includes('unable to get signature share') + ) { + throw new Error('"PKP Sign" failed. unable to get signature share.'); + } else { + throw error; + } } } From ffb4adb4c5fa7fbed7093618a6b3a992f21adb87 Mon Sep 17 00:00:00 2001 From: Howard Tam Date: Wed, 5 Nov 2025 12:25:11 -0800 Subject: [PATCH 09/19] Fix field --- packages/artillery/src/processors/multi-endpoints.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/artillery/src/processors/multi-endpoints.ts b/packages/artillery/src/processors/multi-endpoints.ts index a1d17e660..248290690 100644 --- a/packages/artillery/src/processors/multi-endpoints.ts +++ b/packages/artillery/src/processors/multi-endpoints.ts @@ -140,7 +140,7 @@ export async function runPkpSignTest() { // Perform pkpSign operation const result = await litClient.chain.ethereum.pkpSign({ authContext: authContext, - pubKey: state.masterAccount.pkp.publicKey, + pubKey: state.masterAccount.pkp.pubkey, toSign: `Hello from Artillery! ${Date.now()}`, // Unique message per request // userMaxPrice: 1000000000000000000n, }); @@ -280,7 +280,7 @@ export async function runExecuteJSTest() { message: 'Test message from e2e executeJs', sigName: 'e2e-test-sig', toSign: 'Test message from e2e executeJs', - publicKey: state.masterAccount.pkp.publicKey, + publicKey: state.masterAccount.pkp.pubkey, }, }); From a3e698325d5d197ba9b03c08bd869fb29548bcea Mon Sep 17 00:00:00 2001 From: Howard Tam Date: Wed, 5 Nov 2025 14:35:17 -0800 Subject: [PATCH 10/19] Use ARTILLERY_KEY if present --- packages/artillery/project.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/artillery/project.json b/packages/artillery/project.json index 34b837c52..7bf26f670 100644 --- a/packages/artillery/project.json +++ b/packages/artillery/project.json @@ -22,35 +22,35 @@ "executor": "nx:run-commands", "options": { "cwd": "{projectRoot}", - "command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/pkp-sign.yml; else artillery run configs/pkp-sign.yml; fi'" + "command": "artillery run configs/pkp-sign.yml $([ -n \"$ARTILLERY_KEY\" ] && echo \"--record --key $ARTILLERY_KEY\")" } }, "run:encrypt-decrypt": { "executor": "nx:run-commands", "options": { "cwd": "{projectRoot}", - "command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/encrypt-decrypt.yml; else artillery run configs/encrypt-decrypt.yml; fi'" + "command": "artillery run configs/encrypt-decrypt.yml $([ -n \"$ARTILLERY_KEY\" ] && echo \"--record --key $ARTILLERY_KEY\")" } }, "run:execute": { "executor": "nx:run-commands", "options": { "cwd": "{projectRoot}", - "command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/execute.yml; else artillery run configs/execute.yml; fi'" + "command": "artillery run configs/execute.yml $([ -n \"$ARTILLERY_KEY\" ] && echo \"--record --key $ARTILLERY_KEY\")" } }, "run:mix": { "executor": "nx:run-commands", "options": { "cwd": "{projectRoot}", - "command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/mix.yml; else artillery run configs/mix.yml; fi'" + "command": "artillery run configs/mix.yml $([ -n \"$ARTILLERY_KEY\" ] && echo \"--record --key $ARTILLERY_KEY\")" } }, "run:sign-session-key": { "executor": "nx:run-commands", "options": { "cwd": "{projectRoot}", - "command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/sign-session-key.yml; else artillery run configs/sign-session-key.yml; fi'" + "command": "artillery run configs/sign-session-key.yml $([ -n \"$ARTILLERY_KEY\" ] && echo \"--record --key $ARTILLERY_KEY\")" } } }, From fb1eb55ff99924f396d8c4ced72ce4fe077498bf Mon Sep 17 00:00:00 2001 From: Howard Tam Date: Thu, 6 Nov 2025 16:32:54 -0800 Subject: [PATCH 11/19] Add more lit-action variants --- packages/artillery/configs/execute.yml | 40 +++- .../src/processors/multi-endpoints.ts | 189 +++++++++++++++--- 2 files changed, 205 insertions(+), 24 deletions(-) diff --git a/packages/artillery/configs/execute.yml b/packages/artillery/configs/execute.yml index 4b5c07938..7a2875c16 100644 --- a/packages/artillery/configs/execute.yml +++ b/packages/artillery/configs/execute.yml @@ -17,8 +17,46 @@ config: processor: '../src/processors/multi-endpoints.ts' scenarios: - - name: 'Execute JS Stress Test' + - name: 'Execute JS Stress Test - Sign' weight: 100 + variables: + # Access in the script via context.scenario.variables.variant + variant: 'sign' flow: - function: 'runExecuteJSTest' - think: 0.1 + - name: 'Execute JS Stress Test - Broadcast and Collect' + weight: 0 + variables: + variant: 'broadcastAndCollect' + flow: + - function: 'runExecuteJSTest' + - think: 0.1 + - name: 'Execute JS Stress Test - Check Conditions with Auth Sig' + weight: 0 + variables: + variant: 'checkConditionsWithAuthSig' + flow: + - function: 'runExecuteJSTest' + - think: 0.1 + - name: 'Execute JS Stress Test - Sign Child Lit Action' + weight: 0 + variables: + variant: 'signChildLitAction' + flow: + - function: 'runExecuteJSTest' + - think: 0.1 + - name: 'Execute JS Stress Test - Decrypt to Single Node without Auth Sig' + weight: 0 + variables: + variant: 'decryptToSingleNode' + flow: + - function: 'runExecuteJSTest' + - think: 0.1 + - name: 'Execute JS Stress Test - Run Once' + weight: 0 + variables: + variant: 'runOnce' + flow: + - function: 'runExecuteJSTest' + - think: 0.1 \ No newline at end of file diff --git a/packages/artillery/src/processors/multi-endpoints.ts b/packages/artillery/src/processors/multi-endpoints.ts index 248290690..c403b2618 100644 --- a/packages/artillery/src/processors/multi-endpoints.ts +++ b/packages/artillery/src/processors/multi-endpoints.ts @@ -37,7 +37,7 @@ const ExecuteJsResultSchema = z.object({ }) ), response: z.string(), - logs: z.string(), + logs: z.string().optional(), }); // Global variables to cache expensive operations @@ -243,7 +243,11 @@ export async function runEncryptDecryptTest() { } // test '/web/execute/v2' endpoint -export async function runExecuteJSTest() { +export async function runExecuteJSTest(context: any, _events: any) { + const variant = context.scenario.variables.variant; + + console.log('🔍 variant:', variant); + const startTime = Date.now(); try { @@ -256,32 +260,37 @@ export async function runExecuteJSTest() { // Create auth context const authContext = await createAuthContextFromState(); + // Set up access control conditions requiring wallet ownership + const builder = createAccBuilder(); + const accs = builder + .requireWalletOwnership(state.masterAccount.pkp.ethAddress) + .on('ethereum') + .build(); + + let encryptedData: any; + if (variant === 'decryptToSingleNodeWithoutAuthSig') { + // Encrypt data with the access control conditions + const dataToEncrypt = 'Hello from PKP encrypt-decrypt test!'; + encryptedData = await litClient.encrypt({ + dataToEncrypt, + unifiedAccessControlConditions: accs, + chain: 'ethereum', + }); + } + // Perform executeJs operation - const litActionCode = ` - (async () => { - const { sigName, toSign, publicKey } = jsParams; - const { keccak256, arrayify } = ethers.utils; - - const toSignBytes = new TextEncoder().encode(toSign); - const toSignBytes32 = keccak256(toSignBytes); - const toSignBytes32Array = arrayify(toSignBytes32); - - const sigShare = await Lit.Actions.signEcdsa({ - toSign: toSignBytes32Array, - publicKey, - sigName, - }); - })();`; + const { litActionCode, jsParams } = getLitActionCodeAndJsParams( + variant, + state, + encryptedData, + accs, + await authContext.authNeededCallback() + ); const result = await litClient.executeJs({ code: litActionCode, authContext, - jsParams: { - message: 'Test message from e2e executeJs', - sigName: 'e2e-test-sig', - toSign: 'Test message from e2e executeJs', - publicKey: state.masterAccount.pkp.pubkey, - }, + jsParams, }); // Validate the result using Zod schema @@ -355,3 +364,137 @@ export async function runSignSessionKeyTest() { throw error; } } + +// String enum for the variant +type Variant = + | 'sign' + | 'broadcastAndCollect' + | 'checkConditionsWithoutAuthSig' + | 'signChildLitAction' + | 'decryptToSingleNode' + | 'runOnce'; + +function getLitActionCodeAndJsParams( + variant: Variant, + state: any, + encryptedData?: any, + accs?: any, + authSig?: any +): { + litActionCode: string; + jsParams: any; +} { + switch (variant) { + case 'broadcastAndCollect': + return { + litActionCode: ` + (async () => { + const resp = await Lit.Actions.broadcastAndCollect({ + name: 'some-name', + value: 'some-value', + }); + Lit.Actions.setResponse({ response: JSON.stringify(resp) }); + })();`, + jsParams: undefined, + }; + case 'checkConditionsWithoutAuthSig': + return { + litActionCode: ` + (async () => { + const resp = await Lit.Actions.checkConditions({ + conditions: accessControlConditions, + chain: 'ethereum', + }); + Lit.Actions.setResponse({ response: JSON.stringify(resp.toString()) }); + })();`, + jsParams: { + accessControlConditions: + accs || state.masterAccount.pkp.accessControlConditions, + }, + }; + case 'signChildLitAction': + return { + litActionCode: ` + (async () => { + const { sigName, publicKey } = jsParams; + let utf8Encode = new TextEncoder(); + const toSign = utf8Encode.encode('This message is exactly 32 bytes'); + const _ = await Lit.Actions.call({ ipfsId: 'QmRwN9GKHvCn4Vk7biqtr6adjXMs7PzzYPCzNCRjPFiDjm', params: { + toSign: Array.from(toSign), + publicKey, + sigName + }}); + })();`, + jsParams: { + sigName: 'e2e-test-sig', + publicKey: state.masterAccount.pkp.pubkey, + }, + }; + case 'decryptToSingleNode': + return { + litActionCode: ` + (async () => { + const { accessControlConditions, authSig, ciphertext, dataToEncryptHash } = jsParams; + const resp = await Lit.Actions.decryptAndCombine({ + accessControlConditions, + ciphertext, + dataToEncryptHash, + authSig, + chain: 'ethereum', + }); + Lit.Actions.setResponse({ response: JSON.stringify(resp) }); + })();`, + jsParams: { + accessControlConditions: + accs || state.masterAccount.pkp.accessControlConditions, + authSig, + ciphertext: encryptedData?.ciphertext, + dataToEncryptHash: encryptedData?.dataToEncryptHash, + }, + }; + case 'runOnce': + return { + litActionCode: ` + (async () => { + let temp = await Lit.Actions.runOnce( + { waitForResponse: false, name: 'weather' }, + async () => { + const url = 'https://api.weather.gov/gridpoints/TOP/31,80/forecast'; + const resp = await fetch(url).then((response) => response.json()); + const temp = resp.properties.periods[0].temperature; + return temp; + } + ); + + Lit.Actions.setResponse({ response: JSON.stringify(temp) }); + })();`, + jsParams: undefined, + }; + case 'sign': + return { + litActionCode: ` + (async () => { + const { sigName, toSign, publicKey } = jsParams; + const { keccak256, arrayify } = ethers.utils; + + const toSignBytes = new TextEncoder().encode(toSign); + const toSignBytes32 = keccak256(toSignBytes); + const toSignBytes32Array = arrayify(toSignBytes32); + + const sigShare = await Lit.Actions.signEcdsa({ + toSign: toSignBytes32Array, + publicKey, + sigName, + }); + })();`, + jsParams: { + message: 'Test message from e2e executeJs', + sigName: 'e2e-test-sig', + toSign: 'Test message from e2e executeJs', + publicKey: state.masterAccount.pkp.pubkey, + }, + }; + default: + throw new Error(`Unknown variant: ${variant}`); + } +} From 5a36588e01a1363861e9137f4b96f3759d13723f Mon Sep 17 00:00:00 2001 From: Howard Tam Date: Thu, 6 Nov 2025 16:53:18 -0800 Subject: [PATCH 12/19] Fix format --- packages/artillery/configs/execute.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/artillery/configs/execute.yml b/packages/artillery/configs/execute.yml index 7a2875c16..74b4a339c 100644 --- a/packages/artillery/configs/execute.yml +++ b/packages/artillery/configs/execute.yml @@ -59,4 +59,4 @@ scenarios: variant: 'runOnce' flow: - function: 'runExecuteJSTest' - - think: 0.1 \ No newline at end of file + - think: 0.1 From 9805b4166d8e4aad8627471ceefcf3761760f61d Mon Sep 17 00:00:00 2001 From: Howard Tam Date: Fri, 7 Nov 2025 09:59:46 -0800 Subject: [PATCH 13/19] Fix variant name --- packages/artillery/configs/execute.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/artillery/configs/execute.yml b/packages/artillery/configs/execute.yml index 74b4a339c..671af02a2 100644 --- a/packages/artillery/configs/execute.yml +++ b/packages/artillery/configs/execute.yml @@ -35,7 +35,7 @@ scenarios: - name: 'Execute JS Stress Test - Check Conditions with Auth Sig' weight: 0 variables: - variant: 'checkConditionsWithAuthSig' + variant: 'checkConditionsWithoutAuthSig' flow: - function: 'runExecuteJSTest' - think: 0.1 From e58675a15029e0b351385a7e45ee5c0783a553fb Mon Sep 17 00:00:00 2001 From: anson Date: Fri, 7 Nov 2025 18:04:29 +0000 Subject: [PATCH 14/19] refactor: change to eoa auth --- packages/artillery/src/processors/multi-endpoints.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/artillery/src/processors/multi-endpoints.ts b/packages/artillery/src/processors/multi-endpoints.ts index c403b2618..84e3785cc 100644 --- a/packages/artillery/src/processors/multi-endpoints.ts +++ b/packages/artillery/src/processors/multi-endpoints.ts @@ -1,5 +1,6 @@ import { createAuthManager, storagePlugins } from '@lit-protocol/auth'; import { createLitClient, LitClientType } from '@lit-protocol/lit-client'; +import { AuthSig } from '@lit-protocol/types'; import { z } from 'zod'; import * as StateManager from '../StateManager'; import { getLitNetworkModule } from '@lit-protocol/e2e'; @@ -118,6 +119,7 @@ const createAuthContextFromState = async () => { }); } + return masterAccountAuthContext; }; @@ -263,14 +265,14 @@ export async function runExecuteJSTest(context: any, _events: any) { // Set up access control conditions requiring wallet ownership const builder = createAccBuilder(); const accs = builder - .requireWalletOwnership(state.masterAccount.pkp.ethAddress) + .requireWalletOwnership(authContext.account.address) .on('ethereum') .build(); let encryptedData: any; - if (variant === 'decryptToSingleNodeWithoutAuthSig') { + if (variant === 'decryptToSingleNode') { // Encrypt data with the access control conditions - const dataToEncrypt = 'Hello from PKP encrypt-decrypt test!'; + const dataToEncrypt = 'Hello from encrypt-decrypt test!'; encryptedData = await litClient.encrypt({ dataToEncrypt, unifiedAccessControlConditions: accs, @@ -284,7 +286,7 @@ export async function runExecuteJSTest(context: any, _events: any) { state, encryptedData, accs, - await authContext.authNeededCallback() + null ); const result = await litClient.executeJs({ From e1db48ba5a5a5bf5dacf0b8f57df21b4a13b3b31 Mon Sep 17 00:00:00 2001 From: Howard Tam Date: Fri, 7 Nov 2025 10:04:48 -0800 Subject: [PATCH 15/19] Add params --- packages/artillery/src/processors/multi-endpoints.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/artillery/src/processors/multi-endpoints.ts b/packages/artillery/src/processors/multi-endpoints.ts index c403b2618..494008884 100644 --- a/packages/artillery/src/processors/multi-endpoints.ts +++ b/packages/artillery/src/processors/multi-endpoints.ts @@ -401,6 +401,7 @@ function getLitActionCodeAndJsParams( return { litActionCode: ` (async () => { + const { accessControlConditions } = jsParams; const resp = await Lit.Actions.checkConditions({ conditions: accessControlConditions, chain: 'ethereum', From fc609612d1722d55a55cd452858afa525bee4745 Mon Sep 17 00:00:00 2001 From: anson Date: Fri, 7 Nov 2025 18:19:34 +0000 Subject: [PATCH 16/19] refactor: remove unused import of AuthSig --- packages/artillery/src/processors/multi-endpoints.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/artillery/src/processors/multi-endpoints.ts b/packages/artillery/src/processors/multi-endpoints.ts index 84e3785cc..397b5c8c5 100644 --- a/packages/artillery/src/processors/multi-endpoints.ts +++ b/packages/artillery/src/processors/multi-endpoints.ts @@ -1,6 +1,5 @@ import { createAuthManager, storagePlugins } from '@lit-protocol/auth'; import { createLitClient, LitClientType } from '@lit-protocol/lit-client'; -import { AuthSig } from '@lit-protocol/types'; import { z } from 'zod'; import * as StateManager from '../StateManager'; import { getLitNetworkModule } from '@lit-protocol/e2e'; @@ -119,7 +118,6 @@ const createAuthContextFromState = async () => { }); } - return masterAccountAuthContext; }; From 602658de798fc5ffbf71f7e82b7e124024da83d6 Mon Sep 17 00:00:00 2001 From: Howard Tam Date: Tue, 11 Nov 2025 19:10:15 -0800 Subject: [PATCH 17/19] Tidy up decrypt scenario --- .../src/processors/multi-endpoints.ts | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/packages/artillery/src/processors/multi-endpoints.ts b/packages/artillery/src/processors/multi-endpoints.ts index f98050413..5d7489c3b 100644 --- a/packages/artillery/src/processors/multi-endpoints.ts +++ b/packages/artillery/src/processors/multi-endpoints.ts @@ -262,13 +262,14 @@ export async function runExecuteJSTest(context: any, _events: any) { // Set up access control conditions requiring wallet ownership const builder = createAccBuilder(); - const accs = builder - .requireWalletOwnership(authContext.account.address) - .on('ethereum') - .build(); - + let accs: any; let encryptedData: any; if (variant === 'decryptToSingleNode') { + accs = builder + .requireWalletOwnership(authContext.account.address) + .on('ethereum') + .build(); + // Encrypt data with the access control conditions const dataToEncrypt = 'Hello from encrypt-decrypt test!'; encryptedData = await litClient.encrypt({ @@ -276,6 +277,11 @@ export async function runExecuteJSTest(context: any, _events: any) { unifiedAccessControlConditions: accs, chain: 'ethereum', }); + } else { + accs = builder + .requireWalletOwnership(state.masterAccount.pkp.ethAddress) + .on('ethereum') + .build(); } // Perform executeJs operation @@ -284,7 +290,7 @@ export async function runExecuteJSTest(context: any, _events: any) { state, encryptedData, accs, - null + await authContext.authNeededCallback() ); const result = await litClient.executeJs({ @@ -435,12 +441,12 @@ function getLitActionCodeAndJsParams( return { litActionCode: ` (async () => { - const { accessControlConditions, authSig, ciphertext, dataToEncryptHash } = jsParams; - const resp = await Lit.Actions.decryptAndCombine({ + const { accessControlConditions, ciphertext, dataToEncryptHash } = jsParams; + const resp = await Lit.Actions.decryptToSingleNode({ accessControlConditions, ciphertext, dataToEncryptHash, - authSig, + authSig: null, chain: 'ethereum', }); Lit.Actions.setResponse({ response: JSON.stringify(resp) }); @@ -448,7 +454,6 @@ function getLitActionCodeAndJsParams( jsParams: { accessControlConditions: accs || state.masterAccount.pkp.accessControlConditions, - authSig, ciphertext: encryptedData?.ciphertext, dataToEncryptHash: encryptedData?.dataToEncryptHash, }, From 8cc0ea33943589cb7086838801be47532566c50a Mon Sep 17 00:00:00 2001 From: Howard Tam Date: Tue, 11 Nov 2025 19:14:36 -0800 Subject: [PATCH 18/19] Validate decrypted response from LA --- .../artillery/src/processors/multi-endpoints.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/artillery/src/processors/multi-endpoints.ts b/packages/artillery/src/processors/multi-endpoints.ts index 5d7489c3b..74b5944df 100644 --- a/packages/artillery/src/processors/multi-endpoints.ts +++ b/packages/artillery/src/processors/multi-endpoints.ts @@ -264,6 +264,7 @@ export async function runExecuteJSTest(context: any, _events: any) { const builder = createAccBuilder(); let accs: any; let encryptedData: any; + let dataToEncrypt: string; if (variant === 'decryptToSingleNode') { accs = builder .requireWalletOwnership(authContext.account.address) @@ -271,7 +272,7 @@ export async function runExecuteJSTest(context: any, _events: any) { .build(); // Encrypt data with the access control conditions - const dataToEncrypt = 'Hello from encrypt-decrypt test!'; + dataToEncrypt = 'Hello from encrypt-decrypt test!'; encryptedData = await litClient.encrypt({ dataToEncrypt, unifiedAccessControlConditions: accs, @@ -305,9 +306,19 @@ export async function runExecuteJSTest(context: any, _events: any) { const endTime = Date.now(); const duration = endTime - startTime; + if ( + variant === 'decryptToSingleNode' && + // Strip quote marks at the ends + validatedResult.response.substring( + 1, + validatedResult.response.length - 1 + ) !== dataToEncrypt! + ) { + throw new Error('❌ Decrypted data does not match the original data'); + } + console.log(`✅ executeJs successful in ${duration}ms`); console.log('✅ executeJs result:', validatedResult); - // For Artillery, just return - no need to call next() return; } catch (error) { From 75f2aa5608994d72e68c9f1dbd1411b0e34bda6e Mon Sep 17 00:00:00 2001 From: Howard Tam Date: Tue, 11 Nov 2025 22:44:13 -0800 Subject: [PATCH 19/19] Fix sign session key --- packages/artillery/src/processors/multi-endpoints.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/artillery/src/processors/multi-endpoints.ts b/packages/artillery/src/processors/multi-endpoints.ts index 74b5944df..7757943e8 100644 --- a/packages/artillery/src/processors/multi-endpoints.ts +++ b/packages/artillery/src/processors/multi-endpoints.ts @@ -351,7 +351,7 @@ export async function runSignSessionKeyTest() { const masterAccountPkpAuthContext = await authManager.createPkpAuthContext({ authData: state.masterAccount.authData, - pkpPublicKey: state.masterAccount.pkp.publicKey, + pkpPublicKey: state.masterAccount.pkp.pubkey, authConfig: { resources: [ ['pkp-signing', '*'], @@ -367,7 +367,10 @@ export async function runSignSessionKeyTest() { }, }); - // console.log('✅ Master Account PKP Auth Context:', masterAccountPkpAuthContext); + console.log( + '✅ Sign Session Key successful. Master Account PKP Auth Context:', + masterAccountPkpAuthContext + ); } catch (error) { const endTime = Date.now(); const duration = endTime - startTime;